Starting simplified SPI (CSI)
communication
End of communication
Set STmn bit to 1
Setting storage data and number of data for transmission/reception data
(Storage area, Transmission data pointer, Reception data pointer, and number of
communication data 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
Read receive data from SIOp
(= SDRmn [7:0])
Transmission/reception
completed?
Yes
RETI
Transfer end interrupt
Writing transmit data to SIOp
(= SDRmn [7:0])
SAU initial setting
No
Main routine Interrupt processing routine Main routine
Disable interrupt (MASK)
If there are the next data, it continues
Read receive data then writes to storage area,
update receive data pointer
When transfer end interrupt is generated,
it moves to interrupt processing routine.
Read transmit data from storage area and write it to
SIOp. Update transmit data pointer.
Writing to SIOp makes SOp
and SCKp signals out
(communication starts)