Introduction

The Universal Asynchronous Receiver/Transmitter (UART) offers a flexible means of full-duplex data exchange with external equipment that requires an industry-standard NRZ asynchronous serial data format. It offers a very wide range of baud rates using a fractional baud rate generator. Furthermore, numerous optimizations have been implemented for this IP: to address complex interference environments, a debounce function has been incorporated into the receiving path; to enable receiver wake-up in low-power scenarios, a dedicated receiving clock source has been introduced, coupled with an adaptive baud rate drift correction circuit.

Features

RTL8721Dx:
  • UART x 4

    • Two general UART interfaces: UART0 and UART1

    • One internal BT UART interface: UART2_BT

    • One specific UART as LOGUART

  • Various UART format: 1 start bit, 7/8 data bits, 0/1 parity bit and 1/2 stop bits

  • Independent clocks for Tx path and Rx path

    • Tx path: XTAL 40MHz

    • Rx path: XTAL 40MHz, OSC 2MHz

  • Fractional baud rate

    • Up to 8 Mbps within high-speed mode (XTAL 40MHz)

    • Up to 115.2 kbps within low-power mode (OSC 2MHz)

  • Asynchronous Transmit/Receive FIFO

  • Configurable Auto Flow Control

  • Interrupt control and error detection

  • IrDA (SIR mode) encoder and decoder module

  • Support loopback mode

  • Low power mode for Rx path

  • Support Rx path monitor

  • UART Rx timeout mechanism

  • DMA interface for DMA transfer

    • GDMA as DMA Tx/Rx flow controller

    • UART as DMA Rx flow controller

  • Operation mode

    • Polling mode

    • Interrupt mode

    • DMA mode

Block Diagram

The block diagram of UART is illustrated below.

../../../_images/uart_block_diagram.svg

The UART consists of several sub-modules, which provide the following functions:

  • dma_intf

    • DMA control unit

    • Interface with GDMA module

RTL8721Dx:
  • tx_fifo

    • 16 x 11-bit entries for UART0/1

    • 32 x 11-bit entries for UART2_BT

  • rx_fifo

    • 64 x 11-bit entries for UART0/1

    • 32 x 11-bit entries for UART2_BT

  • xmitckt

    • Shift register

    • Generate UART format data

    • Support fractional baud rate

  • irda_sir_encoder

    • SIR encoder of UART Tx data

  • recvckt

    • Receive UART format data

    • Error detection

    • Interrupt control

    • Support fractional baud rate

    • Oscillator (OSC) clock for low power

    • Monitor and eliminate Rx baud rate error and own frequency drift

  • irda_sir_decoder

    • SIR decoder of UART Rx data

  • apb_slv_wrap

    • APB3 bus interface

  • regmng

    • Register control unit