English
Language : 

SH7706 Datasheet, PDF (443/749 Pages) Renesas Technology Corp – Renesas 32-Bit RISC Microcomputer SuperH™ RISC engine Family/SH7700 Series
Section 14 Serial Communication Interface (SCI)
Transmitting and Receiving Data (SCI Initialization (Asynchronous Mode)): Before
transmitting or receiving, clear the TE and RE bits to 0 in the serial control register (SCSCR), then
initialize the SCI as follows.
When changing the operation 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 (SCTSR). Clearing RE to 0, however, does not initialize the RDRF, PER,
FER, and ORER flags or receive data register (SCRDR), which retain their previous contents.
When an external clock is used, the clock should not be stopped during initialization or subsequent
operation. SCI operation becomes unreliable if the clock is stopped.
Figure 14.7 is a sample flowchart for initializing the SCI.
Initialize
Clear TE and RE bits in SCSCR to 0
Set CKE1 and CKE0 bits in SCSCR
(TE and RE bits are 0)
Select transmit/receive
format in SCSMR
Set value to SCBRR
Wait
Has a 1-bit
No
interval elapsed?
Yes
Set TE and RE bits in SCSCR to 1
and set RIE, TEIE, and MPIE bits
1. Select the clock source in the SCSCR.
Leave RIE, TIE, TEIE, MPIE, TE, and
RE cleared to 0. If clock output is
selected in asynchronous mode,
clock output starts immediately after
the setting is made to SCSCR.
2. Select the communication format in the
SCSMR.
3. Write the value corresponding to the bit
rate in SCBRR unless an external clock
is used.
4. Wait for at least the interval required to
transmit or receive one bit, then set TE
or RE in the SCSCR to 1. Also set RIE,
TIE, TEIE, and MPIE as necessary.
Setting TE or RE enables the SCI to use
the TxD0 or RxD0 pin. The initial states
are the mark transmit state, and the idle
receive state (waiting for a start bit).
End
Figure 14.7 Sample Flowchart for SCI Initialization
Rev. 5.00 May 29, 2006 page 395 of 698
REJ09B0146-0500