CHAPTER 15 SERIAL INTERFACE UART2
295
User
’
s Manual U14260EJ3V1UD
(e) Receive errors
Three types of errors can occur during a receive operation: a parity error, framing error, or overrun error.
If, as the result of data reception, an error flag is set in asynchronous serial interface status register 2 (ASIS2),
a receive error interrupt request (INTSR2/INTSER2) will occur. Table 15-9 lists the causes behind receive
errors.
As part of receive error interrupt request (INTSR2/INTSER2) servicing, the contents of ASIS2 can be read
to determine which type of error occurred during the receive operation (see
Table 15-9
and
Figure 15-18
).
The contents of ASIS2 are reset (to 0) when receive buffer register 2 (RXB2) is read or when the next data
is received (if the next data contains an error, its error flag will be set).
Table 15-9. Causes of Receive Errors
Receive Error
Cause
Parity error
Specified parity does not match parity of receive data
Framing error
Stop bit was not detected
Overrun error
Reception of the next data was completed before data was read from receive buffer
register 2 (RXB2)
Caution
Even if data is written to TXB2 when data remains in transmit buffer register 2 (TXB2), an
overrun error will not occur.
Figure 15-18. Receive Error Timing
Cautions 1. The contents of asynchronous serial interface status register 2 (ASIS2) are reset (to
0) when receive buffer register 2 (RXB2) is read or when the next data is received. To
obtain information about the error, be sure to read the contents of ASIS2 before reading
RXB2.
2. Be sure to read the contents of receive buffer register 2 (RXB2) even when a receive
error has occurred. Overrun errors will occur during the next data receive operations
and the receive error status will remain until the contents of RXB2 are read.
Note
The interrupts can be divided into INTSR2 and INTSER2 by setting bit 0 (ISEM2) of asynchronous
serial interface mode register 2 (ASIM2) to 1.
RxD0 (input)
D0
D1
D2
D6
D7
Parity
STOP
START
INTSR2 or INTSER2
Note