295
CHAPTER 8 APPLICATIONS OF SERIAL INTERFACE
(f)
Limitation when using UART mode
In the UART mode, the reception completion interrupt (INTSR) occurs a certain time after the reception
error interrupt (INTSER) has occurred and cleared. As a result, the following phenomenon may take place.
Description
If bit 1 (ISRM) of the asynchronous serial interface mode register (ASIM) is set to 1, the reception
completion interrupt (INTSR) does not occur when a reception error occurs. If the receive buffer register
(RXB) is read at certain timing (a in Figure 8-42) during reception error interrupt (INTSER) processing,
the internal error flag is cleared to 0. Therefore, it is judged that a reception error has not occurred,
and INTSR, which should not occur, occurs. Figure 8-42 illustrates this operation.
Figure 8-42. Timing of Reception Completion Interrupt (when ISRM = 1)
Remark
ISRM : Bit 1 of asynchronous serial interface mode register (ASIM)
f
SCK
: Source clock of 5-bit counter of baud rate generator
RXB : Receive buffer register
To prevent this phenomenon, take the following measures:
Preventive measures
In case of framing error or overrun error
Disable the receive buffer register (RXB) from being read for a certain period (T2 in Figure 8-43)
after the receive error interrupt (INTSER) has occurred.
In case of parity error
Disable the receive buffer register (RXB) from being read for a certain period (T1 + T2 in Figure
8-43) after the reception error interrupt (INTSER) has occurred.
INTSER (when framing
overrun error occurs)
Error flag
(internal flag)
INTSR
Interrupt routine
of CPU
Cleared when RXB
is read
Reads RXB
It is judged that receive error has not
occurred, and INTSR occurs.
f
SCK
a