Chapter 13
Serial Interface
XIII - 50 Full-duplex UART Communication
Transmission BUSY Flag
When SCnMD1.SCnSBOS is "1", SCnSTR.SCnTBSY is set to "1" by writing data to TXBUFn.
When SCnSTR.SCnTEMP is "0" (no data existed in TXBUFn), SCnSTR.SCnTBSY is cleared to "0" when SCn-
TICR occurs.
While SCnSTR.SCnTEMP is "1" (data existed in TXBUFn), SCnSTR.SCnTBSY is held at "1" when SCnTICR
occurs.
Reception BUSY Flag
When SCnMD1.SCnSBIS is "1", SCnSTR.SCnRBSY is set to "1" by a start bit detection.
When SCnTICR occurs, SCnSTR.SCnRBSY is cleared to "0".
Reception Error Flag
Reception error sources are shown in Table:13.4.3. All error flags are updated when a reception finishes.
SCnSTR.SCnERE shows the logical OR of three error flags.
When the data is received before the previous data is read from RXBUFn, SCnSTR.SCnORE is set to "1".
To clear SCnSTR.SCnORE, set SCnREMP to "0" by reading data from RXBUFn before the next data is received.
Table:13.4.3 UART Communication Error Sources
Break Transmission
To transmit a break, set SCnMD2.SCnBRKE to "1" and write dummy data to TXBUFn.
In break transmission, all "0" data (all bits of the data frame is "0") is transmitted.
To send a normal data, set SCnMD2.SCnBRKE to "0".
..
Be sure to write data to SCnBRKE while both SCnSTR.SCnTBSY and SCnSTR.SCnTEMP
are "0".
..
Break Reception
A break is detected with SCnMD2.SCnBRKF.
When the break is detected, SCnBRKF is set to "1" at the event of SCnRIRQ.
SCnBRKF is updated every time SCnRICR occurs, so read out SCnBRKF before the next data is received.
Consecutive Communication Mode
<Consecutive Data Transmission>
Before setting the next transmission data to TXBUFn, confirm that SCnSTR.SCnTEMP is "0" after the previous
data is set to TXBUFn. The next transmission data must be set by 0.5 transfer clock before the last stop bit of the
previous data frame is transmitted.
If this restriction is not satisfied, the communication blank more than 1 bit length may occurs between transmis-
sion data.
<Consecutive Data Reception>
A start bit can be detected immediately after a stop bit. In consecutive data reception, SCnSTR.SCnRBSY is held
at "0" for the period from a stop bit to the next start bit.
Flag name Error content
SCnSTR.SCnORE Overrun error
A data is received before reading the previous received data from
RXBUFn.
SCnSTR.SCnPEK Parity error A parity bit error is detected.
SCnSTR.SCnFEF Flaming error A stop bit is not detected.