BAT32G1x9 user manual | Chapter 19 Universal serial communication unit
605 / 1149
Rev.1.02
Figure 19-27
Flowchart of the master transmission (single send mode).
SSPI communication starts
transmit data
enable interrupt
write transmit data into
SIOp(=SDRmn[7:0])
wait transmission completes.
relevant initial configuration, refer to diagram 19~26
(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).
output SDOp and SCLKp signal
(start communication) via writing
into SIOp.
if there are data to be transmitted, then read
transmit data from reserved region and write into
SIOp, update transmit data pointer. Else, set
communication completion flag to 1.
SCI initial configuration
transmission completion interrupt
transmit next data?
write transmit data into
SIOp(=SDRmn[7:0])
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 SIOp, update transmit data pointer
if transmission completion interrupt occurs, jump
to interrupt process program.
check whether transmission completed via
confirming communication completion flag.