BAT32G1x9 user manual | Chapter 19 Universal serial communication unit
689 / 1149
Rev.1.02
Figure 19-100 UART transmit (single-pass mode).
UART communication starts
transmit data
enable interrupt
write data into SDRmn[7:0](TxDq
regsiter, 8 bit) or SDRmn[8:0](9
bits)
wait transmission completes.
relevant initial configuration, refer to diagram 19-102
(select transmission completion interrupt)
configure transmission data and data count, clear communication completion flag
(via software, any configured internal RAM reserved region, transmit data pointer,
communication data count and communication completion flag).
set to enable interrupt after clear interrupt request flag(IFxx) and
release interrupt mask (MKxx).
start transmission via writing into
SDRmn[7:0]
if there are data to be transmitted, then read
transmit data from reserved region and write into
TxDq, update transmit data pointer. Else, set
communication completion flag to 1.
SCI initial configuration
transmission completion interrupt
transmit next data?
write data into SDRmn[7:0](TxDq
regsiter, 8 bit) or SDRmn[8:0](9
bits)
RETURN
transmission completes
?
disable interrupt (mask).
set STmn bit to 1.
communication completed.
set communication completion flag
Yes
No
No
Yes
m
a
in
p
ro
g
ra
m
in
te
rr
u
p
t
p
ro
ce
ss
p
ro
g
ra
m
m
a
in
p
ro
g
ra
m
from reserved region read and transmit data and
write to TxDq, update transmit data pointer
if transmission completion interrupt occurs, jump
to interrupt process program.
check whether transmission completed via confirming
communication completion flag.