RX610 Group
20. Serial Communications Interface (SCI)
R01UH0032EJ0120 Rev.1.20
Page 654 of 1006
Feb 20, 2013
20.4.3
Serial Data Transmission (Clock Synchronous Mode)
Figure 20.15 shows an example of the operation for serial transmission in clock synchronous mode.
In serial data transmission, the SCI operates as described below.
1. The SCI transfers data from TDR to TSR when data is written to TDR in the TXI interrupt processing routine. The
TXI interrupt request at the beginning of transmission is generated when the TE bit in SCR is set to 1 after the TIE
bit in SCR is set to 1 or when these two bits are set to 1 simultaneously by a single instruction.
2. After transferring data from TDR to TSR, the SCI starts transmission. When the TIE bit is set to 1 at this time, a TXI
interrupt request is generated. Continuous transmission is enabled by writing the next transmit data to TDR in this
TXI interrupt processing routine before transmission of the current transmit data has finished.
3. 8-bit data is sent from the TxDn pin in synchronization with the output clock when clock output mode has been
specified and in synchronization with the input clock when use of an external clock has been specified.
4. The SCI checks for updating of (writing to) the TDR at the time of stop bit output.
5. When TDR is updated, the next transmit data is transferred from TDR to TSR, and serial transmission of the next
frame is started.
6. If TDR is not updated, set the SSR flag in TEND to 1 and the TxDn pin retains the output state of the last bit. If the
TEIE bit in SCR is set to 1 at this time, a TEI interrupt request is generated. The SCKn pin is held high.
Figure 20.16 shows a sample flowchart of serial data transmission.
Transmission will not start while a receive error flag (ORER, FER, or PER in SSR) is set to 1. Be sure to clear the
receive error flags to 0 before starting transmission. Note that clearing the RE bit in SCR to 0 does not clear the receive
error flags.
Transfer direction
Bit 0
Synchronization
clock
1 frame
TXI interrupt signal
SSR.TEND flag
Serial data
TXI interrupt
request
generated
Data written to TDR in
TXI interrupt processing
routine
TEI interrupt
request
generated
Bit 1
Bit 7
Bit 0
Bit 1
Bit 7
Bit 6
TXI interrupt
request
generated
Note:
*
For the corresponding interrupt vector number, see section 10, Interrupt Control Unit (ICU).
Figure 20.15 Example of Operation for Serial Transmission in Clock Synchronous Mode