RL78/G10 CHAPTER 12 SERIAL ARRAY UNIT
R01UH0384EJ0311 Rev. 3.11 373
Dec 22, 2016
Figure 12-74. Flowchart of UART Transmission (in Single-Transmission Mode)
Starting UAR
communication
Write 1 to ST0n bit
Transmission completed?
No
Yes
End of communication
When transfer end interrupt is generated, it
moves to interrupt processing routine
Setting transmit data
For the initial setting, refer to Figure 12-70.
(Select transfer end interrupt)
SAU default setting
Wait for transmit completes
Transfer end interrupt
Enables interrupt
Writing transmit data to
TxD0 (SDR0nL)
Clear interrupt request flag (XXIF), reset interrupt mask (XXMK) and set
interrupt enable (EI).
Disable interrupt (MASK)
Set data for transmission and the number of data. Clear communication end flag
(Storage area, transmission data pointer, number of communication data and
communication end flag are optionally set on the internal RAM by the software)
C
When data to be transmitted remain, read them
from storage area and write them to TxD0.
Update the pointer to the data for transmission.
If all data for transmission have been transmitted,
set the communication completion flag.
heck completion of transmission by
verifying transmit end flag
Read transmit data, if any, from storage area and write it to TxD0. Update
transmit data pointer. If not, set transmit end flag
Main routine Main routineInterrupt processing routine
Transmitting next data?
Writing transmit data to
TxD0 (=SDR0nL)
No
Sets communication
completion flag
RETI
Yes
When writing transmit data to SDR0nL,
start the transmissions operation.