Starting simplified SPI (CSI)
communication
End of communication
Set STmn bit to 1
Setting storage area and number of data for transmission/reception data
(Storage area, Transmission/reception data pointer, Number of communication
data and Communication end flag are optionally set on the internal RAM by
the software)
Clear interrupt request flag (xxIF), reset interrupt mask (xxMK) and
set interrupt enable (EI).
Setting transmission/reception data
Enables interrupt
Wait for transmission/reception
completes
Transmission/reception
completed?
RETI
Transfer end interrupt
Reading receive data from SIOp
(= SDRmn [7:0])
SAU initial setting
Start communication when master start
providing the clock
No
Main routine
Main routine
Disable interrupt (MASK)
Update the number of communication data and confirm
if next transmission/reception data is available
Transmission/reception
next data?
No
Yes
Yes
When transfer end interrupt is generated,
it moves to interrupt processing routine
Read receive data and write it to storage area.
Update receive data pointer.
Writing transmit data to SIOp
(= SDRmn [7:0])
Read transmit data from storage area and write it to SIOp.
Update transmit data pointer.
Interrupt processing routine