BAT32G1x9 user manual | Chapter 19 Universal serial communication unit
631 / 1149
Rev.1.02
Figure 19-53
Flowchart of Slave send (continuous send mode).
SSPI communication starts
Transmit data
enable interrupt
write transmit data into
SIOp(=SDRmn[7:0])
wait transmission completes.
relevant intial configure, please refer to
diagram 19~50 (select buffer empty
interrupt)
regarding transmit 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
start communication via clock
provided by master device.
if there is data to be transmitted, then read
data from storage region and write into SIOp,
update storage pointer. Else, changes
interrupt to transmission completion.
SCI initial configuration
buffer empty/transmit
completion interrupt
communication data count > 1?
write transmit data into
SIOp(=SDRmn[7:0])
RETURN
communication data count=-1
?
disable interrupt (mask).
set STmn bit to 1.
communication completed.
write MDmn 0 bit to 0
Yes
No
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
from reserved region read and transmit data
and write to SIOp, update transmit data pointer
if buffer empty or transmit
completion interrupt occurs, jump to
interrupt process program.
read transmit data
continue communicating?
write MDmn 0 bit to 1
communication data count -1
Yes
No
perform following judgement based on
communication data count
:
+1: transmit data complete.
0: receiving last piece of data
-1: all data receive completed.
Note (1)~(6) in the note figure corresponds to (1)~(6) in the "Timing Diagram of Fig. 19-52 Slave Sending (Continuous Send
Mode)".