This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

TM4C1294NCPDT: Difference between UART Overrun Flag and Raw Overrun Interrupt

Part Number: TM4C1294NCPDT

Tool/software:

I'm making an application which processes data coming in over UART. The data comes in large chunks of ~600 bytes. I have an ISR servicing the UART RX Interrupt, configured to go off when the FIFO hits 2 bytes. I was originally monitoring the overrun flag OERIS in UARTRIS, and I was finding that no overrun was occurring even though data was seemingly lost. I switched to monitoring the OE flag in UARTRER, and found that the FIFO was overrunning multiple times each chunk. What is the difference between these two flags and which one should I be using in this situation? 

  • Hi,

      I don't know how you handle the received data in the ISR and if you clear any status flags in the ISR. You might have clear the UARTSR register and hence the OE bit in the UARTRIS is cleared. In the datasheet it says "A write of any value to the UARTECR register clears the framing, parity, break, and overrun errors."

      I also recommend that you do not process the data directly in the ISR. When you are in the ISR and if you have interrupt due to FIFO overrun or full then the that event will not serviced in time until the ISR is exited after you finish process the data.  What I will recommend is that you do the data processing outside of the ISR. In the ISR, you simply set a flag indicating the data has been received. In your main() or inside a data processing function will only trigger when the flag is set. After you finish processing the data, you will reset the flag to 0. The Essene is to keep the ISR short if you have data that comes in really fast so its main job is to respond to the interrupts, not processing data.