Skip to content

ESP32: DMA is enabled only when using UART0 and no reset of the rx fifo when the modem goes to suspend and resume power mode #86924

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
dmkuzmin opened this issue Mar 11, 2025 · 8 comments
Assignees
Labels
bug The issue is a bug, or the PR is fixing a bug platform: ESP32 Espressif ESP32 priority: low Low impact/importance bug Stale

Comments

@dmkuzmin
Copy link

Describe the bug

Some of the information is described here #82370

zephyr version: Zephyr 3.7.1
modem: Quectel BG95
platform: ESP32-C3 and ESP32-S3
config options: for ISR CONFIG_UART_INTERRUPT_DRIVEN=y or for async CONFIG_UART_INTERRUPT_DRIVEN=n,
CONFIG_UART_ASYNC_API=y, CONFIG_MODEM_BACKEND_UART_ASYNC=y

Unfortunately, the problem with entering and exiting modem sleep mode has not been solved, where the controller takes garbage upon waking up and needs to reset the RX FIFO, as it seems to me, but I cannot guess where to insert it.

Secondly, there is a problem with asynchronous mode operation. DMA is enabled only when using UART0

@dmkuzmin dmkuzmin added the bug The issue is a bug, or the PR is fixing a bug label Mar 11, 2025
@fabiobaltieri
Copy link
Member

Hi, could you change the issue description so that it uses the bug report template? It asks for some important information that are very useful for us to understand the issue. Thanks.

@fabiobaltieri fabiobaltieri added the priority: low Low impact/importance bug label Mar 11, 2025
@bjarki-andreasen bjarki-andreasen added the platform: ESP32 Espressif ESP32 label Mar 11, 2025
@bjarki-andreasen bjarki-andreasen removed their assignment Mar 11, 2025
@bjarki-andreasen
Copy link
Collaborator

This is not a modem subsystem issue, should be assigned to someone from ESP given it seems to be a UART driver bug

@fabiobaltieri fabiobaltieri added platform: ESP32 Espressif ESP32 and removed platform: ESP32 Espressif ESP32 area: Modem labels Mar 11, 2025
@fabiobaltieri
Copy link
Member

Thanks @bjarki-andreasen.

@rftafas
Copy link

rftafas commented Mar 11, 2025

This was a known issue, solved sometime ago. Please, check if it is still there on v4.1

@wmrsouza
Copy link
Collaborator

wmrsouza commented Mar 11, 2025

@dmkuzmin I could not find any evidence that DMA is enabled only when using UART0. Going through uart_esp32.c, UART0 and UART1 are both treated equally with regards to DMA on esp32s3 and esp32c3 when CONFIG_UART_ASYNC_API=y, CONFIG_DMA=y, and dma status is okay in .overlay file. Would you mind telling us what led you to conclude that DMA is only enabled when using UART0?

@dmkuzmin
Copy link
Author

@wmrsouza , #82370 (comment)

That's my conclusion. I was convinced of this when I changed the number of the UART controller for the modem or for modbus devices in the dts file.

Examples of unsuccessful communication with devices are also given in #82370. There is a waiting for a response from the modem after issuing the AT command, timeouts in the drivers do not work. The exception is only for UART0

@rftafas
Copy link

rftafas commented Mar 12, 2025

Examples of unsuccessful communication with devices are also given in #82370. There is a waiting for a response from the modem after issuing the AT command, timeouts in the drivers do not work. The exception is only for UART0

Ok, #82370 is also based on 3.7.1. Does that happen on 4.1? Do you mind testing it on most recent release? Otherwise, we have no plans to go back to 3.7 and fix things.

Copy link

This issue has been marked as stale because it has been open (more than) 60 days with no activity. Remove the stale label or add a comment saying that you would like to have the label removed otherwise this issue will automatically be closed in 14 days. Note, that you can always re-open a closed issue at any time.

@github-actions github-actions bot added the Stale label May 12, 2025
@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale May 27, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug The issue is a bug, or the PR is fixing a bug platform: ESP32 Espressif ESP32 priority: low Low impact/importance bug Stale
Projects
None yet
Development

No branches or pull requests

6 participants