UART Overrun error
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2021-11-15 10:03 PM
Hello,
I transfer data by uart interrupt(Uart_RX_IT_Start()).
Now UART overrun error is occurred continuously.
Should I have checked any point?
I want to use the uart interrupt, not DMA.
Thanks.
Labels:
- Labels:
-
UART-USART
This discussion is locked. Please start a new topic to ask your question.
1 REPLY 1
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2021-11-16 3:22 AM
If overrun occurs, your interrupt handling is too slow or the transmission speed to high. Remedies:
- move stuff (like data processing) out of the interrupt handler into a queue+task
- use Release instead of Debug config for compiler options, use heavier compiler optimization
- avoid using HAL (overhead)
- do not use single char interrupts but cyclic DMA as a FIFO, maybe in conjunction with idle interrupt to detect idle conditions
- some MCUs have UARTS with hardware FIFOs which you may use
hth
KnarfB
