Section 12 Serial Communication Interface (SCI)
Rev. 3.00 Sep. 27, 2007 Page 456 of 758
REJ09B0243-0300
Figure 12.9 shows a sample flowchart for initializing the SCI.
<Transfer starts>
[4]
[5]
Set the PFC for the external pins to be
used (SCK, TXD, RXD)
[1] Set the clock selection in SCSCR.
[2] Set the data transfer format in SCSMR.
[3] Write a value corresponding to the bit rate to
SCBRR. Not necessary if an external clock is
used.
[4] Set PFC of the external pin used. Set RXD
input during receiving and TXD output during
transmitting. Set SCK input/output according
to contents set by CKE1 and CKE0.
[5] Set the TE bit or RE bit in SCR to 1.
*
Also
make settings of the RIE, TIE, TEIE, and
MPIE bits. At this time, the TXD, RXD, and
SCK pins are ready to be used. The TXD pin
is in a mark state during transmitting. When
synchronous clock output (clock master) is
set during receiving in clock synchronous
mode, outputting clocks from the SCK pin
starts.
Note:
*
In simultaneous transmit and receive operations, the TE and RE bits should both be cleared to
0 or set to 1 simultaneously.
Set TE and RE bits of SCSCR to 1
Set the RIE, TIE, TEIE, and MPIE bits
in SCSCR
Wait
No
Yes
Start initialization
Set data transfer format in
SCSMR
Set value in SCBRR
Clear RIE, TIE, TEIE, MPIE,
TE and RE bits in SCSCR to 0
*
[2]
[3]
1-bit interval elapsed?
Set CKE1 and CKE0 bits in SCSCR
(TE and RE bits are 0)
[1]
Figure 12.9 Sample Flowchart for SCI Initialization
Summary of Contents for SH7124 R5F7124
Page 2: ...Rev 3 00 Sep 27 2007 Page ii of xx ...
Page 8: ...Rev 3 00 Sep 27 2007 Page viii of xx ...
Page 36: ...Section 1 Overview Rev 3 00 Sep 27 2007 Page 16 of 758 REJ09B0243 0300 ...
Page 68: ...Section 2 CPU Rev 3 00 Sep 27 2007 Page 48 of 758 REJ09B0243 0300 ...
Page 108: ...Section 5 Exception Handling Rev 3 00 Sep 27 2007 Page 88 of 758 REJ09B0243 0300 ...
Page 166: ...Section 7 User Break Controller UBC Rev 3 00 Sep 27 2007 Page 146 of 758 REJ09B0243 0300 ...
Page 724: ...Section 20 List of Registers Rev 3 00 Sep 27 2007 Page 704 of 758 REJ09B0243 0300 ...
Page 772: ...Rev 3 00 Sep 27 2007 Page 752 of 758 REJ09B0243 0300 ...
Page 778: ...Rev 3 00 Sep 27 2007 Page 758 of 758 REJ09B0243 0300 ...
Page 781: ......