Rev. 2.00, 09/03, page 411 of 690
c. Serial Data Reception
Figures 16.7 and 16.8 show sample flowcharts for serial reception.
Use the following procedure for serial data reception after enabling the SCIF for reception.
Read DR, ER, and BRK flags in SCSSR
Read RDF flag in SCSSR
Read receive data from SCFRDR,
and clear RDF flag in SCSSR to 0
Clear RE bit in SCSCR to 0
[1] Receive error handling and break detection:
Read the DR, ER, and BRK flags in SCSSR to
identify any error, perform the appropriate error
handling, then clear the DR, ER, and BRK flags to 0.
In the case of a framing error, a break can also be
detected by reading the value of the RxD pin.
[2] SCIF status check and receive data read:
Read SCSSR and check that RDF = 1, then read the
receive data in SCFRDR, read 1 from the RDF flag,
and then clear the RDF flag to 0. The transition of the
RDF flag from 0 to 1 can also be identified by an RXI
interrupt.
[3] Serial reception continuation procedure:
To continue serial reception, read at least the receive
trigger set number of data bytes from SCFRDR, read
1 from the RDF flag, and then clear the RDF flag to
0. The number of receive data bytes in SCFRDR can
be ascertained by reading the lower bits of SCFDR.
Start of reception
End of reception
DR V ER V BRK = 1?
Yes
No
RDF = 1?
No
Yes
All data received?
No
Yes
Error handling
[3]
[2]
[1]
Figure 16.7 Sample Serial Reception Flowchart (1)
Summary of Contents for SH7705
Page 2: ......
Page 70: ...Rev 2 00 09 03 page 24 of 690 ...
Page 194: ...Rev 2 00 09 03 page 148 of 690 ...
Page 284: ...Rev 2 00 09 03 page 238 of 690 ...
Page 338: ...Rev 2 00 09 03 page 292 of 690 ...
Page 354: ...Rev 2 00 09 03 page 308 of 690 ...
Page 374: ...Rev 2 00 09 03 page 328 of 690 ...
Page 420: ...Rev 2 00 09 03 page 374 of 690 ...
Page 476: ...Rev 2 00 09 03 page 430 of 690 ...
Page 482: ...Rev 2 00 09 03 page 436 of 690 ...
Page 552: ...Rev 2 00 09 03 page 506 of 690 ...
Page 630: ...Rev 2 00 09 03 page 584 of 690 ...
Page 739: ...SH7705 Group Hardware Manual REJ09B0082 0200O ...