CMS32L051 User Manual |Chapter 12 Universal Serial Communication Unit
www.mcu.com.cn 412 / 703
12.7 Operation of UART (UART0~UART2) communication
This is a function that communicates asynchronously through a total of two lines: serial data transmission
(TxD) and serial data reception (RxD). Using these two communication lines, data that are transmitted and
received asynchronously (using internal baud rate) with other communicating parties in data frames (consisting
of start bits, data, parity bits, and stop bits) are used to send and receive data. Full-duplex asynchronous UART
communication can be achieved by using two channels, send private (even channels) and receive private (odd
channels).
[Transmit and receive data]
7-bit, 8-bit or 9-bit data length
Note
•
MSB/LSB preferred choice
Level settings for sending and receiving data (choose whether the level is inverted).
Parity bit appending and parity check functions
Stop bit appending, and stop bit detection function
[Interrupt function]
End of transfer interrupt, buffer empty interrupt
Error interrupts caused by frame errors, parity errors, and overflow errors
[Error detection flag]
Frame errors, parity errors, overflow errors
Note that only UART0 supports 9-bit data length.
UART0 uses channel 0 and channel 1 of SCI0.
UART1 uses channels 2 and 3 of SCI0.
UART2 uses Channel 0 and Channel 1 of SCI1.
Each channel can choose a function to use, except for the selected function, other functions can not
operate.
For example, when UART0 is used for channel 0 and channel 1 of unit 0, SSPI00 and IIC01 cannot be
used. However, while using UART0, channels 2 and 3 of different channels can use SSPI10, UART1, or SUDs
IIC10.
Note When used as a UART, the sender (even channels) and receivers (odd channels) can only be used for the UART.
UART has the following 4 types of communication operations:
(see 12.7.1).
12.7.2).