• Receiving Serial Data: Follow the procedure below for receiving serial data. When switching
from asynchronous mode to clocked synchronous mode, be sure to check that PER and FER are
cleared to “0.” If PER or FER is set to “1” the RDRF bit will not be set and both transmitting and
receiving will be disabled.
Figure 8-15. Sample Flowchart for Serial Receiving
Start receiving
Read RDRF bit in SSR
RDRF = “1”?
Read receive data
from RDR, and clear
RDRF bit to “0” in SSR
ORER = “1”?
Read ORER in SSR
Finished
receiving?
Clear RE to “0” in SCR
End
Error handling
1
2
3
No
Yes
Yes
No
No
Yes
4
1.
SCI initialization: the receive data function of the RxD pin is
selected automatically.
3.
To continue receiving serial data: read RDR and clear RDRF to
“0” before the MSB (bit 7) of the current frame is received.
4.
Receive error handling: if a receive error occurs, read the ORER
bit in SSR then, after executing the necessary error handling,
clear ORER to “0.” Neither transmitting nor receiving can
resume while ORER remains set to “1.” When clock output
mode is selected, receiving can be halted temporarily by
receiving one dummy byte and causing an overrun error.
When preparations to receive the next data are completed, clear
the ORER bit to “0.” This causes receiving to resume, so
Clear ORER to “0” in SSR
Return
Overrun error handling
2.
SCI status check and receive data read: read the serial status
register (SSR), check that RDRF is set to “1,” then read receive
data from the receive data register (RDR) and clear RDRF to “0.”
Transition of the RDRF bit from “0” to “1” can be reported by an
RXI interrupt.
return to the step marked 2 in the flowchart.
Start error handling
Initialize
202
Summary of Contents for H8/326 Series
Page 67: ...58 ...
Page 121: ...112 ...
Page 274: ... 3 Clock Settling Timing Ø VCC RES STBY tOSC1 tOSC1 Figure 14 8 Clock Setting Timing 265 ...
Page 279: ...270 ...