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.

TM4C123GH6PM: UART Interrupts and Error Checking

Part Number: TM4C123GH6PM

Hello,

I'm currently working with the TM4C123GH6PM microcontroller and the latest TivaWare C Series library to implement the MODBUS RS-232 Protocol over UART. I'd like to setup the UART to only trigger interrupts when a receive error occurs (Overrun Error, Break Error, Parity Error or Framing Error), and ideally I'd like to determine the type of error that has occurred. How should I setup my UART interrupt and ISR in that case? Here is my current UART configuration:

Many thanks,

Ksawery

  • Hello Ksawery,

    The UARTIntEnable and UARTIntDisable API's can be used to adjust these. For example, UARTIntEnable(UART3_BASE, UART_INT_RX | UART_INT_RT); would enable Receive interrupts and Receive Timeout interrupts. You can see the full list of flags in the comments for UARTIntEnable.

  • Thank you, I managed to find what I was looking for! This can be done by using a combination of UARTIntEnable with certain error flags set, and UARTRxErrorGet to determine the type of error that triggered the interrupt.

    Best regards,

    Ksawery