251
SCI3 operates as follows when receiving serial data in asynchronous mode.
SCI3 monitors the communication line, and when a start bit (0) is detected it performs internal
synchronization and starts receiving. The communication format for data receiving is as outlined
in table 10.14. Received data is set in RSR in order of LSB to MSB, then the parity bit and stop
bit(s) are received. After receiving the data, SCI3 performs the following checks:
•
Parity check: The number of 1s in receive data is checked to see if it matches the odd or even
parity selected in bit PM of SMR.
•
Stop bit check: The stop bit is checked for a value of 1. If there are two stop bits, only the first
bit is checked.
•
Status check: The RDRF bit is checked for a value of 0 to make sure received data can be
transferred from RSR to RDR.
If no receive error is detected by the above checks, bit RDRF is set to 1 and the received data is
stored in RDR. At that time, if bit RIE in SCR3 is set to 1, an RXI interrupt is requested. If the
error check detects a receive error, the appropriate error flag (OER, PER, or FER) is set to 1.
RDRF retains the same value as before the data was received. If at this time bit RIE in SCR3 is set
to 1, an ERI interrupt is requested.
Table 10.15 gives the receive error detection conditions and the processing of received data in
each case.
Note:
Data receiving cannot be continued while a receive error flag is set. Before continuing the
receive operation it is necessary to clear the OER, FER, PER, and RDRF flags to 0.
Table 10.15 Receive Error Conditions and Received Data Processing
Receive Error
Abbrev.
Detection Conditions
Received Data Processing
Overrun error
OER
Receiving of the next data ends while
bit RDRF in SSR is still set to 1
Received data is not
transferred from RSR to RDR
Framing error
FER
Stop bit is 0
Received data is transferred
from RSR to RDR
Parity error
PER
Received data does not match the
parity (odd/even) set in SMR
Received data is transferred
from RSR to RDR