
CHAPTER 14 SERIAL INTERFACE UART2
User
’
s Manual U13655EJ2V1UD
215
(d) Reception
When bit 6 (RXE2) of asynchronous serial interface mode register 2 (ASIM2) is set to 1, a receive
operation is enabled and sampling of the RxD2n pin input is performed.
RxD2n pin input sampling is performed using the serial clock specified by asynchronous serial interface
function register 2 (ASIF2).
When the RxD2n pin input becomes low
and when half the time determined by the specified baud rate has passed, the data sampling start timing
signal is output. If the RxD2n pin input is sampled again by this start timing signal and the result is
low
performed. When character data, a parity bit, and one stop bit are detected after the start bit, reception
of one frame of data ends.
When one frame of data has been received, the receive data in the shift register is transferred to receive
buffer register 2 (RXB2), and a reception completion interrupt request (INTSR2) is generated.
Even if an error occurs, the receive data in which the error occurred is still transferred to RXB2. INTSR2
is generated if bit 2 (ISRM2) of ASIM2 is cleared to 0 upon occurrence of the error (see
Figure 14-9
). If
the ISRM2 bit is set to 1, INTSR2 is not generated.
If the RXE2 bit is reset to 0 during the receive operation, the receive operation is stopped immediately. In
this case, the contents of RXB2 and ASIS2 are not changed, and INTSR2 is not generated.
Figure 14-8 shows the asynchronous serial interface reception completion interrupt request generation
timing.
Note
, the 5-bit counter of the baud rate generator starts counting,
Note
, it is identified as a start bit, the 8-bit counter is initialized and starts counting, and data sampling is
Note
Positive logic: Low level; Negative logic: High level
Figure 14-8. Generation Timing of Asynchronous Serial Interface Reception Completion Interrupt Request
Cautions 1. Receive buffer register 2 (RXB2) must be read even if a receive error occurs. If RXB2 is
not read, an overrun error will occur when the next data is received, and the receive-
error state will continue indefinitely.
2.
To select TxD21 and RxD21, set bit 0 (TSL2) of the UART pin switching register (UTCH0)
to 1 (TxD20 and RxD20 are selected by default).
Remark
n = 0, 1
Positive logic
R
X
D2n (input)
INTSR2
D0
START
D1
D2
D6
D7
Parity
STOP
Negative logic
R
X
D2n (input)
D0
START
D1
D2
D5
D6
D7
STOP