Skip to main content
Kim.Andy
Associate II
November 16, 2021
Question

UART Overrun error

  • November 16, 2021
  • 1 reply
  • 1399 views

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.

This topic has been closed for replies.

1 reply

KnarfB
Super User
November 16, 2021

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