Actions

EmSys

TM4C123G LaunchPad UART Interrupt Programming

From EdWiki

Revision as of 09:09, 26 February 2020 by Jshankar (Talk | contribs) (UART Interrupt Programming)

UART Interrupt Programming

Examining the UARTIM (UART Interrupt Mask) register, we see bit 4 allows us to enable the receive interrupt. If the receive interrupt for UART is enabled, when a byte is received, the receive flag is directed to NVIC and that causes the interrupt handler associated with the UART to be executed. In the UART handler we must read the received byte and clear the interrupt flag.

UART Interrupt Mask Register

Tm4c uartim r.png

bit Name Description
1 CTSIM UART Clear to Send Modem Interrupt Mask
1: An interrupt is sent to the interrupt controller when the CTSRIS bit in the UARTRIS register is set.
0: The CTSRIS interrupt is suppressed and not sent to the interrupt controller.
4 RXIM UART Receive Interrupt Mask
1: An interrupt is sent to the interrupt controller when the RXRIS bit in the UARTRIS register is set.
0: The RXRIS interrupt is suppressed and not sent to the interrupt controller.
5 TXIM UART Transmit Interrupt Mask
1: An interrupt is sent to the interrupt controller when the TXRIS bit in the UARTRIS register is set.
0: The TXRIS interrupt is suppressed and not sent to the interrupt controller.
6 RTIM UART Receive Time-Out Interrupt Mask
1: An interrupt is sent to the interrupt controller when the RTRIS bit in the UARTRIS register is set
0: The RTRIS interrupt is suppressed and not sent to the interrupt controller.
7 FEIM UART Framing Error Interrupt Mask
1: An interrupt is sent to the interrupt controller when the RTRIS bit in the UARTRIS register is set.
0: The FERIS interrupt is suppressed and not sent to the interrupt controller.
8 PEIM UART Parity Error Interrupt Mask
1: An interrupt is sent to the interrupt controller when the PERIS bit in the UARTRIS register is set.
0: The PERIS interrupt is suppressed and not sent to the interrupt controller.
9 BEIM UART Break Error Interrupt Mask
1: An interrupt is sent to the interrupt controller when the BERIS bit in the UARTRIS register is set.
0: The BERIS interrupt is suppressed and not sent to the interrupt controller.
10 OEIM UART Overrun Error Interrupt Mask
1: An interrupt is sent to the interrupt controller when the OERIS bit in the UARTRIS register is set.
0: The OERIS interrupt is suppressed and not sent to the interrupt controller.
12 9BITIM 9-Bit Mode Interrupt Mask
1: An interrupt is sent to the interrupt controller when the 9BITRIS bit in the UARTRIS register is set.
0: The 9BITRIS interrupt is suppressed and not sent to the interrupt controller.

UART Raw Interrupt Status (UARTRIS)

Tm4c uartris r.png

bit Name Description
1 CTSRIS UART Clear to Send Modem Raw Interrupt Status
1: Clear to Send used for software flow control.
0: No interrupt
4 RXRIS UART Receive Raw Interrupt Status
1: The receive FIFO level has passed through the condition defined in the UARTIFLS register.
0: No interrupt
5 TXRIS UART Transmit Raw Interrupt Status
1: If the EOT bit in the UARTCTL register is clear, the transmit FIFO level has passed through the condition defined in the UARTIFLS register.
If the EOT bit is set, the last bit of all transmitted data and flags has left the serializer.
0: No interrupt
6 RTRIS UART Receive Time-Out Raw Interrupt Status
1: A receive time out has occurred.
0: No interrupt
7 FERIS UART Framing Error Raw Interrupt Status
1: A framing error has occurred.
0: No Interrupt
8 PERIS UART Parity Error Raw Interrupt Status
1: A parity error has occurred.
0: No Interrupt.
9 BERIS UART Break Error Raw Interrupt Status
1: A break error has occurred.
0: No Interrupt.
10 OERIS UART Overrun Error Raw Interrupt Status
1: An overrun error has occurred.
0: No Interrupt.
12 9BITRIS 9-Bit Mode Raw Interrupt Status
1: A receive address match has occurred.
0: No Interrupt.



Prev.gif
Next.gif
Home.gif