Functional Description
1628
SLAU723A – October 2017 – Revised October 2018
Copyright © 2017–2018, Texas Instruments Incorporated
Universal Asynchronous Receiver/Transmitter (UART)
All of the interrupt events are ORed together before being sent to the interrupt controller, so the UART can
only generate a single interrupt request to the controller at any given time. Software can service multiple
interrupt events in a single interrupt service routine by reading the UART Masked Interrupt Status
(UARTMIS) register (see
The interrupt events that can trigger a controller-level interrupt are defined in the UART Interrupt Mask
(UARTIM) register (see
) by setting the corresponding IM bits. If interrupts are not used,
the raw interrupt status is visible via the UART Raw Interrupt Status (UARTRIS) register (see
NOTE:
For receive time-out, the RTIM bit in the UARTIM register must be set to see the RTMIS and
RTRIS status in the UARTMIS and UARTRIS registers.
Interrupts are always cleared (for the UARTMIS and UARTRIS registers) by writing a 1 to the
corresponding bit in the UART Interrupt Clear (UARTICR) register (see
The receive time-out interrupt is asserted when the receive FIFO is not empty, and no further data is
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 a 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 receive FIFO reaches the programmed trigger level, the RXRIS bit is
set. The receive interrupt is cleared by reading data from the receive FIFO until it becomes less than
the trigger level, or by clearing the interrupt by writing a 1 to the RXIC bit.
•
If the FIFOs are disabled (have a depth of one location) and data is received thereby filling the
location, the RXRIS bit is set. The receive interrupt is cleared by performing a single read of the
receive FIFO, or by clearing the interrupt by writing a 1 to the RXIC bit.
The transmit interrupt changes state when one of the following events occurs:
•
If the FIFOs are enabled and the transmit 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 otherwise no further transmit interrupts will be generated.
The transmit interrupt is cleared by writing data to the transmit FIFO until it becomes greater than the
trigger level, or by clearing the interrupt by writing a 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. It is cleared by performing a single write to the transmit FIFO, or
by clearing the interrupt by writing a 1 to the TXIC bit.
26.3.10 Loopback Operation
The UART can be placed into an internal loopback mode for diagnostic or debug work by setting the LBE
bit in the UARTCTL register (see
). In loopback mode, data transmitted on the UnTx output
is received on the UnRx input. Note that the LBE bit should be set before the UART is enabled.
26.3.11 DMA Operation
The UART provides an interface to the
μ
DMA controller with separate channels for transmit and receive.
The DMA operation of the UART is enabled through the UART DMA Control (UARTDMACTL) register.
When DMA operation is enabled, the UART asserts a DMA request on the receive or transmit channel
when the associated FIFO can transfer data.
For the receive channel, a single transfer request is asserted whenever any data is in the receive FIFO. A
burst transfer request is asserted whenever the amount of data in the receive FIFO is at or above the
FIFO trigger level configured in the UARTIFLS register.
For the transmit channel, a single transfer request is asserted whenever there is at least one empty
location in the transmit FIFO. The burst request is asserted whenever the transmit FIFO contains fewer
characters than the FIFO trigger level. The single and burst DMA transfer requests are handled
automatically by the
μ
DMA controller depending on how the DMA channel is configured.