Description
Block
The UART controller includes a DMA controller
interface to indicate when received data is available
or when the transmit FIFO buffer requires data. The
DMA requires two channels, one for transmit and
one for receive. The UART controller supports single
and burst transfers. You can use DMA in FIFO buffer
and non-FIFO buffer mode.
DMA interface
Related Information
on page 16-1
For more information, refer to this
DMA Controller
chapter.
Functional Description of the UART Controller
The HPS UART is based on an industry-standard 16550 UART. The UART supports serial communication
with a peripheral, modem (data carrier equipment), or data set. The master (CPU) writes data over the slave
bus to the UART. The UART converts the data to serial format and transmits to the destination device. The
UART also receives serial data and stores it for the master (CPU). †
The UART’s registers control the character length, baud rate, parity generation and checking, and interrupt
generation. The UART’s single interrupt output signal is supported by several prioritized interrupt types
that trigger assertion. You can separately enable or disable each of the interrupt types with the control
registers. †
FIFO Buffer Support
The UART controller includes 128-byte FIFO buffers to buffer transmit and receive data. FIFO buffer access
mode allows the master to write the receive FIFO buffer and to read the transmit FIFO buffer for test purposes.
FIFO buffer access mode is enabled with the FIFO access register (
FAR
). Once enabled, the control portions
of the transmit and receive FIFO buffers are reset and the FIFO buffers are treated as empty. †
When FIFO buffer access mode is enabled, you can write data to the transmit FIFO buffer as normal; however,
no serial transmission occurs in this mode and no data leaves the FIFO buffer. You can read back the data
that is written to the transmit FIFO buffer with the transmit FIFO read (
TFR
) register. The
TFR
register
provides the current data at the top of the transmit FIFO buffer. †
Similarly, you can also read data from the receive FIFO buffer in FIFO buffer access mode. Since the normal
operation of the UART is halted in this mode, you must write data to the receive FIFO buffer to read it back.
The receive FIFO write (
RFW
) register writes data to the receive FIFO buffer. The upper two bits of the 10-
bit register write framing errors and parity error detection information to the receive FIFO buffer. Bit 9 of
RFW
indicates a framing error and bit 8 of
RFW
indicates a parity error. Although you cannot read these bits
back from the receive buffer register, you can check the bits by reading the line status register (
LSR
), and
by checking the corresponding bits when the data in question is at the top of the receive FIFO buffer. †
Automatic Flow Control
The UART includes 16750-compatible request-to-send (RTS) and clear-to-send (CTS) serial data automatic
flow control mode. You enable automatic flow control with the modem control register (
MCR.AFCE
). †
Altera Corporation
UART Controller
21-3
Functional Description of the UART Controller
cv_54021
2013.12.30