![Cmsemicon BAT32G1 9 Series Скачать руководство пользователя страница 679](http://html1.mh-extra.com/html/cmsemicon/bat32g1-9-series/bat32g1-9-series_user-manual_2627609679.webp)
BAT32G1x9 user manual | Chapter 19 Universal serial communication unit
679 / 1149
Rev.1.02
Fig. 19-93
Flowchart of Slave send and receive (continuous transmit and receive mode).
SSPI communication starts
configure transmit and receive
data
enable interrupt
Wait for the transfer to end
relevant initial configuration, refer to diagram
19-93(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.
except 1st interrupt, read received data
and write into storage region, update
receive data pointer
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).
set 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 buffer empty or transmit completion
interrupt occurs, jump to interrupt process
program.
communication data count -1
continue communicating?
write MDmn 0 bit to 1
communication data count
?
write MDmn 0 bit to 0
write transmit data into
SIOp(=SDRmn[7:0])
Yes
=0
2
=1
No
if there is data to be transmitted (communication data count
>=2), then read data from storage region and write into SIOp,
update storage pointer. If transmit completes
(communication data count = 1), then modify bit of transmit
completion interrupt.
Note that the SIOp register must be set to send data before the master device starts to output the clock.
Note 1 (1) to (8) in the figure corresponds to (1) to (8) in the "Fig. 19-92 Timing Diagram of Slave Send and
Receive (Continuous Transmit and Receive Mode)".
2.m: unit number (m=0)n: channel number (n=0)p: SSPI number (p=00).