BAT32G1x9 user manual | Chapter 19 Universal serial communication unit
615 / 1149
Rev.1.02
Fig. 19-37
Flowchart of the master receiver (continuous receive mode).
SSPI communication starts
configure receiving data
enable interrupt
write virtual data to
SIOp(=SDRmn[7:0])
wait till receiving ends
relevant initial configuration, refer to diagram
19~34(select buffer empty interrupt)
For the received data, set the storage area and the
number of communication data (through software,
arbitrarily set the storage area in the internal RAM, the
pointer of the received data and the number of
communication data).
after clear interrupt request flag(Ifxx) and
release interrupt mask(MKxx), enable
interrupt
output SCLKp signal (start
communicating) via writing
into SIOp.
if there are data to be received, read the
data and write into storage region, update
receive data pointer (communication data
count -1)
SCI initial configuration
buffer empty/transmit completion
interrupt
BFFmn=1
?
read receiving data to
SIOp(=SDRmn[7:0])
RETURN
communication data count =0?
disable interrupt (mask).
write STmn bit to 1.
communication completed.
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
if transmission completion
interrupt occurs, jump to interrupt
process program.
communication data count -1
continue receiving?
write MDmn 0 bit to 1
if communication data count changes to 0, then
receiving completed.
communication data count
?
write MDmn 0 bit to 0
write virtual data to
SIOp(=SDRmn[7:0])
Yes
=0
2
=1
No
Note (1) ~ (8) in the figure corresponds to (1) ~ (8) in the "Timing Diagram of Figure 19-36 Master Receive (Continuous
Receive Mode)".