BAT32G1x9 user manual | Chapter 19 Universal serial communication unit
682 / 1149
Rev.1.02
19.7 Operation of UART (UART0~UART3) communication
This is a function of asynchronous communication over two lines: Serial Data Transmission (TxD) and
Serial Data Receiving (RxD). Using these two communication lines, data is sent and received asynchronously
(using the internal baud rate) data frame (consisting of start bits, data, parity bits, and stop bits) with other
communicators. Full-duplex asynchronous UART communication can be achieved by using two channels
dedicated for transmit (even channel) and receive dedicated (odd channel).
[Sending and receiving data].
• 7-bit, 8-bit, or 9-bit data length
note
(SCI0).
Data length from 7 to 16 bits (SCI1/SCI2).
•
MSB/LSB preferred
• Level setting for sending and receiving data (select whether the level is reversed).
• Additional, parity function of parity bits
• Stop bit attachment, stop bit detection function
[Interrupt function].
• Transmit end interrupt, buffer empty interrupt
• Error interrupts caused by frame errors, parity errors, and overflow errors
[Error Detection Flag].
• Frame error, parity error, overflow error
Note Only
UART0
supports
9
bits of data length.
UART0 uses channel 0 and channel 1 of SCI0.
UART1 uses CHANNEL 2 and CHANNEL 3 of SCI0.
UART2 uses CHANNEL 0 and CHANNEL 1 of SCI1.
UART3 uses CHANNEL 0 and CHANNEL 1 of SCI2.
Each channel arbitrarily selects one function to use, except for the selected function, other functions can not
be run.
For example, SSPI00 and IIC01 cannot be used when using UART0 for channel 0 and channel 1 of unit 0.
However, while using UART0, channels 2 and 3 of different channels can use SSPI10, UART1, or IIC10
。
Note that when used as A UART, the sender (even channel) and receiver (odd channel) can only be used for UART.
UART has the following 4 kinds of communication operation:
• UART send (see 19.7.1).
• UART reception (see 19.7.2).