SSPI communication starts
configure transmit data
enable interrupt
write transmit data into
SIOp(=SDRmn[7:0])
wait transmission completes.
relevant intial configure, please refer to
diagram 19-79 (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
main program
interrupt process program
main program
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.