2023-01-01 07: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
2023-01-01 07:41 AM
If you don't use circular DMA, do use it.
JW
2023-01-01 08: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?
2023-01-01 09:40 PM
Break interrupt and dma interrupt are not synchronised, when the baudrate goes up, the lag between the two may be critical.
2023-01-02 04:13 PM
Break interrupt? what is this?
2023-01-02 05:40 PM
the buffer is large enough to receive datas and there is no error
2023-01-02 07: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 ?
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