Datasheet

Table Of Contents
Section 18 Serial Communication Interface 4 (SCI4)
Rev. 2.00 Jul. 04, 2007 Page 426 of 692
REJ09B0309-0200
18.4.5 Data Reception
Figure 18.6 shows an example flowchart of data reception. Data reception should be performed as
the following procedure after the SCI4 initialization.
Read ORER in SCSR4
ORER = 1?
Read received data in RDR4
RDRF = 1?
Read RDRF in SCSR4
Data transfer will
continue?
Clear RE bit in SCR4 to 0
Note: Hatching area indicates SCI internal operation.
No
Yes
No
Yes
Yes
No
[1] Pin SI4 functions as input pin for receive
data
[2][3] When a reception error occurs, read the ORER
flag in SCSR4 and then clears the ORER flag
to 0 after executing the error processing. When
the ORER flag is set to 1, both transmission
and reception cannot be restarted.
[4] After reading SCSR4 and confirming RDRF = 1,
read the receive data in RDR4. The RDRF flag
is automatically cleared to 0. Changes in the
RDRF flag from 0 to 1 can be notified by an RXI
interrupt.
[5] To consecutively receive data, reading the RDRF
flag and RDR4 must be completed before
receiving the MSB (bit 7) of the current frame.
[1]
[2]
[5]
Initialization
Start reception (RE = 1)
RDRF cleared to 0 automatically
<Reception completed>
Clear ORER flag in SCSR4 to 0
Error processing
Overrun error processing
<Completed>
Error
processing
(Shown below)
[4]
[3]
[3]
Figure 18.6 Flowchart Example of Data Reception