Read OER flag in SSR
Read RDRF flag in SSR
No
Read receive data in RDR
Yes
All data received?
Clear RE bit in SCR3 to 0
[4]
Overrun error processing
Clear OER flag in SSR to 0
Figure 13-13 Sample Serial Reception Flowchart(Clocked Synchronous Mode)
Rev. 1.0, 03/01, page 180 of 280
Start reception
OER = 1
No
Error processing
(Continued below)
RDRF = 1
Yes
No
<End>
Error processing
<End>
[1]
Read the OER flag in the serial status
register (SSR) to determine if there is an
[1]
error. If an overrun error has occurred,
execute overrun error processing.
[2]
Read SSR and check that the RDRF flag is
Yes
set to 1, then read the receive data in RDR.
When data is read from RDR, the RDRF
[4]
flag is automatically cleared to 0.
[3]
To continue serial reception, before the
MSB (bit 7) of the current frame is received,
reading the RDRF flag, reading RDR, and
clearing the RDRF flag to 0 should be
[2]
finished. When data is read from RDR, the
RDRF flag is automatically cleared to 0.
[4]
If an overrun error occurs, read the OER
flag in SSR, and after performing the
appropriate error processing, clear the OER
[3]