Functional Description
www.ti.com
178
SWRU543–January 2019
Submit Documentation Feedback
Copyright © 2019, Texas Instruments Incorporated
Universal Asynchronous Receivers/Transmitters (UARTs)
The trigger points at which the FIFOs generate interrupts are controlled through the UART Interrupt FIFO
Level Select (UARTIFLS) register. Both FIFOs can be individually configured to trigger interrupts at
different levels. Available configurations include ⅛, ¼, ½, ¾, and ⅞. For example, if the ¼ option is
selected for the RX FIFO, the UART generates a receive interrupt after 4 data bytes are received. Out of
reset, both FIFOs are configured to trigger an interrupt at the ½ mark.
6.2.3.3 Interrupts
The UART can generate interrupts when the following conditions are observed:
• Overrun error
• Break error
• Parity error
• Framing error
• Receive time-out
• Transmit (when the condition defined in the TXIFLSEL bit in the UARTIFLS register is met [or if the
EOT bit in UARTCTL is set], when the last bit of all transmitted data leaves the serializer)
• Receive (when the condition defined in the RXIFLSEL bit in the UARTIFLS register is met)
All of the interrupt events are ORed together before being sent to the interrupt controller, so the UART can
generate only a single interrupt request to the controller at any given time. Software can service multiple
interrupt events in a single interrupt service routine (ISR) by reading the UART Masked Interrupt Status
(UARTMIS) register.
The interrupt events that can trigger a controller-level interrupt are defined in the UART Interrupt Mask
(UARTIM) register by setting the corresponding IM bits. If interrupts are not used, the raw interrupt status
is always visible through the UART Raw Interrupt Status (UARTRIS) register.
Interrupts are always cleared (for both the UARTMIS and UARTRIS registers) by writing 1 to the
corresponding bit in the UART Interrupt Clear (UARTICR) register.
The receive time-out interrupt is asserted when the RX FIFO is not empty, and no further data are
received over a 32-bit period when the HSE bit is clear, or over a 64-bit period when the HSE bit is set.
The receive time-out interrupt is cleared either when the FIFO becomes empty through reading all the
data (or by reading the holding register), or when 1 is written to the corresponding bit in the UARTICR
register.
The receive interrupt changes state when one of the following events occurs:
• If the FIFOs are enabled and the RX FIFO reaches the programmed trigger level, the RXRIS bit is set.
The receive interrupt is cleared by reading data from the RX FIFO until it becomes less than the trigger
level, or by clearing the interrupt by writing 1 to the RXIC bit.
• If the FIFOs are disabled (have a depth of one location) and data are received, thereby filling the
location, the RXRIS bit is set. The receive interrupt is cleared by performing a single read of the RX
FIFO, or by clearing the interrupt by writing 1 to the RXIC bit.
The transmit interrupt changes state when one of the following events occurs:
• If the FIFOs are enabled and the TX FIFO progresses through the programmed trigger level, the
TXRIS bit is set. The transmit interrupt is based on a transition through level, therefore the FIFO must
be written past the programmed trigger level or no further transmit interrupts will be generated. The
transmit interrupt is cleared by writing data to the TX FIFO until it becomes greater than the trigger
level, or by clearing the interrupt by writing 1 to the TXIC bit.
• If the FIFOs are disabled (have a depth of one location) and there is no data present in the transmitters
single location, the TXRIS bit is set. TXRIS is cleared by performing a single write to the TX FIFO, or
by clearing the interrupt by writing 1 to the TXIC bit.
6.2.3.4 LoopbackOperation
The UART can be placed into an internal loopback mode for diagnostic or debug work by setting the LBE
bit in the UARTCTL register. In loopback mode, data transmitted on the UnTx output is received on the
UnRx input. The LBE bit must be set before the UART is enabled.