257
Receiving: Figure 10.16 shows a typical flow chart for receiving data. After SCI3 initialization,
follow the procedure below.
Start
Read bit OER in SSR
Read bit RDRF in SSR
Read received data in RDR
OER = 1?
Continue
receiving?
Clear bit RE in SCR3 to 0
End
Clear bit OER in
SSR to 0
1
3
4
4
2.
3.
4.
Read the serial status register (SSR), and after
confirming that bit RDRF = 1, read received
data from the receive data register (RDR).
When data is read from RDR, RDRF is
automatically cleared to 0.
1. Read bit OER in the serial status register (SSR)
to determine if an error has occurred. If an
overrun error has occurred, overrun error
processing is executed.
To continue receiving data, read bit RDRF and
read the received data in RDR before the MSB
(bit 7) of the present frame is received.
When data is read from RDR, RDRF is
automatically cleared to 0.
When an overrun error occurs, read bit OER in
SSR. After the necessary error processing,
be sure to clear OER to 0.
Data receiving cannot be resumed while bit
OER is set to 1.
Yes
Yes
No
No
RDRF = 1?
No
Yes
Overrun error
processing
Start overrun
processing
End overrun
error processing
Overrun error processing
2
Figure 10.16 Typical Data Receiving Flow Chart in Synchronous Mode