Skip to content

drivers:serial Unable to achieve continuous reception on STM32 with async API #79999

@erwango

Description

@erwango

Discussed in #79831

Originally posted by msmttchr October 15, 2024
We are having trouble using some of the lower-end MCUs (STM32F0, G0 and C0) for some of our end-devices.
The MCUs in these devices must support a UART interface at sustained 500Kbps with no flow control.
We've noticed data loss when using Zephyr v3.7.0 UART driver with UART_ASYNC_API.
Using this configuration we have seen data loss when the DMA interrupts and attempts to restart the DMA with a new buffer.
We believe the cause of the data loss is because the current driver implementation doesn’t process data quickly enough.

Normally, STM32 supports circular dma buffer management with ability to have half full irq and full irq, so that software can read previous half while current half is being filled. In this case, no dma buffer setup is needed during reception, but I believe Zephyr drivers model does not support circular buffer.

Could you please suggest how to handle this use case?

Metadata

Metadata

Assignees

Labels

EnhancementChanges/Updates/Additions to existing featuresarea: UARTUniversal Asynchronous Receiver-Transmitterplatform: STM32ST Micro STM32

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions