BAT32G1x9 user manual | Chapter 19 Universal serial communication unit
621 / 1149
Rev.1.02
Figure 19-43
Flowchart of the master transmit and receive (single send and receive mode).
SSPI communication starts
configure transmit and receive data
enable interrupt
write transmit data into
SIOp(=SDRmn[7:0])
wait for transmitting and reception
completes.
relevant initial configuration, refer to diagram 19~42 (select transmission
completion interrupt)
regarding transmit and receive data, configure storage region and data count (via
software, any specified internal RAM storage region, transmit data pointer
communnication data count)
after clear interrupt request flag(Ifxx) and release
interrupt mask(MKxx), enable interrupt
output SDOp and SCLKp signal (start
communication) via writing into SIOp.
read received data and write into storage region, update receive data
pointer.
SCI initial configuration
transmission completion interrupt
read received data into
SIOp(=SDRmn[7:0])
RETURN
Transmit and receive completed?
disable interrupt (mask).
set STmn bit to 1.
communication completed.
No
Yes
m
a
in
p
ro
g
ra
m
in
te
rr
u
p
t
p
ro
c
e
s
s
p
ro
g
ra
m
m
a
in
p
ro
g
ra
m
if transmission completion interrupt
occurs, jump to interrupt process
program.
if there is next data then continue
transmitting
from reserved region read and transmit
data and write to SIOp, update transmit
data pointer