English
Language : 

SH7708 Datasheet, PDF (420/625 Pages) Renesas Technology Corp – SuperH™ RISC engine
14.3.6 Data Transmission and Reception
Initialization: Initialize the SCI using the following procedure before sending or receiving
data. Initialization is also required for switching from transmit mode to receive mode or from
receive mode to transmit mode. Figure 14.5 shows a flowchart of the initialization process.
1. Clear TE and RE in the serial control register (SCSCR) to 0.
2. Clear error flags FER/ERS, PER, and ORER to 0 in the serial status register (SCSSR).
3. Set the C/A bit, parity bit (O/E bit), and baud rate generator select bits (CKS1 and CKS0
bits) in the serial mode register (SCSMR). At this time also clear the CHR and MP bits to
0 and set the STOP and PE bits to 1.
4. Set the SMIF, SDIR, and SINV bits in the smart card mode register (SCSCMR). When
the SMIF bit is set to 1, the TxD and RxD pins both switch from ports to SCI pins and
become high impedance.
5. Set the value corresponding to the bit rate in the bit rate register (SCBRR).
6. Set the clock source select bits (CKE1 and CKE0 bits) in the serial control register
(SCSCR). Clear the TIE, RIE, TE, RE, MPIE, and TEIE bits to 0. When the CKE0 bit is
set to 1, a clock is output from the SCK0 pin.
7. After waiting at least 1 bit, set the TIE, RIE, TE, and RE bits in SCSCR. Do not set the
TE and RE bits simultaneously unless performing auto-diagnosis.
406