NXP Semiconductors
QN902x
User Manual of QN902x
UM10996
All information provided in this document is subject to legal disclaimers.
© NXP Semiconductors N.V. 2018. All rights reserved.
User Manual
Rev 1.3
— 05 November 2018
90 of 128
12.
UART
The Universal Asynchronous Receiver Transmitter (UART) is a full-duplex, asynchronous
communication interface that communicates with peripheral devices. The QN902x has
two UARTs which can work and be configured independently. The UART shares pins
with the SPI interface.
12.1
Features
Configurable full-duplex or half-duplex data transmission
Hardware flow control option with nRTS and nCTS pins
Programmable baud rate generator, from 1.2kbps, to 921600bps standard
baud rate
Programmable data order with MSB-first or LSB-first shifting
One or Two Stop bits
Odd, even or no-parity bit generation and detection
Receive and transmit data buffer (one depth)
Configurable over-sampling rate (8 or 16)
Parity, buffer overrun and framing error detection
Transmit and receive interrupts
Support for Direct Memory Access (DMA)
Line break generation and detection
Configurable start- and stop- bit levels
8-bit payload mode: 8-bit data without parity
9-bit payload mode: 8-bit data plus parity
12.2
Functional Description
The UART allows asynchronous, serial communication between the MCU and external
devices. Each UART offers a variety of data formatting options. Dedicated baud rate
generator with 22-bit divisor is included, which can generate a wide range of baud
rates. Receive data buffer allows UART to receive up to 8 bits data before data is lost
and an overflow occurs.
Each UART has five registers. The UART_BAUD is used for the Baud Rate Generator. The
UART_CR is used for data formatting, control, and interrupt functions. The UART_Flag is
used for status functions. The UART_TXD and UART_RXD are used to send and receive
data.
The application software can manage the communication by polling the status flag or
using a dedicated UART interrupt. The main elements of the UART and their interactions
are shown in the following block diagram.