https://developer.arm.com/documentation/ddi0183/g/programmers-model/summary-of-registers?lang=en

UARTDR

  • Data Register
  • Writing to this register initiates the actual data transmission
BitsNameFunction
15:12-Reserved.
11OEOverrun error. This bit is set to 1 if data is received and the receive FIFO is already full.

This is cleared to 0 once there is an empty space in the FIFO and a new character can be written to it.
10BEBreak error. This bit is set to 1 if a break condition was detected, indicating that the received data input was held LOW for longer than a full-word transmission time (defined as start, data, parity and stop bits).

In FIFO mode, this error is associated with the character at the top of the FIFO. When a break occurs, only one 0 character is loaded into the FIFO. The next character is only enabled after the receive data input goes to a 1 (marking state), and the next valid start bit is received.
9PEParity error. When set to 1, it indicates that the parity of the received data character does not match the parity that the EPS and SPS bits in the Line Control Register, UARTLCR_H select.

In FIFO mode, this error is associated with the character at the top of the FIFO.
8FEFraming error. When set to 1, it indicates that the received character did not have a valid stop bit (a valid stop bit is 1).

In FIFO mode, this error is associated with the character at the top of the FIFO.
7:0DATAReceive (read) data character.

Transmit (write) data character.

UARTFR

  • Flag Register
  • Check if transmission is complete
BitsNameFunction
15:9-Reserved, do not modify, read as zero.
8RIRing indicator. This bit is the complement of the UART ring indicator, nUARTRI, modem status input. That is, the bit is 1 when nUARTRI is LOW.
7TXFETransmit FIFO empty. The meaning of this bit depends on the state of the FEN bit in the Line Control Register, UARTLCR_H.

If the FIFO is disabled, this bit is set when the transmit holding register is empty.

If the FIFO is enabled, the TXFE bit is set when the transmit FIFO is empty.

This bit does not indicate if there is data in the transmit shift register.
6RXFFReceive FIFO full. The meaning of this bit depends on the state of the FEN bit in the UARTLCR_H Register.

If the FIFO is disabled, this bit is set when the receive holding register is full.

If the FIFO is enabled, the RXFF bit is set when the receive FIFO is full.
5TXFFTransmit FIFO full. The meaning of this bit depends on the state of the FEN bit in the UARTLCR_H Register.

If the FIFO is disabled, this bit is set when the transmit holding register is full.

If the FIFO is enabled, the TXFF bit is set when the transmit FIFO is full.
4RXFEReceive FIFO empty. The meaning of this bit depends on the state of the FEN bit in the UARTLCR_H Register.

If the FIFO is disabled, this bit is set when the receive holding register is empty.

If the FIFO is enabled, the RXFE bit is set when the receive FIFO is empty.
3BUSYUART busy. If this bit is set to 1, the UART is busy transmitting data. This bit remains set until the complete byte, including all the stop bits, has been sent from the shift register.

This bit is set as soon as the transmit FIFO becomes non-empty, regardless of whether the UART is enabled or not.
2DCDData carrier detect. This bit is the complement of the UART data carrier detect, nUARTDCD, modem status input. That is, the bit is 1 when nUARTDCD is LOW.
1DSRData set ready. This bit is the complement of the UART data set ready, nUARTDSR, modem status input. That is, the bit is 1 when nUARTDSR is LOW.
0CTSClear to send. This bit is the complement of the UART clear to send, nUARTCTS, modem status input. That is, the bit is 1 when nUARTCTS is LOW.

UARTIBRD, UARTFBRD

  • Responsible for the speed

UARTIBRD

BitsNameFunction
15:0BAUD DIVINTThe integer baud rate divisor.

These bits are cleared to 0 on reset.

UARTFBRD

BitsNameFunction
5:0BAUD DIVFRACThe fractional baud rate divisor.

These bits are cleared to 0 on reset.

UARTLCR_H

  • Line Control Register
  • Controls the Data Frame Format
BitsNameFunction
15:8-Reserved, do not modify, read as zero.
7SPSStick parity select.

0 = stick parity is disabled

1 = either:

- if the EPS bit is 0 then the parity bit is transmitted and checked as a 1

- if the EPS bit is 1 then the parity bit is transmitted and checked as a 0.


This bit has no effect when the PEN bit disables parity checking and generation. See Table 3.11 for the parity truth table.
6:5WLENWord length. These bits indicate the number of data bits transmitted or received in a frame as follows:

b11 = 8 bits

b10 = 7 bits

b01 = 6 bits

b00 = 5 bits.
4FENEnable FIFOs:

0 = FIFOs are disabled (character mode) that is, the FIFOs become 1-byte-deep holding registers

1 = transmit and receive FIFO buffers are enabled (FIFO mode).
3STP2Two stop bits select. If this bit is set to 1, two stop bits are transmitted at the end of the frame. The receive logic does not check for two stop bits being received.
2EPSEven parity select. Controls the type of parity the UART uses during transmission and reception:

0 = odd parity. The UART generates or checks for an odd number of 1s in the data and parity bits.

1 = even parity. The UART generates or checks for an even number of 1s in the data and parity bits.

This bit has no effect when the PEN bit disables parity checking and generation. See Table 3.11 for the parity truth table.
1PENParity enable:

0 = parity is disabled and no parity bit added to the data frame

1 = parity checking and generation is enabled.

See Table 3.11 for the parity truth table.
0BRKSend break. If this bit is set to 1, a low-level is continually output on the UARTTXD output, after completing transmission of the current character. For the proper execution of the break command, the software must set this bit for at least two complete frames.

For normal use, this bit must be cleared to 0.

UARTCR

  • UART Control Register
  • Can Enable/Disable UART, Transmission or Reception
BitsNameFunction
15CTSEnCTS hardware flow control enable. If this bit is set to 1, CTS hardware flow control is enabled. Data is only transmitted when the nUARTCTS signal is asserted.
14RTSEnRTS hardware flow control enable. If this bit is set to 1, RTS hardware flow control is enabled. Data is only requested when there is space in the receive FIFO for it to be received.
13Out2This bit is the complement of the UART Out2 (nUARTOut2) modem status output. That is, when the bit is programmed to a 1, the output is 0. For DTE this can be used as Ring Indicator (RI).
12Out1This bit is the complement of the UART Out1 (nUARTOut1) modem status output. That is, when the bit is programmed to a 1 the output is 0. For DTE this can be used as Data Carrier Detect (DCD).
11RTSRequest to send. This bit is the complement of the UART request to send, nUARTRTS, modem status output. That is, when the bit is programmed to a 1 then nUARTRTS is LOW.
10DTRData transmit ready. This bit is the complement of the UART data transmit ready, nUARTDTR, modem status output. That is, when the bit is programmed to a 1 then nUARTDTR is LOW.
9RXEReceive enable. If this bit is set to 1, the receive section of the UART is enabled. Data reception occurs for either UART signals or SIR signals depending on the setting of the SIREN bit. When the UART is disabled in the middle of reception, it completes the current character before stopping.
8TXETransmit enable. If this bit is set to 1, the transmit section of the UART is enabled. Data transmission occurs for either UART signals, or SIR signals depending on the setting of the SIREN bit. When the UART is disabled in the middle of transmission, it completes the current character before stopping.
7LBELoopback enable. If this bit is set to 1 and the SIREN bit is set to 1 and the SIRTEST bit in the Test Control Register, UARTTCR is set to 1, then the nSIROUT path is inverted, and fed through to the SIRIN path. The SIRTEST bit in the test register must be set to 1 to override the normal half-duplex SIR operation. This must be the requirement for accessing the test registers during normal operation, and SIRTEST must be cleared to 0 when loopback testing is finished. This feature reduces the amount of external coupling required during system test.

If this bit is set to 1, and the SIRTEST bit is set to 0, the UARTTXD path is fed through to the UARTRXD path.

In either SIR mode or UART mode, when this bit is set, the modem outputs are also fed through to the modem inputs.

This bit is cleared to 0 on reset, to disable loopback.
6:3-Reserved, do not modify, read as zero.
2SIRLPSIR low-power IrDA mode. This bit selects the IrDA encoding mode. If this bit is cleared to 0, low-level bits are transmitted as an active high pulse with a width of 3/16th of the bit period. If this bit is set to 1, low-level bits are transmitted with a pulse width that is 3 times the period of the IrLPBaud16 input signal, regardless of the selected bit rate. Setting this bit uses less power, but might reduce transmission distances.
1SIRENSIR enable:

0 = IrDA SIR ENDEC is disabled. nSIROUT remains LOW (no light pulse generated), and signal transitions on SIRIN have no effect.

1 = IrDA SIR ENDEC is enabled. Data is transmitted and received on nSIROUT and SIRINUARTTXD remains HIGH, in the marking state. Signal transitions on UARTRXD or modem status inputs have no effect.

This bit has no effect if the UARTEN bit disables the UART.
0UARTENUART enable:

0 = UART is disabled. If the UART is disabled in the middle of transmission or reception, it completes the current character before stopping.

1 = the UART is enabled. Data transmission and reception occurs for either UART signals or SIR signals depending on the setting of the SIREN bit.