RL78/G1P
CHAPTER 11 SERIAL ARRAY UNIT
R01UH0895EJ0100 Rev.1.00
441
Nov 29, 2019
Figure 11-105. Flowchart of UART Transmission (in Single-Transmission Mode)
SAU default setting
Wait for transmit completes
Setting transmit data
For the initial setting, refer to Figure 11-101.
(Select transfer end interrupt)
Enables interrupt
Transfer end interrupt
M
a
in
r
outi
n
e
Inter
ru
p
t pr
oc
es
s
ing
ro
u
ti
n
e
M
a
in
ro
u
tin
e
End of communication
Yes
No
RETI
Yes
No
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).
Clear interrupt request flag (XXIF), reset interrupt mask (XXMK)
and setinterrupt enable (EI).
Read transmit data from storage area and write it to TxDq. Update transmit
data pointer.
Communication starts by writing to SDRmn[7:0].
When Transfer end interrupt is
generated, it moves to interrupt
processing routine.
Read transmit data, if any, from storage area
and write it to SIOp. Update transmit data
pointer.
If not, set transmit end flag.
Sets communication
completion flag
Writing transmit data to the SDRmn
[7:0] bits (TXDq register) (8 bits) or
the SDRmn [8:0] bits (9 bits)
Transmitting next data?
Writing transmit data to the SDRmn
[7:0] bits (TXDq register) (8 bits) or
the SDRmn [8:0] bits (9 bits)
Starting UART
communication
Transmission completed?
Disable interrupt (MASK)
Write STmn bit to 1
Check completion of transmission by
verifying transmit end flag.