360
CHAPTER 14 ASYNCHRONOUS SERIAL INTERFACE/3-WIRE SERIAL I/O
14.5 Cautions
(1) An asynchronous serial interface mode register (ASIM) rewrite should not be performed during a transmit operation.
If an ASIM rewrite is performed during a transmit operation, subsequent transmit operations may not be possible
(normal operation is restored by RESET input). Software can determine whether transmission is in progress by using
a transmission completion interrupt (INTST) or the interrupt request flag (STIF) set by INTST.
(2) After RESET input the transmit shift register (TXS) is emptied but a transmission completion interrupt is not
generated. A transmit operation can be started by writing transmit data to the TXS.
(3) The receive buffer (RXB) must be read even if there is a receive error. If RXB is not read, an overrun error will occur
when the next data is received, and the receive error state will continue indefinitely.
(4) To disable the reception completion interrupt when a reception error occurs, make sure that wait time equivalent
to two pulses of the clock that serves as the reference of the baud rate clock elapse after the reception error occurs
until the receive buffers (RXB, RXB2) are read. If the wait time is not inserted, the reception completion interrupt
occurs even when it is disabled.
The wait time equivalent to two pulses of the clock that serves as the reference of the baud rate clock can be
calculated by the following expression:
Wait time =
2
n+2
f
CLK
Remark
f
CLK
: Internal system clock frequency
n
: Value of baud rate generator control registers (BRGC, BRGC2) to select tap of 12-bit prescaler (n
= 0 to 11)
(5) The contents of the asynchronous serial interface status register (ASIS) are cleared (0) by reading the receive buffer
(RXB) or by reception of the next data. If you want to find the details of an error, therefore, ASIS must be read before
reading RXB.
(6) In the 3-wire serial I/O mode, even if the DIRn (n = 1, 2) bit of the clocked serial interface mode register (CSIMn:
n = 1, 2) is changed after writing to the shift register (SIOn: n = 1, 2), data is output with the setting before change.
Therefore, set the DIRn bit before writing to SIOn.
(7) The baud rate generator control register (BRGC) should not be written to during communication. If a write instruction
is executed, the 5-bit counter and 1/2 frequency divider operations will be reset, and the generated baud rate clock
may be disrupted, preventing normal communication from continuing.