English
Language : 

SH7058 Datasheet, PDF (549/1130 Pages) Renesas Technology Corp – Renesas SuperHTM RISC engine
receive operation, and the serial clock is output until the RE bit is cleared to 0. To perform a
receive operation in one-character units, select an external clock for the clock source.
Transmitting and Receiving Data
SCI Initialization (Synchronous Mode): Before transmitting or receiving, software must clear
the TE and RE bits to 0 in the serial control register (SCR), then initialize the SCI as follows.
When changing the mode or communication format, always clear the TE and RE bits to 0 before
following the procedure given below. Clearing TE to 0 sets TDRE to 1 and initializes the transmit
shift register (TSR). Clearing RE to 0, however, does not initialize the RDRF, PER, FER, and
ORER flags and receive data register (RDR), which retain their previous contents.
Figure 15.17 is a sample flowchart for initializing the SCI.
Start of initialization
1. Select the clock source in the serial control
Clear TE and RE bits to 0 in SCR
register (SCR). Leave RIE, TIE, TEIE,
MPIE, TE, and RE cleared to 0.
2. Select the communication format in the
Set CKE1 and CKE0 bits in SCR
(RIE, TIE, TEIE, MPIE,TE,
and RE are 0)
serial mode register (SMR) and serial
direction control register (SDCR).
1 3. Write the value corresponding to the bit rate
in the bit rate register (BRR) (unless an
external clock is used).
Select transmit/receive
format in SMR and SDCR
4. Wait for at least the interval required to
2
transmit or receive one bit, then set TE or
RE in the serial control register (SCR) to 1.*
Also set RIE, TIE, TEIE, and MPIE. The
Set value in BRR
3
TxD, RxD pins becomes usable in response
to the PFC corresponding bits and the TE,
Wait
RE bit settings.
No
1-bit interval elapsed?
Yes
Set TE and RE to 1 in SCR;
Set RIE, TIE, TEIE, and MPIE bits 4
Note: * In simultaneous transmit/receive
operation, the TE bit and RE bit must
be cleared to 0 or set to 1
simultaneously.
End of initialization
Figure 15.17 Sample Flowchart for SCI Initialization
Rev. 3.0, 09/04, page 508 of 1086