RX610 Group
20. Serial Communications Interface (SCI)
R01UH0032EJ0120 Rev.1.20
Page 674 of 1006
Feb 20, 2013
20.7
Usage Notes
20.7.1
Setting the Module Stop Function
Operation of the SCI can be disabled or enabled using the module stop control register B (MSTPCRB). The initial setting
is for operation of the SCI to be halted. Register access is enabled by clearing the module stop state. For details, see
section 8, Low Power Consumption.
20.7.2
Break Detection and Processing
When a framing error is detected, a break can be detected by reading the RxDn pin value directly. In a break, the input
from the RxDn pin becomes all 0s, and so the FER flag in SSR is set to 1 (framing error), and the PER flag in SSR may
also be set to 1 (parity error). The SCI continues the receive operation even after a break is received. Therefore, note that
even if the FER flag is cleared to 0 (no framing error), it will be set to 1 again.
20.7.3
Mark State and Break Detection
When the TE bit in SCR is 0 (serial transmission disabled), the TxDn pin is used as an I/O port. This can be used to set
the TxDn pin to mark state or send a break during serial data transmission.
To maintain the communications line in mark state (the state of 1) until the TE bit is set to 1 (to enable serial
transmission), set both Bj bit in DR of Pm and Bj bit in DDR of Pm to 1. Since the TE bit is cleared to 0 at this time, the
TxDn pin becomes an I/O port, and 1 is output from the TxDn pin.
To send a break during serial data transmission, first set Bj bit in DDR of Pm = 1 and Bj bit in DR of Pm = 0, and then
clear the TE bit to 0. When the TE bit is cleared to 0, the transmitter is initialized regardless of the current transmission
state, the TxDn pin becomes an I/O port, and a 0 is output from the TxDn pin.
20.7.4
Receive Error Flags and Transmit Operations (Clock Synchronous Mode Only)
Transmission cannot be started when a receive error flag (ORER, FER, or RER) in SSR is set to 1, even if data is written
to TDR. Be sure to clear the receive error flags to 0 before starting transmission. Note also that the receive error flags
cannot be cleared to 0 even if the RE bit in SCR is cleared to 0 (serial reception disabled).
20.7.5
Writing Data to TDR
Data can always be written to TDR. However, if new data is written to TDR when transmit data is remaining in TDR, the
previous data in TDR is lost because it has not been transferred to TSR yet. Be sure to write transmit data to TDR in the
TXI interrupt request processing routine.