
16.1.2
Clock Asynchronous Serial Interface (UART) Mode
In UART mode, a baud rate and transfer data format can be selected to transmit and receive data.
Table 16.7lists specifications of UART mode.
Table 16.7
UART Mode Specifications
NOTES:
1. Bits CNT3 to CNT0 in the TCSPR register select no division (n = 0) or divide-by-2n (n = 1 to 15).
2. If an overrun error occurs, the content of the UiRB register is undefined. The IR bit in the SiRIC register remains
unchanged as 0 (interrupt not requested).
Item
Specification
Transfer data format
Transfer data length: selectable among 7 bits, 8 bits, or 9 bits long
Start bit: 1 bit long
Parity bit: selectable among odd, even, or none
Stop bit: selectable from 1 bit or 2 bits long
Baud rate
When the CKDIR bit in the UiMR register (i = 0 to 4) is set to 0 (internal clock):
fj / (16 (m + 1))
fj = f1, f8, f2
n(1) m: setting value of the UiBRG register, 00h to FFh
When the CKDIR bit is set to 1 (external clock):
fEXT / (16 (m + 1))
fEXT: clock input to the CLKi pin
Transmit/receive control
Selectable among CTS function, RTS function or CTS/RTS function disabled
Transmit start condition
To start transmit operation, the following must be met:
Set the TE bit in the UiC1 register to 1 (transmit operation enabled)
The TI bit in the UiC1 register is 0 (data in the UiTB register)
Apply a low-level (“L”) signal to the CTSi pin when the CTS function is selected
Receive start condition
To start receive operation, the following must be met:
Set the RE bit in the UiC1 register to 1 (receive operation enabled)
The start bit is detected
Interrupt request generation timing While transmitting, one of the following conditions can be selected:
The UiIRS bit in the UiC1 register is set to 0 (no data in the UiTB register):
when data is transferred from the UiTB register to the UARTi transmit register
(transmit operation started)
The UiIRS bit is set to 1 (transmit operation completed):
when data transmit operation from the UARTi transfer register is completed
While receiving,
When data is transferred from the UARTi receive register to the UiRB register
(receive operation completed)
Error detection
Overrun error occurs when the last bit preceding the final stop bit of the next
data (the first stop bit when selecting 2 stop bits) is received before reading the
UiRB register
Framing error
Framing error occurs when the number of the stop bits set with the STPS bit in
the UiMR register is not detected
Parity error
Parity error occurs when parity is enabled and the received data does not have
the correct even or odd parity set with the PRY bit in the UiMR register.
Error sum flag
Error sum flag is set to 1 when any of overrun, framing, and parity errors occurs
Selectable function
LSB first or MSB first
Data is transmitted or received from either bit 0 or bit 7
Serial data logic inverse
Transmit and receive data are logically inverted. The start bit and stop bit are
not inverted
TXD and RXD I/O polarity inverse
The level output from the TXD pin and the level applied to the RXD pin are
inverted.