4.2. UART

ARM Documentation

Excerpted from the PrimeCell UART (PL011) Technical Reference Manual . Used with permission.

RP2040 has 2 identical instances of a UART peripheral, based on the ARM Primecell UART (PL011) (Revision r1p5).

Each instance supports the following features:

Each UART can be connected to a number of GPIO pins as defined in the GPIO muxing table in Section 2.19.2 . Connections to the GPIO muxing are prefixed with the UART instance name uart0_ or uart1_, and include the following:

The modem mode and IrDA mode of the PL011 are not supported.

The UARTCLK is driven from clk_peri, and PCLK is driven from the system clock clk_sys(see Section 2.15.1 ).

4.2.1. Overview

The UART performs:

The CPU reads and writes data and control/status information through the AMBA APB interface. The transmit and receive paths are buffered with internal FIFO memories enabling up to 32-bytes to be stored independently in both

transmit and receive modes.

The UART:

The UART operation and baud rate values are controlled by the Line Control Register, UARTLCR_H and the baud rate divisor registers (Integer Baud Rate Register, UARTIBRD and Fractional Baud Rate Register, UARTFBRD ).

The UART can generate:

If a framing, parity, or break error occurs during reception, the appropriate error bit is set, and is stored in the FIFO. If an overrun condition occurs, the overrun register bit is set immediately and FIFO data is prevented from being overwritten.

You can program the FIFOs to be 1-byte deep providing a conventional double-buffered UART interface.

There is a programmable hardware flow control feature that uses the nUARTCTS input and the nUARTRTS output to automatically control the serial data flow.

4.2.2. Functional description

Figure 59. UART block diagram. Test logic is not shown for clarity.

Figure 59: UART block diagram. The diagram shows the internal architecture of the UART block. It includes an APB interface and register block that receives control signals (nUARTRST, PCLK, PRESETn, PSEL, PENABLE, PWRITE, PADDR[11:2], PWDATA[15:0], PRDATA[15:0]) and provides a reference clock (UARTCLK). The APB block connects to a 32x8 transmit FIFO and a 32x12 receive FIFO. The transmit path includes a Baud rate generator (receiving Baud16 from the Baud rate divisor) and a Transmitter block. The receive path includes a Receiver block. Both paths have associated FIFO status and interrupt generation logic. The diagram also shows DMA interfaces (UARTRXDMASREQ, UARTRXDMABREQ, UARTRXDMACLR, UARTRXDMASREQ) and various interrupt signals (nUARTRI, nUARTCTS, nUARTDSR, nUARTDCD, nUARTDTR, nUARTRTS, nUARTOut1, nUARTOut2).

The diagram illustrates the functional architecture of the UART block. It is divided into several main functional areas:

Figure 59: UART block diagram. The diagram shows the internal architecture of the UART block. It includes an APB interface and register block that receives control signals (nUARTRST, PCLK, PRESETn, PSEL, PENABLE, PWRITE, PADDR[11:2], PWDATA[15:0], PRDATA[15:0]) and provides a reference clock (UARTCLK). The APB block connects to a 32x8 transmit FIFO and a 32x12 receive FIFO. The transmit path includes a Baud rate generator (receiving Baud16 from the Baud rate divisor) and a Transmitter block. The receive path includes a Receiver block. Both paths have associated FIFO status and interrupt generation logic. The diagram also shows DMA interfaces (UARTRXDMASREQ, UARTRXDMABREQ, UARTRXDMACLR, UARTRXDMASREQ) and various interrupt signals (nUARTRI, nUARTCTS, nUARTDSR, nUARTDCD, nUARTDTR, nUARTRTS, nUARTOut1, nUARTOut2).

4.2.2.1. AMBA APB interface

The AMBA APB interface generates read and write decodes for accesses to status/control registers, and the transmit and receive FIFOs.

4.2.2.2. Register block

The register block stores data written, or to be read across the AMBA APB interface.

4.2.2.3. Baud rate generator

The baud rate generator contains free-running counters that generate the internal clocks: Baud16 and IrLPBaud16 signals. Baud16 provides timing information for UART transmit and receive control. Baud16 is a stream of pulses with a width of one UARTCLK clock period and a frequency of 16 times the baud rate.

4.2.2.4. Transmit FIFO

The transmit FIFO is an 8-bit wide, 32 location deep, FIFO memory buffer. CPU data written across the APB interface is stored in the FIFO until read out by the transmit logic. You can disable the transmit FIFO to act like a one-byte holding register.

4.2.2.5. Receive FIFO

The receive FIFO is a 12-bit wide, 32 location deep, FIFO memory buffer. Received data and corresponding error bits, are stored in the receive FIFO by the receive logic until read out by the CPU across the APB interface. The receive FIFO can be disabled to act like a one-byte holding register.

4.2.2.6. Transmit logic

The transmit logic performs parallel-to-serial conversion on the data read from the transmit FIFO. Control logic outputs the serial bit stream beginning with a start bit, data bits with the Least Significant Bit (LSB) first, followed by the parity bit, and then the stop bits according to the programmed configuration in control registers.

4.2.2.7. Receive logic

The receive logic performs serial-to-parallel conversion on the received bit stream after a valid start pulse has been detected. Overrun, parity, frame error checking, and line break detection are also performed, and their status accompanies the data that is written to the receive FIFO.

4.2.2.8. Interrupt generation logic

Individual maskable active HIGH interrupts are generated by the UART. A combined interrupt output is generated as an OR function of the individual interrupt requests and is connected to the processor interrupt controllers.

See Section 4.2.6 for more information.

4.2.2.9. DMA interface

The UART provides an interface to connect to the DMA controller as UART DMA interface in Section 4.2.5 describes.

4.2.2.10. Synchronizing registers and logic

The UART supports both asynchronous and synchronous operation of the clocks, PCLK and UARTCLK. Synchronization registers and handshaking logic have been implemented, and are active at all times. This has a minimal impact on performance or area. Synchronization of control signals is performed on both directions of data flow, that is from the PCLK to the UARTCLK domain, and from the UARTCLK to the PCLK domain.

4.2.3. Operation

4.2.3.1. Clock signals

The frequency selected for UARTCLK must accommodate the required range of baud rates:

For example, for a range of baud rates from 110 baud to 460800 baud the UARTCLK frequency must be between 7.3728MHz to 115.34MHz.

The frequency of UARTCLK must also be within the required error limits for all baud rates to be used.

There is also a constraint on the ratio of clock frequencies for PCLK to UARTCLK. The frequency of UARTCLK must be no more than 5/3 times faster than the frequency of PCLK:

For example, in UART mode, to generate 921600 baud when UARTCLK is 14.7456MHz then PCLK must be greater than or equal to 8.85276MHz. This ensures that the UART has sufficient time to write the received data to the receive FIFO.

4.2.3.2. UART operation

Control data is written to the UART Line Control Register, UARTLCR. This register is 30-bits wide internally, but is externally accessed through the APB interface by writes to the following registers:

The UARTLCR_H register defines the:

The UARTIBRD register defines the integer baud rate divider, and the UARTFBRD register defines the fractional baud rate divider.

4.2.3.2.1. Fractional baud rate divider

The baud rate divisor is a 22-bit number consisting of a 16-bit integer and a 6-bit fractional part. This is used by the baud rate generator to determine the bit period. The fractional baud rate divider enables the use of any clock with a frequency >3.6864MHz to act as UARTCLK, while it is still possible to generate all the standard baud rates.

The 16-bit integer is written to the Integer Baud Rate Register, UARTIBRD . The 6-bit fractional part is written to the Fractional Baud Rate Register, UARTFBRD . The Baud Rate Divisor has the following relationship to UARTCLK:

Baud Rate Divisor = \( \text{UARTCLK}/(16 \times \text{Baud Rate}) = \text{BRD}_I + \text{BRD}_F \) where \( \text{BRD}_I \) is the integer part and \( \text{BRD}_F \) is the fractional part separated by a decimal point as Figure 60 .

Figure 60. Baud rate divisor.

Diagram of the Baud rate divisor structure. It shows a 16-bit integer part and a 6-bit fractional part separated by a decimal point.

The diagram illustrates the structure of the Baud rate divisor. It consists of two rectangular boxes. The left box is labeled '16-bit integer' and the right box is labeled '6-bit fractional part'. A decimal point (.) is positioned between the two boxes, indicating that the fractional part follows the integer part to form a decimal number.

Diagram of the Baud rate divisor structure. It shows a 16-bit integer part and a 6-bit fractional part separated by a decimal point.

You can calculate the 6-bit number ( \( m \) ) by taking the fractional part of the required baud rate divisor and multiplying it by 64 (that is, \( 2^n \) , where \( n \) is the width of the UARTFBRD Register) and adding 0.5 to account for rounding errors:

\[ m = \text{integer}(\text{BRD}_F \times 2^n + 0.5) \]

An internal clock enable signal, Baud16, is generated, and is a stream of one UARTCLK wide pulses with an average frequency of 16 times the required baud rate. This signal is then divided by 16 to give the transmit clock. A low number in the baud rate divisor gives a short bit period, and a high number in the baud rate divisor gives a long bit period.

4.2.3.2.2. Data transmission or reception

Data received or transmitted is stored in two 32-byte FIFOs, though the receive FIFO has an extra four bits per character for status information. For transmission, data is written into the transmit FIFO. If the UART is enabled, it causes a data frame to start transmitting with the parameters indicated in the Line Control Register, UARTLCR_H . Data continues to be transmitted until there is no data left in the transmit FIFO. The BUSY signal goes HIGH as soon as data is written to the transmit FIFO (that is, the FIFO is non-empty) and remains asserted HIGH while data is being transmitted. BUSY is negated only when the transmit FIFO is empty, and the last character has been transmitted from the shift register, including the stop bits. BUSY can be asserted HIGH even though the UART might no longer be enabled.

For each sample of data, three readings are taken and the majority value is kept. In the following paragraphs the middle sampling point is defined, and one sample is taken either side of it.

When the receiver is idle (UARTRXD continuously 1, in the marking state) and a LOW is detected on the data input (a start bit has been received), the receive counter, with the clock enabled by Baud16, begins running and data is sampled on the eighth cycle of that counter in UART mode, or the fourth cycle of the counter in SIR mode to allow for the shorter logic 0 pulses (half way through a bit period).

The start bit is valid if UARTRXD is still LOW on the eighth cycle of Baud16, otherwise a false start bit is detected and it is ignored.

If the start bit was valid, successive data bits are sampled on every 16th cycle of Baud16 (that is, one bit period later) according to the programmed length of the data characters. The parity bit is then checked if parity mode was enabled.

Lastly, a valid stop bit is confirmed if UARTRXD is HIGH, otherwise a framing error has occurred. When a full word is received, the data is stored in the receive FIFO, with any error bits associated with that word

4.2.3.2.3. Error bits

Three error bits are stored in bits [10:8] of the receive FIFO, and are associated with a particular character. There is an additional error that indicates an overrun error and this is stored in bit 11 of the receive FIFO.

4.2.3.2.4. Overrun bit

The overrun bit is not associated with the character in the receive FIFO. The overrun error is set when the FIFO is full, and the next character is completely received in the shift register. The data in the shift register is overwritten, but it is not written into the FIFO. When an empty location is available in the receive FIFO, and another character is received, the state of the overrun bit is copied into the receive FIFO along with the received character. The overrun state is then cleared. Table 422 lists the bit functions of the receive FIFO.

Table 422. Receive FIFO bit functions

FIFO bitFunction
11Overrun indicator
10Break error
9Parity error
8Framing error
7:0Received data

4.2.3.2.5. Disabling the FIFOs

Additionally, you can disable the FIFOs. In this case, the transmit and receive sides of the UART have 1-byte holding registers (the bottom entry of the FIFOs). The overrun bit is set when a word has been received, and the previous one was not yet read. In this implementation, the FIFOs are not physically disabled, but the flags are manipulated to give the illusion of a 1-byte register. When the FIFOs are disabled, a write to the data register bypasses the holding register unless the transmit shift register is already in use.

4.2.3.2.6. System and diagnostic loopback testing

You can perform loopback testing for UART data by setting the Loop Back Enable (LBE) bit to 1 in the Control Register, UARTCR .

Data transmitted on UARTTXD is received on the UARTRXD input.

4.2.3.3. UART character frame

Figure 61. UART character frame.

Timing diagram of a UART character frame on the UARTTXD signal. The signal starts at a high level (1) and transitions to a low level (0) at the 'Start' point. The data portion consists of '5-8 data bits' between the 'LSB' (Least Significant Bit) and 'MSB' (Most Significant Bit) markers. A 'Parity bit, if enabled' is shown as a separate pulse following the data bits. The frame concludes with '1-2 stop bits', where the signal returns to a high level (1).
Timing diagram of a UART character frame on the UARTTXD signal. The signal starts at a high level (1) and transitions to a low level (0) at the 'Start' point. The data portion consists of '5-8 data bits' between the 'LSB' (Least Significant Bit) and 'MSB' (Most Significant Bit) markers. A 'Parity bit, if enabled' is shown as a separate pulse following the data bits. The frame concludes with '1-2 stop bits', where the signal returns to a high level (1).

4.2.4. UART hardware flow control

The hardware flow control feature is fully selectable, and enables you to control the serial data flow by using the nUARTRTS output and nUARTCTS input signals. Figure 62 shows how two devices can communicate with each other using hardware flow control.

Figure 62. Hardware flow control between two similar devices.

Diagram showing hardware flow control between two UART devices (UART1 and UART2). Each device has an Rx FIFO and flow control block, and a Tx FIFO and flow control block. The nUARTRTS signal is asserted from the Tx FIFO of one device to the Rx FIFO of the other. The nUARTCTS signal is asserted from the Rx FIFO of one device to the Tx FIFO of the other.

The diagram illustrates the hardware flow control mechanism between two UART devices, UART1 and UART2. Each device contains two main functional blocks: an 'Rx FIFO and flow control' block and a 'Tx FIFO and flow control' block. The flow control is implemented using two signals: nUARTRTS (Request To Send) and nUARTCTS (Clear To Send). The nUARTRTS signal is generated by the Tx FIFO of one device and sent to the Rx FIFO of the other device. Conversely, the nUARTCTS signal is generated by the Rx FIFO of one device and sent to the Tx FIFO of the other device. This setup ensures that data transmission only occurs when the receiving device's FIFO has space available (RTS asserted) and that the transmitter only sends data when it has been granted permission (CTS asserted).

Diagram showing hardware flow control between two UART devices (UART1 and UART2). Each device has an Rx FIFO and flow control block, and a Tx FIFO and flow control block. The nUARTRTS signal is asserted from the Tx FIFO of one device to the Rx FIFO of the other. The nUARTCTS signal is asserted from the Rx FIFO of one device to the Tx FIFO of the other.

When the RTS flow control is enabled, nUARTRTS is asserted until the receive FIFO is filled up to the programmed watermark level. When the CTS flow control is enabled, the transmitter can only transmit data when nUARTCTS is asserted.

The hardware flow control is selectable using the RTSEn and CTSEn bits in the Control Register, UARTCR . Table 423 lists how you must set the bits to enable RTS and CTS flow control both simultaneously, and independently.

Table 423. Control bits to enable and disable hardware flow control.

UARTCR Register bits
CTSEnRTSEnDescription
11Both RTS and CTS flow control enabled
10Only CTS flow control enabled
01Only RTS flow control enabled
00Both RTS and CTS flow control disabled

NOTE

When RTS flow control is enabled, the software cannot use the RTSEn bit in the Control Register, UARTCR , to control the status of nUARTRTS.

4.2.4.1. RTS flow control

The RTS flow control logic is linked to the programmable receive FIFO watermark levels. When RTS flow control is enabled, the nUARTRTS is asserted until the receive FIFO is filled up to the watermark level. When the receive FIFO watermark level is reached, the nUARTRTS signal is deasserted, indicating that there is no more room to receive any more data. The transmission of data is expected to cease after the current character has been transmitted.

The nUARTRTS signal is reasserted when data has been read out of the receive FIFO so that it is filled to less than the watermark level. If RTS flow control is disabled and the UART is still enabled, then data is received until the receive FIFO is full, or no more data is transmitted to it.

4.2.4.2. CTS flow control

If CTS flow control is enabled, then the transmitter checks the nUARTCTS signal before transmitting the next byte. If the nUARTCTS signal is asserted, it transmits the byte otherwise transmission does not occur.

The data continues to be transmitted while nUARTCTS is asserted, and the transmit FIFO is not empty. If the transmit FIFO is empty and the nUARTCTS signal is asserted no data is transmitted.

If the nUARTCTS signal is deasserted and CTS flow control is enabled, then the current character transmission is completed before stopping. If CTS flow control is disabled and the UART is enabled, then the data continues to be transmitted until the transmit FIFO is empty.

4.2.5. UART DMA Interface

The UART provides an interface to connect to a DMA controller. The DMA operation of the UART is controlled using the DMA Control Register, UARTDMACR . The DMA interface includes the following signals:

For receive:

UARTRXDMASREQ

Single character DMA transfer request, asserted by the UART. For receive, one character consists of up to 12 bits. This signal is asserted when the receive FIFO contains at least one character.

UARTRXDMABREQ

Burst DMA transfer request, asserted by the UART. This signal is asserted when the receive FIFO contains more characters than the programmed watermark level. You can program the watermark level for each FIFO using the Interrupt FIFO Level Select Register, UARTIFLS .

UARTRXDMACLR

DMA request clear, asserted by a DMA controller to clear the receive request signals. If DMA burst transfer is requested, the clear signal is asserted during the transfer of the last data in the burst.

For transmit:

UARTTXDMASREQ

Single character DMA transfer request, asserted by the UART. For transmit one character consists of up to eight bits. This signal is asserted when there is at least one empty location in the transmit FIFO.

UARTTXDMABREQ

Burst DMA transfer request, asserted by the UART. This signal is asserted when the transmit FIFO contains less characters than the watermark level. You can program the watermark level for each FIFO using the Interrupt FIFO Level Select Register, UARTIFLS .

UARTTXDMACLR

DMA request clear, asserted by a DMA controller to clear the transmit request signals. If DMA burst transfer is requested, the clear signal is asserted during the transfer of the last data in the burst.

The burst transfer and single transfer request signals are not mutually exclusive, they can both be asserted at the same time. For example, when there is more data than the watermark level in the receive FIFO, the burst transfer request and the single transfer request are asserted. When the amount of data left in the receive FIFO is less than the watermark level, the single request only is asserted. This is useful for situations where the number of characters left to be received in the stream is less than a burst.

For example, if 19 characters have to be received and the watermark level is programmed to be four. The DMA controller then transfers four bursts of four characters and three single transfers to complete the stream.

Note icon NOTE

For the remaining three characters the UART cannot assert the burst request.

Each request signal remains asserted until the relevant DMACLR signal is asserted. After the request clear signal is deasserted, a request signal can become active again, depending on the conditions described previously. All request signals are deasserted if the UART is disabled or the relevant DMA enable bit, TXDMAE or RXDMAE, in the DMA Control Register, UARTDMACR , is cleared.

If you disable the FIFOs in the UART then it operates in character mode and only the DMA single transfer mode can operate, because only one character can be transferred to, or from the FIFOs at any time. UARTRXDMASREQ and UARTTXDMASREQ are the only request signals that can be asserted. See the Line Control Register, UARTLCR_H , for information about disabling the FIFOs.

When the UART is in the FIFO enabled mode, data transfers can be made by either single or burst transfers depending on the programmed watermark level and the amount of data in the FIFO. Table 424 lists the trigger points for UARTRXDMABREQ and UARTTXDMABREQ depending on the watermark level, for the transmit and receive FIFOs.

Table 424. DMA trigger points for the transmit and receive FIFOs.

Watermark levelBurst length
Transmit (number of empty locations)Receive (number of filled locations)
1/8284
1/4248
1/21616
3/4824
7/8428

In addition, the DMAONERR bit in the DMA Control Register, UARTDMACR , supports the use of the receive error interrupt, UARTEINTR. It enables the DMA receive request outputs, UARTRXDMASREQ or UARTRXDMABREQ, to be masked out when the UART error interrupt, UARTEINTR, is asserted. The DMA receive request outputs remain inactive until the UARTEINTR is cleared. The DMA transmit request outputs are unaffected.

Figure 63. DMA transfer waveforms.

Timing diagram for DMA transfer waveforms showing PCLK, DMASREQ, DMABREQ, and DMACLR signals.

The figure is a timing diagram showing four digital signals over time. The signals are PCLK, DMASREQ, DMABREQ, and DMACLR. PCLK is a periodic square wave. DMASREQ and DMABREQ are pulse signals that occur at specific points in the PCLK cycle. DMACLR is a pulse signal that occurs at the end of each DMA transfer burst.

Timing diagram for DMA transfer waveforms showing PCLK, DMASREQ, DMABREQ, and DMACLR signals.

Figure 63 shows the timing diagram for both a single transfer request and a burst transfer request with the appropriate DMACLR signal. The signals are all synchronous to PCLK. For the sake of clarity it is assumed that there is no synchronization of the request signals in the DMA controller.

4.2.6. Interrupts

There are eleven maskable interrupts generated in the UART. On RP2040, only the combined interrupt output, UARTRINTR , is connected.

You can enable or disable the individual interrupts by changing the mask bits in the Interrupt Mask Set/Clear Register, UARTIMSC . Setting the appropriate mask bit HIGH enables the interrupt.

Provision of individual outputs and the combined interrupt output, enables you to use either a global interrupt service routine, or modular device drivers to handle interrupts.

The transmit and receive dataflow interrupts UARTRXINTR and UARTRXINTR have been separated from the status interrupts. This enables you to use UARTRXINTR and UARTRXINTR so that data can be read or written in response to the FIFO trigger levels.

The error interrupt, UARTEINTR, can be triggered when there is an error in the reception of data. A number of error conditions are possible.

The modem status interrupt, UARTRMSINTR, is a combined interrupt of all the individual modem status signals.

The status of the individual interrupt sources can be read either from the Raw Interrupt Status Register, UARTRIS , or from the Masked Interrupt Status Register, UARTMIS .

4.2.6.1. UARTRMSINTR

The modem status interrupt is asserted if any of the modem status signals (nUARTRCTS, nUARTRDCD, nUARTRDSR, and nUARTRRI) change. It is cleared by writing a 1 to the corresponding bit(s) in the Interrupt Clear Register, UARTICR , depending on the modem status signals that generated the interrupt.

4.2.6.2. UARTRXINTR

The receive interrupt changes state when one of the following events occurs:

4.2.6.3. UARTRXINTR

The transmit interrupt changes state when one of the following events occurs:

To update the transmit FIFO you must:

i NOTE

The transmit interrupt is based on a transition through a level, rather than on the level itself. When the interrupt and the UART is enabled before any data is written to the transmit FIFO the interrupt is not set. The interrupt is only set, after written data leaves the single location of the transmit FIFO and it becomes empty.

4.2.6.4. UARTRTINTR

The receive timeout interrupt is asserted when the receive FIFO is not empty, and no more data is received during a 32-bit period. The receive timeout 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 of the Interrupt Clear Register, UARTICR .

4.2.6.5. UARTEINTR

The error interrupt is asserted when an error occurs in the reception of data by the UART. The interrupt can be caused by a number of different error conditions:

You can determine the cause of the interrupt by reading the Raw Interrupt Status Register, UARTRIS , or the Masked Interrupt Status Register, UARTMIS . It can be cleared by writing to the relevant bits of the Interrupt Clear Register, UARTICR (bits 7 to 10 are the error clear bits).

4.2.6.6. UARTINTR

The interrupts are also combined into a single output, that is an OR function of the individual masked sources. You can connect this output to a system interrupt controller to provide another level of masking on a individual peripheral basis.

The combined UART interrupt is asserted if any of the individual interrupts are asserted and enabled.

4.2.7. Programmer's Model

The SDK provides a uart_init function to configure the UART with a particular baud rate. Once the UART is initialised, the user must configure a GPIO pin as UART_TX and UART_RX. See Section 2.19.5.1 for more information on selecting a GPIO function.

To initialise the UART, the uart_init function takes the following steps:

SDK: https://github.com/raspberrypi/pico-sdk/blob/master/src/tp2_common/hardware_uart/uart.c Lines 42 - 92

42 uint uart_init(uart_inst_t *uart, uint baudrate) {
43     invalid_params_if(HARDWARE_UART, uart != uart0 && uart != uart1);
44
45     if (uart_clock_get_hz(uart) == 0) {
46         return 0;
47     }
48
49     uart_reset(uart);
50     uart_unreset(uart);
51
52     uart_set_translate_crlf(uart, PICO_UART_DEFAULT_CRLF);
53
54     // Any LCR writes need to take place before enabling the UART
55     uint baud = uart_set_baudrate(uart, baudrate);
56
57     // inline the uart_set_format() call, as we don't need the CR disable/re-enable
58     // protection, and also many people will never call it again, so having
59     // the generic function is not useful, and much bigger than this inlined
60     // code which is only a handful of instructions.
61     //
62     // The UART_UARTLCR_H_FEN_BITS setting is combined as well as it is the same register
63 #ifdef 0
64     uart_set_format(uart, 8, 1, UART_PARITY_NONE);
65     // Enable FIFOs (must be before setting UARTEN, as this is an LCR access)
66     hw_set_bits(&uart_get_hw(uart)->lcr_h, UART_UARTLCR_H_FEN_BITS);
67 #else
68     uint data_bits = 8;
69     uint stop_bits = 1;
70     uint parity = UART_PARITY_NONE;
71     hw_write_masked(&uart_get_hw(uart)->lcr_h,
72         ((data_bits - 5u) << UART_UARTLCR_H_WLEN_LSB) |
73         ((stop_bits - 1u) << UART_UARTLCR_H_STP2_LSB) |
74         (bool_to_bit(parity != UART_PARITY_NONE) << UART_UARTLCR_H_PEN_LSB) |
75         (bool_to_bit(parity == UART_PARITY_EVEN) << UART_UARTLCR_H_EPS_LSB) |
76         UART_UARTLCR_H_FEN_BITS,
77         UART_UARTLCR_H_WLEN_BITS | UART_UARTLCR_H_STP2_BITS |
78         UART_UARTLCR_H_PEN_BITS | UART_UARTLCR_H_EPS_BITS |
79         UART_UARTLCR_H_FEN_BITS);
80 #endif
81
82 // Enable the UART, both TX and RX
83 uart_get_hw(uart)->cr = UART_UARTCR_UARTEN_BITS | UART_UARTCR_TXE_BITS |
    UART_UARTCR_RXE_BITS;
84 // Always enable DREQ signals -- no harm in this if DMA is not listening
85 uart_get_hw(uart)->dmacr = UART_UARTDMACR_TXDMAE_BITS | UART_UARTDMACR_RXDMAE_BITS;
86
87 return baud;
88 }

4.2.7.1. Baud Rate Calculation

The uart baud rate is derived from dividing clk_peri.

If the required baud rate is 115200 and UARTCLK = 125MHz then:

Baud Rate Divisor = \( (125 * 10^6) / (16 * 115200) \approx 67.817 \)

Therefore, BRDI = 67 and BRDF = 0.817,

Therefore, fractional part, m = integer((0.817 * 64) + 0.5) = 52

Generated baud rate divider = \( 67 + 52/64 = 67.8125 \)

Generated baud rate = \( (125 * 10^6) / (16 * 67.8125) \approx 115207 \)

Error = \( (\text{abs}(115200 - 115207) / 115200) * 100 \approx 0.006\% \)

SDK: https://github.com/raspberrypi/pico-sdk/blob/master/src/rp2-common/hardware_uart/uart.c Lines 155 - 180

155 uint uart_set_baudrate(uart_inst_t *uart, uint baudrate) {
156     invalid_params_if(HARDWARE_UART, baudrate == 0);
157     uint32_t baud_rate_div = (8 * uart_clock_get_hz(uart) / baudrate) + 1;
158     uint32_t baud_ibrd = baud_rate_div >> 7;
159     uint32_t baud_fbrd;
160
161     if (baud_ibrd == 0) {
162         baud_ibrd = 1;
163         baud_fbrd = 0;
164     } else if (baud_ibrd >= 65535) {
165         baud_ibrd = 65535;
166         baud_fbrd = 0;
167     } else {
168         baud_fbrd = (baud_rate_div & 0x7f) >> 1;
169     }
170
171     uart_get_hw(uart)->ibrd = baud_ibrd;
172     uart_get_hw(uart)->fbrd = baud_fbrd;
173
174     // PL011 needs a (dummy) LCR_H write to latch in the divisors.
175     // We don't want to actually change LCR_H contents here.
176     uart_write_lcr_bits_masked(uart, 0, 0);
177
178     // See datasheet
179     return (4 * uart_clock_get_hz(uart)) / (64 * baud_ibrd + baud_fbrd);
180 }

4.2.8. List of Registers

The UART0 and UART1 registers start at base addresses of 0x40034000 and 0x40038000 respectively (defined as UART0_BASE and UART1_BASE in SDK).

Table 425. List of UART registers

OffsetNameInfo
0x000UARTDRData Register, UARTDR
0x004UARTRSRReceive Status Register/Error Clear Register, UARTRSR/UARTECR
0x018UARTFRFlag Register, UARTFR
0x020UARTILPRIrDA Low-Power Counter Register, UARTILPR
0x024UARTIBRDInteger Baud Rate Register, UARTIBRD
0x028UARTFBRDFractional Baud Rate Register, UARTFBRD
0x02cUARTLCR_HLine Control Register, UARTLCR_H
0x030UARTCRControl Register, UARTCR
0x034UARTIFLSInterrupt FIFO Level Select Register, UARTIFLS
0x038UARTIMSCInterrupt Mask Set/Clear Register, UARTIMSC
0x03cUARTRISRaw Interrupt Status Register, UARTRIS
0x040UARTMISMasked Interrupt Status Register, UARTMIS
0x044UARTICRInterrupt Clear Register, UARTICR
0x048UARTDMACRDMA Control Register, UARTDMACR
0xfe0UARTPERIPHID0UARTPeriphID0 Register
0xfe4UARTPERIPHID1UARTPeriphID1 Register
0xfe8UARTPERIPHID2UARTPeriphID2 Register
0xfecUARTPERIPHID3UARTPeriphID3 Register
0xff0UARTPCELLID0UARTPCellID0 Register
0xff4UARTPCELLID1UARTPCellID1 Register
0xff8UARTPCELLID2UARTPCellID2 Register
0xffcUARTPCELLID3UARTPCellID3 Register

UART: UARTDR Register

Offset: 0x000

Description

Data Register, UARTDR

Table 426. UARTDR Register

BitsDescriptionTypeReset
31:12Reserved.--
11OE: Overrun 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.RO-
BitsDescriptionTypeReset
10BE: Break 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.RO-
9PE: Parity 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. In FIFO mode, this error is associated with the character at the top of the FIFO.RO-
8FE: Framing 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.RO-
7:0DATA: Receive (read) data character. Transmit (write) data character.RWF-

UART: UARTSR Register

Offset: 0x004

Description

Receive Status Register/Error Clear Register, UARTSR/UARTECR

Table 427. UARTSR Register

BitsDescriptionTypeReset
31:4Reserved.--
3OE: Overrun error. This bit is set to 1 if data is received and the FIFO is already full. This bit is cleared to 0 by a write to UARTECR. The FIFO contents remain valid because no more data is written when the FIFO is full, only the contents of the shift register are overwritten. The CPU must now read the data, to empty the FIFO.WC0x0
2BE: Break 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). This bit is cleared to 0 after a write to UARTECR. 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.WC0x0
1PE: Parity 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. This bit is cleared to 0 by a write to UARTECR. In FIFO mode, this error is associated with the character at the top of the FIFO.WC0x0
0FE: Framing error. When set to 1, it indicates that the received character did not have a valid stop bit (a valid stop bit is 1). This bit is cleared to 0 by a write to UARTECR. In FIFO mode, this error is associated with the character at the top of the FIFO.WC0x0

UART: UARTFR Register

Offset: 0x018

Description

Flag Register, UARTFR

Table 428. UARTFR Register

Bits Register 31:0 Bitscolumn_2Description DescriptionType RO TypeReset 0x00000001 Reset
31:9Reserved.--
8RI : Ring indicator. This bit is the complement of the UART ring indicator,RO-
7TXFE: Transmit FIFO empty. The meaning of this bit depends on the state of this bit is set when the transmit holding register is empty. If the FIFO is indicate if there is data in the transmit shift register.RO0x1
6RXFF: Receive FIFO full. The meaning of this bit depends on the state of the the receive holding register is full. If the FIFO is enabled, the RXFF bit is set when the receive FIFO is full.RO0x0
5TXFF: Transmit FIFO full. The meaning of this bit depends on the state of the when the transmit FIFO is full.RO0x0
4RXFE: Receive FIFO empty. The meaning of this bit depends on the state of the when the receive FIFO is empty.RO0x1
3BUSY: UART 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 becomes non-empty, regardless of whether the UART is enabled or not.RO0x0
2DCD: Data carrier detect. This bit is the complement of the UART data carrier is LOW.RO-
1DSR: Data set ready. This bit is the complement of the UART data set ready,RO-
0CTS: Clear to send. This bit is the complement of the UART clear to send, : UARTILPR RegisterRO-
Bits: 0x020 DescriptionTypeReset
31:8Reserved.--
7:0ILPDVSR : 0x024: 8-bit low-power divisor value. These bits are cleared to 0 at reset. : UARTIBRD RegisterRW0x00

UART: UARTILPR Register

Offset: 0x020

Description

IrDA Low-Power Counter Register, UARTILPR

Table 429. UARTILPR Register

UART: UARTIBRD Register

Offset: 0x024

Description

Integer Baud Rate Register, UARTIBRD

Table 430. UARTIBRD Register

Bits Register 31:0 Bitscolumn_2Description DescriptionType RO TypeReset 0x00000001 Reset
31:16Reserved.--
15:0 UARTBAUD_DIVINT: The integer baud rate divisor. These bits are cleared to 0 on reset. : UARTFBRD RegisterRW0x0000
Table 431. UARTFBRD Description Bits RegisterDescriptionTypeReset
31:6Reserved.--
5:0 UARTBAUD_DIVFRAC: The fractional baud rate divisor. These bits are cleared to 0 on reset. : UARTLCR_H RegisterRW0x00
Table 432. Description Bits UARTLCR_H RegisterDescriptionTypeReset
31:8Reserved.--
7SPS: Stick parity select. 0 = stick parity is disabled 1 = either: * if the EPS bit is the PEN bit disables parity checking and generation.RW0x0
6:5WLEN bits.: Word length. These bits indicate the number of data bits transmitted orRW0x0
4FEN: Enable FIFOs: 0 = FIFOs are disabled (character mode) that is, the FIFOs are enabled (FIFO mode).RW0x0
3STP2: Two 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.RW0x0
2EPS: Even parity select. Controls the type of parity the UART uses during an odd number of 1s in the data and parity bits. 1 = even parity. The UART bit has no effect when the PEN bit disables parity checking and generation.RW0x0
1PEN: Parity enable: 0 = parity is disabled and no parity bit added to the data frame 1 = parity checking and generation is enabled.RW0x0

UART: UARTFBRD Register

Offset: 0x028

Description

Fractional Baud Rate Register, UARTFBRD

Table 431. UARTFBRD Register

UART: UARTLCR_H Register

Offset: 0x02c

Description

Line Control Register, UARTLCR_H

Table 432. UARTLCR_H Register

Bits Register 31:0 Bitscolumn_2Description DescriptionType RO TypeReset 0x00000001 Reset
31:16Reserved.--
15CTSEN: CTS hardware flow control enable. If this bit is set to 1, CTS hardware asserted.RW0x0
14RTSEN: RTS 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.RW0x0
13OUT2: This bit is the complement of the UART Out2 (nUARTOut2) modem DTE this can be used as Ring Indicator (RI).RW0x0
12OUT1: This bit is the complement of the UART Out1 (nUARTOut1) modem DTE this can be used as Data Carrier Detect (DCD).RW0x0
11RTS: Request to send. This bit is the complement of the UART request to to a 1 then nUARTRTS is LOW.RW0x0
10DTR: Data 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.RW0x0
9RXE: Receive 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 middle of reception, it completes the current character before stopping.RW0x1
8TXE: Transmit 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 signalsRW0x1

UART: UARTCR Register

Offset: 0x030

Description

Control Register, UARTCR

Table 433. UARTCR Register

BitsDescriptionTypeReset
7LBE : Loopback 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, UAR TTCR 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 UAR TTxD path is fed through to the UAR TRxD 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.RW0x0
6:3Reserved.--
2SIRLP : SIR 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.RW0x0
1SIREN : SIR 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 SIRIN. UAR TTxD remains HIGH, in the marking state. Signal transitions on UAR TRxD or modem status inputs have no effect. This bit has no effect if the UAR TEN bit disables the UART.RW0x0
0UAR TEN : UART 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.RW0x0

UART: UARTIFLS Register

Offset: 0x034

Description

Interrupt FIFO Level Select Register, UARTIFLS

Table 434. UARTIFLS Register

BitsDescriptionTypeReset
31:6Reserved.--
5:3RXIFLSEL : Receive interrupt FIFO level select. The trigger points for the receive interrupt are as follows: b000 = Receive FIFO becomes \( \geq 1 / 8 \) full b001 = Receive FIFO becomes \( \geq 1 / 4 \) full b010 = Receive FIFO becomes \( \geq 1 / 2 \) full b011 = Receive FIFO becomes \( \geq 3 / 4 \) full b100 = Receive FIFO becomes \( \geq 7 / 8 \) full b101-b111 = reserved.RW0x2
2:0TXIFLSEL : Transmit interrupt FIFO level select. The trigger points for the transmit interrupt are as follows: b000 = Transmit FIFO becomes \( \leq 1 / 8 \) full b001 = Transmit FIFO becomes \( \leq 1 / 4 \) full b010 = Transmit FIFO becomes \( \leq 1 / 2 \) full b011 = Transmit FIFO becomes \( \leq 3 / 4 \) full b100 = Transmit FIFO becomes \( \leq 7 / 8 \) full b101-b111 = reserved.RW0x2

UART: UARTIMSC Register

Offset: 0x038 Description

Interrupt Mask Set/Clear Register, UARTIMSC

Table 435. UARTIMSC Register

Bits Register 31:0 Bitscolumn_2Description DescriptionType RO TypeReset 0x00000001 Reset
31:11Reserved.--
10OEIM: Overrun error interrupt mask. A read returns the current mask for the is set. A write of 0 clears the mask.RW0x0
9BEIM: Break error interrupt mask. A read returns the current mask for the is set. A write of 0 clears the mask.RW0x0
8PEIM: Parity error interrupt mask. A read returns the current mask for the is set. A write of 0 clears the mask.RW0x0
7FEIM: Framing error interrupt mask. A read returns the current mask for the is set. A write of 0 clears the mask.RW0x0
6RTIM: Receive timeout interrupt mask. A read returns the current mask for the is set. A write of 0 clears the mask.RW0x0
5TXIM: Transmit interrupt mask. A read returns the current mask for the is set. A write of 0 clears the mask.RW0x0
4RXIM: Receive interrupt mask. A read returns the current mask for the is set. A write of 0 clears the mask.RW0x0
3DSRMIM: nUARTDSR modem interrupt mask. A read returns the current mask for the UARTDSRINTR interrupt. On a write of 1, the mask of the UARTDSRINTR interrupt is set. A write of 0 clears the mask.RW0x0
2DCDMIM: nUARTDCD modem interrupt mask. A read returns the current mask for the UARTDCDINTR interrupt. On a write of 1, the mask of the UARTDCDINTR interrupt is set. A write of 0 clears the mask.RW0x0
1CTSMIM: nUARTCTS modem interrupt mask. A read returns the current mask for the UARTCTSINTR interrupt. On a write of 1, the mask of the UARTCTSINTR interrupt is set. A write of 0 clears the mask.RW0x0
0RIMIM: nUARTRI modem interrupt mask. A read returns the current mask for the UARTRIINTR interrupt. On a write of 1, the mask of the UARTRIINTR interrupt is set. A write of 0 clears the mask. : UARTRIS RegisterRW0x0
BitsDescriptionTypeReset
31:11Reserved.--
UART: UARTRIS Register Offset: 0x03c Description

Raw Interrupt Status Register, UARTRIS

Table 436. UARTRIS Register

BitsDescriptionTypeReset
10OERIS : Overrun error interrupt status. Returns the raw interrupt state of the UARTOEINTR interrupt.RO0x0
9BERIS : Break error interrupt status. Returns the raw interrupt state of the UARTBEINTR interrupt.RO0x0
8PERIS : Parity error interrupt status. Returns the raw interrupt state of the UARTPEINTR interrupt.RO0x0
7FERIS : Framing error interrupt status. Returns the raw interrupt state of the UARTFEINTR interrupt.RO0x0
6RTRIS : Receive timeout interrupt status. Returns the raw interrupt state of the UARTRTINTR interrupt. aRO0x0
5TXRIS : Transmit interrupt status. Returns the raw interrupt state of the UARTTXINTR interrupt.RO0x0
4RXRIS : Receive interrupt status. Returns the raw interrupt state of the UARTRXINTR interrupt.RO0x0
3DSRRMIS : nUARTDSR modem interrupt status. Returns the raw interrupt state of the UARTDSRINTR interrupt.RO-
2DCDRMIS : nUARTDCD modem interrupt status. Returns the raw interrupt state of the UARTDCDINTR interrupt.RO-
1CTSRMIS : nUARTCTS modem interrupt status. Returns the raw interrupt state of the UARTCTSINTR interrupt.RO-
0RIRMIS : nUARTRI modem interrupt status. Returns the raw interrupt state of the UARTRIINTR interrupt.RO-

UART: UARTMIS Register

Offset: 0x040

Description

Masked Interrupt Status Register, UARTMIS

Table 437. UARTMIS Register

BitsDescriptionTypeReset
31:11Reserved.--
10OEMIS : Overrun error masked interrupt status. Returns the masked interrupt state of the UARTOEINTR interrupt.RO0x0
9BEMIS : Break error masked interrupt status. Returns the masked interrupt state of the UARTBEINTR interrupt.RO0x0
8PEMIS : Parity error masked interrupt status. Returns the masked interrupt state of the UARTPEINTR interrupt.RO0x0
7FEMIS : Framing error masked interrupt status. Returns the masked interrupt state of the UARTFEINTR interrupt.RO0x0
6RTMIS : Receive timeout masked interrupt status. Returns the masked interrupt state of the UARTRTINTR interrupt.RO0x0
5TXMIS : Transmit masked interrupt status. Returns the masked interrupt state of the UARTTXINTR interrupt.RO0x0
BitsDescriptionTypeReset
4RXMIS : Receive masked interrupt status. Returns the masked interrupt state of the UARTRXINTR interrupt.RO0x0
3DSRMMIS : nUARTDSR modem masked interrupt status. Returns the masked interrupt state of the UARTDSRINTR interrupt.RO-
2DCDMMIS : nUARTDCD modem masked interrupt status. Returns the masked interrupt state of the UARTDCDINTR interrupt.RO-
1CTSMMIS : nUARTCTS modem masked interrupt status. Returns the masked interrupt state of the UARTCTSINTR interrupt.RO-
0RIMMIS : nUARTRI modem masked interrupt status. Returns the masked interrupt state of the UARTRIINTR interrupt.RO-

UART: UARTICR Register

Offset: 0x044

Description

Interrupt Clear Register, UARTICR

Table 438. UARTICR Register

BitsDescriptionTypeReset
31:11Reserved.--
10OEIC : Overrun error interrupt clear. Clears the UARTOEINTR interrupt.WC-
9BEIC : Break error interrupt clear. Clears the UARTBEINTR interrupt.WC-
8PEIC : Parity error interrupt clear. Clears the UARTPEINTR interrupt.WC-
7FEIC : Framing error interrupt clear. Clears the UARTFEINTR interrupt.WC-
6RTIC : Receive timeout interrupt clear. Clears the UARTRTINTR interrupt.WC-
5TXIC : Transmit interrupt clear. Clears the UARTTXINTR interrupt.WC-
4RXIC : Receive interrupt clear. Clears the UARTRXINTR interrupt.WC-
3DSRMIC : nUARTDSR modem interrupt clear. Clears the UARTDSRINTR interrupt.WC-
2DCDMIC : nUARTDCD modem interrupt clear. Clears the UARTDCDINTR interrupt.WC-
1CTSMIC : nUARTCTS modem interrupt clear. Clears the UARTCTSINTR interrupt.WC-
0RIMIC : nUARTRI modem interrupt clear. Clears the UARTRIINTR interrupt.WC-

UART: UARTDMACR Register

Offset: 0x048

Description

DMA Control Register, UARTDMACR

Table 439. UARTDMACR Register

BitsDescriptionTypeReset
31:3Reserved.--
BitsDescriptionTypeReset
2DMAONERR : DMA on error. If this bit is set to 1, the DMA receive request outputs, UARTRXDMASREQ or UARTRXDMAREQ, are disabled when the UART error interrupt is asserted.RW0x0
1TXDMAE : Transmit DMA enable. If this bit is set to 1, DMA for the transmit FIFO is enabled.RW0x0
0RXDMAE : Receive DMA enable. If this bit is set to 1, DMA for the receive FIFO is enabled.RW0x0

UART: UARTPERIPHID0 Register

Offset: 0xfe0

Description

UARTPeriphID0 Register

Table 440.
UARTPERIPHID0
Register

BitsDescriptionTypeReset
31:8Reserved.--
7:0PARTNUMBER0 : These bits read back as 0x11RO0x11

UART: UARTPERIPHID1 Register

Offset: 0xfe4

Description

UARTPeriphID1 Register

Table 441.
UARTPERIPHID1
Register

BitsDescriptionTypeReset
31:8Reserved.--
7:4DESIGNER0 : These bits read back as 0x1RO0x1
3:0PARTNUMBER1 : These bits read back as 0x0RO0x0

UART: UARTPERIPHID2 Register

Offset: 0xfe8

Description

UARTPeriphID2 Register

Table 442.
UARTPERIPHID2
Register

BitsDescriptionTypeReset
31:8Reserved.--
7:4REVISION : This field depends on the revision of the UART: r1p0 0x0 r1p1 0x1 r1p3 0x2 r1p4 0x2 r1p5 0x3RO0x3
3:0DESIGNER1 : These bits read back as 0x4RO0x4

UART: UARTPERIPHID3 Register

Offset: 0xfec

Description

UARTPeriphID3 Register

Table 443.
UARTPERIPHD3
Register

BitsDescriptionTypeReset
31:8Reserved.--
7:0CONFIGURATION : These bits read back as 0x00RO0x00

UART: UARTPCELLID0 Register

Offset: 0xff0

Description

UARTPCellID0 Register

Table 444.
UARTPCELLID0
Register

BitsDescriptionTypeReset
31:8Reserved.--
7:0UARTPCELLID0 : These bits read back as 0x0DRO0x0d

UART: UARTPCELLID1 Register

Offset: 0xff4

Description

UARTPCellID1 Register

Table 445.
UARTPCELLID1
Register

BitsDescriptionTypeReset
31:8Reserved.--
7:0UARTPCELLID1 : These bits read back as 0xF0RO0xf0

UART: UARTPCELLID2 Register

Offset: 0xff8

Description

UARTPCellID2 Register

Table 446.
UARTPCELLID2
Register

BitsDescriptionTypeReset
31:8Reserved.--
7:0UARTPCELLID2 : These bits read back as 0x05RO0x05

UART: UARTPCELLID3 Register

Offset: 0xffc

Description

UARTPCellID3 Register

Table 447.
UARTPCELLID3
Register

BitsDescriptionTypeReset
31:8Reserved.--
7:0UARTPCELLID3 : These bits read back as 0xB1RO0xb1