uart DMA lose data under baudrate 921600, but it works under baudrate 115200
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2023-01-01 7:29 AM
my board is nucleo64 f401re. I used DMA and Idle interrupt to receive data of uncertain length. it works when baudrate is 115200. but it receives up to 16 bytes under baudrate 921600, other bytes has been losed. I want to higher speed, how to fixed this problem
- Labels:
-
DMA
-
STM32F4 Series
-
UART-USART
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2023-01-01 7:41 AM
If you don't use circular DMA, do use it.
JW
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2023-01-01 8:21 AM
You'd likely need to use circular, perhaps with a larger buffer.
The call-back routines must be fast and efficient as they are called under interrupt context.
If one transfer completes the next must be started quickly.
Do you get any error status reporting from the DMA or UART? Like over/under run conditions?
Up vote any posts that you find helpful, it shows what's working..
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2023-01-01 9:40 PM
Break interrupt and dma interrupt are not synchronised, when the baudrate goes up, the lag between the two may be critical.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2023-01-02 4:13 PM
Break interrupt? what is this?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2023-01-02 5:40 PM
the buffer is large enough to receive datas and there is no error
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2023-01-02 7:10 PM
Break is not a data code byte that you can put in a buffer by dma. Using a pause in transmission generates an exception to manage and synchronize with data flow, raising the complexity.
Console and terminal use markers like return 0x0D and/ or line feed 0x0A to slice de continuous data stream in packets to process since PC DOS.... very high tech, very unproven ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2023-01-02 11:54 PM
You can find the explanation how to implement DMA circular mode on the link: https://github.com/MaJerle/stm32-usart-uart-dma-rx-tx
