BAT32G1x9 user manual | Chapter 19 Universal serial communication unit
607 / 1149
Rev.1.02
Figure 19-29
Flowchart of the master transmission (continuous transmission 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~34
(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).
after clear interrupt request flag(Ifxx) and release interrupt mask(MKxx),
enable interrupt
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, To update the
transmit data pointer and the number of transmit data, clear
the MDmn bit when the MDmn bit is "1". Otherwise, the
communication is terminated.
SCI initial configuration
buffer empty/transmit completion
interrupt
communication data count >0
write transmit data into
SIOp(=SDRmn[7:0])
RETURN
transmission completes
?
disable interrupt (mask).
set STmn bit to 1.
communication completed.
set MDmn0 bit to 0.
Yes
No
No
Yes
主程序
中断处理程序
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.
communication data count-1
set communication completion flag
MDmn=1?
Yes
No
continue communicating?
write MDmn 0 bit to 1
check whether transmission completed via
confirming communication completion flag.
Note (1)~(6) in the figure corresponds to (1)~(6) in the "
19-28 Master Transmission (Continuous
Send Mode)".