Chapter 13
Serial Interface
Full-duplex UART Communication XIII - 55
Data Transmission
Data Reception
UART Break Transmission
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 TXBUFn Set transmission data in TXBUFn.
3
Transmission end - Repeat these procedures from step 1 to execute the next
communication.
Step Setting Register name Description
1 Start bit reception - Detect a start bit.
2
Wait for communication
completion
SCnSTR.SCnREMP When reception data are stored in RXBUFn,
SCnSTR.SCnREMP is set to 1.
When an interrupt is enabled, a communication complete
interrupt (SCnTIRQ) occurs.
3
Reception error and break
reception
SCnSTR.SCnBRKF
SCnSTR.SCnFEF
SCnSTR.SCnPEK
SCnSTR.SCnERE
If an error occurs, SCnSTR.SCnERE is set to 1.
Take measures, such as data retransmission, since
reception data may be destroyed.
When a break reception, SCnBRKF is set to 1.
The above flag is updated every frame data reception.
Confirm the flag immediately after communication has been
completed. The flag can be also confirmed at step 5 if there
is enough time to check it.
4
Reception data read from
RXBUFn
RXBUFn Read out the reception data from RXBUFn.
5
Confirmation of overrun error SCnSTR.SCnORE
SCnSTR.SCnERE
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.
6
Reception end - Repeat these procedures from step 1 to execute the next
communication.
Step Setting Register name Description
1
Empty confirmation of
transmission buffer and wait for
transmission completion
SCnSTR1.SCnTBSY
SCnSTR1.SCnTEMP
Confirm that both SCnSTR1.SCnTBSY and
SCnSTR1.SCnTEMP become 0.
When an interrupt is enabled, a communication complete
interrupt (SCnTIRQ) occurs. Even in that case, confirm that
above two flags are 0.
2 Setting of break transmission SCnMD2.SCnBRKE = 1 Set a break transmission.
3 Data write to TXBUFn TXBUFn Set dummy data to TXBUFn.
4
Wait for a break transmission
completion
SCnSTR1.SCnTBSY
SCnSTR1.SCnTEMP
Confirm that both S CnSTR1.SCnTBSY and
SCnSTR1.SCnTEMP become 0.
When an interrupt is enabled, a communication complete
interrupt (SCnTIRQ) occurs. Even in that case, confirm that
above two flags are 0.
5 Release a break transmission SCnMD2.SCnBRKE = 0 Release setting of a break transmission.
6 Break transmission end - -