cancel
Showing results for 
Search instead for 
Did you mean: 

UART Overrun error

Kim.Andy
Associate III

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.

1 REPLY 1
KnarfB
Principal III

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