Starting simplified SPI (CSI)
communication
End of communication
Set STmn bit to 1
Set data for transmission and the number of data. Clear communication end flag.
(Storage area, Transmission 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).
Read transmit data from storage area and write it to
SIOp. Update transmit data pointer.
Setting transmit data
Enables interrupt
Wait for transmit completes
Writing transmit data to SIOp
(= SDRmn [7:0])
Transmission completed?
Yes
RETI
Transmitting next data?
Yes
Transfer end interrupt
Writing transmit data to SIOp
(= SDRmn [7:0])
SAU initial setting
Writing to SIOp makes SOp and
SCKp signals out
(communication starts)
When transfer end interrupt is generated,
it moves to interrupt processing routine
No
Read transmit data. If any, write it to SIOp from
storage area. Update transmit data pointer. If not,
set transmit end flag.
Check completion of transmission by
verifying transmit end flag
Sets communication completion flag
Main routine Interrupt processing routine Main routine
No
Disable interrupt (MASK)