RX610 Group
20. Serial Communications Interface (SCI)
R01UH0032EJ0120 Rev.1.20
Page 653 of 1006
Feb 20, 2013
20.4.2
SCI Initialization (Clock Synchronous Mode)
Before transmitting and receiving data, start by writing the initial value "00h" to the SCR and then continue through the
procedure for SCI given in the sample flowchart (figure 20.14). Whenever the operating mode or transfer format is
changed, the SCR must be initialized before the change is made.
Note that clearing the SCR.RE bit to 0 initializes neither the ORER, FER, and PER flags in SSR nor RDR.
Moreover, note that switching the value of the SCR.TE bit from 1 to 0 or 0 to 1 while the SCR.TIE bit is 1 leads to the
generation of a TXI interrupt request.
Wait
<Transfer start>
Note: In simultaneous transmit and receive operations, the TE and RE bits in SCR should both be cleared
to 0 or set to 1 simultaneously.
Start initialization
Set data transfer format in SMR and SCMR
No
Yes
Set a value in BRR
Clear bits TIE, RIE, TE, RE, and TEIE in
SCR to 0
Set Bj bit in ICR of Pm to 1
Set TE or RE bit in SCR to 1, and set TIE,
RIE, and TEIE bits in SCR
1-bit interval elapsed?
Set bits CKE[1:0] in SCR
[ 1 ]
[ 2 ]
[ 3 ]
[ 4 ]
[ 1 ] When receiving data or using an external clock
[ 2 ] Set the data transfer format in SMR and SCMR
*1
.
[ 3 ] Write a value corresponding to the bit rate to BRR.
This step is not necessary if an external clock is
used.
[ 4 ] Wait at least one bit interval, then set the TE bit or
RE bit in SCR to 1. Also set the SCR.TIE, SCR.RIE,
and SCR.TEIE bits
*2
.
Setting the TE and RE bits enables the TxDn and
RxDn pins to be used.
Note 1. Set the SCMR register to its initial value.
Note 2. If both the TIE and TEIE bits are set to 1 when a TXI
interrupt starts up the DMAC or DTC, a TEI interrupt
during transfer by the DMAC or DTC will be
generated as a CPU interrupt. After all of the transfer
by the DMAC or DTC is completed, set the TEIE bit
to 1.
Figure 20.14 Example of SCI Initialization Flowchart (Clock Synchronous Mode)
Summary of Contents for RX600 Series
Page 1006: ...RX610 Group R01UH0032EJ0120 ...