338
CHAPTER 14 ASYNCHRONOUS SERIAL INTERFACE/3-WIRE SERIAL I/O
14.2.7 Receive errors
Three kinds of errors can occur in a receive operation: parity errors, framing errors and overrun errors. As the result
of data reception, an error flag is raised in the asynchronous serial interface status register (ASIS) and a receive error
interrupt (INTSER) is generated. Receive error causes are shown in Table 14-2.
It is possible to detect the occurrence of any of the above errors during reception by reading the contents of the ASIS
(refer to
Figures 14-4
and
14-8
).
The contents of the ASIS register are cleared (0) by reading the receive buffer (RXB) or by reception of the next data
(if there is an error in the next data, the corresponding error flag is set).
Table 14-2. Causes of Receive Error
Receive Error
Cause
Parity error
Transmit data parity specification and receive data parity do not match
Framing error
Stop bit not detected
Overrun error
Reception of next data completed before data is read from receive buffer
Figure 14-8. Timing of Receive Error
Note
If a receive error occurs while the ISRM bit is set (1), INTSR is not generated.
Remark
In the
m
PD784046, a break signal cannot be detected by hardware. As a break signal is a low-level signal
of two characters or more, a break signal may be judged to have been input if software detects the occurrence
of two consecutive framing errors in which the receive data was 00H. The chance occurrence of two
consecutive framing errors can be distinguished from a break signal by having the RxD pin level read by
software (confirmation is possible by setting “1” in bit 2 of the port 3 mode register (PM3) and reading port 3
(P3)) and confirming that it is “0”.
STOP
Parity
D0
START
RxD (Input)
INTSR
Note
D1
D2
D6
D7
INTSER