
219
CHAPTER 13 ASYNCHRONOUS SERIAL INTERFACE
User
’
s Manual U15017EJ2V0UD
(e) Receive error
Errors that occur during reception are of three types: parity errors, framing errors, and overrun errors. As
the data reception result error flag is set inside the asynchronous serial interface status register 0 (ASIS0),
the receive error interrupt (INTSER0) is generated. A receive error interruption is generated before a receive
end interrupt (INTSR0). Receive error causes are shown in Table 13-6.
What type of error has occurred during reception can be detected by reading the contents of the asynchronous
serial interface status register 0 (ASIS0) during processing of the receive error interrupt (INTSER0) (refer
to
Table 13-6
and
Figure 13-9
).
The contents of ASISn are reset to 0 either when the receive buffer register 0 (RXB0) is read or when the
next data is received (If the next data has an error, this error flag is set).
Table 13-6. Receive Error Causes
Receive Error
Cause
ASIS0
Parity error
Parity specified for transmission and parity of receive data don
’
t match
04H
Framing error
Stop bit was not detected
02H
Overrun error
Next data reception was completed before data was read from the receive buffer register
01H
Figure 13-9. Receive Error Timing
Note
If a receive error occurs, when bit ISRM0 is set (1), INTSR0 is not generated.
Cautions 1. The contents of ASIS0 are reset to 0 either when the receive buffer register 0 (RXB0)
is read or when the next data is received. To find out the contents of the error, be
sure to read ASIS0 before reading RXB0.
2. Be sure to read the receive buffer register 0 (RXB0) even when a receive error occurs.
If RXB0 is not read, an overrun error will occur at reception of the next data, and the
receive error status will continue indefinitely.
STOP
Parity
D7
D6
D2
D1
D0
START
RxD0 (input)
INTSR0
Note
INTSER0
(framing/overrun
errors occur)
INTSER0
(when parity
errors occur)