English
Language : 

HD6473032F16 Datasheet, PDF (514/847 Pages) Renesas Technology Corp – Hardware Manual Renesas 16-Bit Single-Chip Microcomputer H8 Family/H8/300H Series
Section 13 Serial Communication Interface
• Receiving Serial Data
Figure 13.18 shows a sample flowchart for receiving serial data and indicates the procedure to
follow. When switching from asynchronous mode to synchronous mode, make sure that the
ORER, PER, and FER flags are cleared to 0. If the FER or PER flag is set to 1 the RDRF flag
will not be set and both transmitting and receiving will be disabled.
Initialize
1
1. SCI initialization: the receive data function
of the RxD pin is selected automatically.
Start receiving
Read ORER flag in SSR
2
2, 3. Receive error handling: if a receive error
occurs, read the ORER flag in SSR, then
after executing the necessary error
handling, clear the ORER flag to 0. Neither
transmitting nor receiving can resume
while the ORER flag remains set to 1.
ORER = 1?
No
Yes
3
Error handling
continued on next page
4. SCI status check and receive data read:
read SSR, check that the RDRF flag is set
to 1, then read receive data from RDR and
clear the RDRF flag to 0. Notification that
the RDRF flag has changed from 0 to 1 can
also be given by the RXI interrupt.
Read RDRF flag in SSR
4
No
RDRF = 1?
Yes
5. To continue receiving serial data: check the
RDRF flag, read RDR, and clear the RDRF
flag to 0 before the MSB (bit 7) of the
current frame is received. If the DMAC is
activated by a receive-data-full interrupt
request (RXI) to read RDR, the RDRF flag
is cleared automatically.
Read receive data
from RDR, and clear
5
RDRF flag to 0 in SSR
No
Finished
receiving?
Yes
Clear RE bit to 0 in SCR
End
Figure 13.18 Sample Flowchart for Serial Receiving (1)
Rev. 3.00 Mar 21, 2006 page 484 of 814
REJ09B0302-0300