Chapter 13
Serial Interface
Clock-Synchronous Communication XIII - 45
Data Transmission (Consecutive Communication Mode)
Data Reception (Consecutive Communication Mode)
Step Setting Register name Description
1
Empty confirmation of transmis-
sion buffer
SCnSTR.SCnTEMP Confirm that SCnSTR1.SCnTEMP is 0.
2
Data write to TXBUFn
(The first data transmission)
TXBUFn Set transmission data in TXBUFn.
3
Empty confirmation of transmis-
sion buffer
SCnSTR.SCnTEMP Confirm that SCnSTR.SCnTEMP becomes 0 since communi-
cation starts.
4
Data write to TXBUFn
(The second and subsequent data
transmission)
TXBUFn Set the next transmission data in TXBUFn.
5
Consecutive communication or
not
- When continuing data transmission, repeat procedures from
step 3.
When completing data transmission, go to step 6.
6
Wait for communication comple-
tion
<SCIFn (n = 0, 1, 2, 3)>
SCnSTR.SCnTBSY
<SCIFn (n = 0, 1, 2, 3)>
When the communication has been completed, SCnTBSY
becomes 0.
When an interrupt is enabled, a communication complete inter-
rupt (SCnTIRQ) occurs.
7
Transmission end - Repeat these procedures from step 1 to execute the next com-
munication.
Step Setting Register name Description
1
Empty confirmation of transmis-
sion buffer
SCnSTR.SCnTEMP Confirm that SCnSTR1.SCnTEMP is 0.
2
Data write to TXBUFn
(The first data transmission)
TXBUFn Set dummy data in TXBUFn.
3
Empty confirmation of transmis-
sion buffer
SCnSTR.SCnTEMP Confirm that SCnSTR.SCnTEMP becomes 0 since communi-
cation starts.
4
Data write to TXBUFn
(The second and subsequent data
transmission)
TXBUFn Set the next dummy data in TXBUFn.
5
Wait for communication comple-
tion
SCnSTR.SCnREMP When reception data are stored in RXBUFn,
SCnSTR.SCnREMP is set to 1.
When an interrupt is enabled, a communication complete inter-
rupt (SCnTIRQ) occurs.
6
Reception data read from
RXBUFn
RXBUFn Read out the reception data from RXBUFn.
7
Confirmation of overrun error <SCIFn (n = 0, 1)>
SCnSTR.SCnORE
SCnSTR.SCnERE
<SCIFn (n = 2, 3)>
SCnSTR.SCnORE
If SCnORE/SCnERE(*) is 1, it indicates an overrun error has
occurred. When an overrun error has occurred, take mea-
sures, such as data retransmission, since reception data may
be destroyed.
(*) SCnERE is only for SCIFn (n = 0, 1).
8
Consecutive communication or
not
- When continuing data transmission, repeat procedures from
step 3.
When completing data transmission, go to step 9.
9
Reception end - After the operations from step 5 to step7 are executed, the
communication is completed since data reception to be set in
step 4 has not been completed.
Repeat these procedures from step 1 to execute the next com-
munication