
R8C/3JM Group
22. Serial Interface (UARTi (i = 0 or 1))
R01UH0285EJ0100 Rev.1.00
Aug 08, 2011
22.3
Clock Synchronous Serial I/O Mode
In clock synchronous serial I/O mode, data is transmitted and received using a transfer clock.
i = 0 or 1
Notes:
1. When an external clock is selected, the requirements must be met in either of the following states:
- The external clock is held high when the CKPOL bit in the UiC0 register is set to 0 (transmit data
output at the falling edge and receive data input at the rising edge of the transfer clock)
- The external clock is held low when the CKPOL bit in the UiC0 register is set to 1 (transmit data
output at the rising edge and receive data input at the falling edge of the transfer clock)
2. If an overrun error occurs, the receive data (b0 to b8) in the UiRB register will be undefined.
The IR bit in the SiRIC register remains unchanged.
Table 22.2
Clock Synchronous Serial I/O Mode Specifications
Item
Specification
Transfer data format
Transfer data length: 8 bits
Transfer clocks
The CKDIR bit in the UiMR register is set to 0 (internal clock): fi/(2(n+1))
fi = f1, f8, f32, fC n = setting value in the UiBRG register: 00h to FFh
The CKDIR bit is set to 1 (external clock): Input from the CLKi pin
Transmit start conditions
To start transmission, the following requirements must be met:
(1)- The TE bit in the UiC1 register is set to 1 (transmission enabled).
- The TI bit in the UiC1 register is set to 0 (data present in the UiTB
register).
Receive start conditions
To start reception, the following requirements must be met:
(1)- The RE bit in the UiC1 register is set to 1 (reception enabled).
- The TE bit in the UiC1 register is set to 1 (transmission enabled).
- The TI bit in the UiC1 register is set to 0 (data present in the UiTB
register).
Interrupt request
generation timing
For transmission: One of the following can be selected.
- The UiIRS bit is set to 0 (transmit buffer empty):
When data is transferred from the UiTB register to the UARTi transmit
register (at start of transmission).
- The UiIRS bit is set to 1 (transmission completed):
When data transmission from the UARTi transmit register is completed.
For reception:
When data is transferred from the UARTi receive register to the UiRB
register (at completion of reception).
Error detection
This error occurs if the serial interface starts receiving the next unit of data
before reading the UiRB register and receives the 7th bit of the next unit of
data.
Selectable functions
CLK polarity selection
Transfer data input/output can be selected to occur synchronously with the
rising or the falling edge of the transfer clock.
LSB first, MSB first selection
Whether transmitting or receiving data begins with bit 0 or begins with bit 7
can be selected.
Continuous receive mode selection
Reception is enabled immediately by reading the UiRB register.