Datasheet

Table Of Contents
Section 18 Serial Communication Interface 4 (SCI4)
Rev. 2.00 Jul. 04, 2007 Page 430 of 692
REJ09B0309-0200
18.6 Usage Notes
When using the SCI4, keep in mind the following.
18.6.1 Relationship between Writing to TDR4 and TDRE
The TDRE flag in SCSR4 is a status flag that indicates that data to be transmitted has not been
stored in TDR4. When writing data to TDR4, the TDRE flag is automatically cleared to 0. The
TDRE flag is set to 1 when the SCI4 transfers data from TDR4 to SR4.
Data is written to TDR4 regardless of the TDRE flag value. However, if data is written to TDR4
with TDRE = 0, the previous data is lost unless the previous data has been transferred to SR4.
Accordingly, to ensure transmission, writing transmit data to TDR4 must be performed once after
confirming that the TDRE flag has been set to 1. (Do not write more than once.)
18.6.2 Receive Error Flag and Transmission
While the receive error flag (ORER) is set to 1, transmission cannot be started even if the TDRE
flag is cleared to 0. To start transmission, the ORER flag must be cleared to 0.
Note that the ORER flag cannot be cleared to 0 even if the RE bit is cleared to 0.
18.6.3 Relationship between Reading RDR4 and RDRF
The SCI4 always checks the RDRF flag status during reception. When the RDRF flag is cleared to
0 at the end of a frame, the reception is completed without error. When the RDRF flag is set to 1,
it indicates that an overrun has occurred.
Since reading RDR4 clears the RDRF flag to 0 automatically, if RDR4 is read twice or more, the
data is read with the RDRF flag cleared to 0. In this case, when the timing of the read operation
matches that of the data reception of the next frame, the read data may be the next frame data.
Figure 18.9 shows this operation.