Starting simplified SPI
(CSI
)
communication
End of communication
Set STmn bit to 1
Clear storage area setting and the number of receive data
(Storage area, 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).
Preparation for reception
Enables interrupt
RETI
Reading receive data from SIOp
(= SDRmn [7:0
])
SAU initial setting
Start communication when master start
providing the clock
Main routine Main routine
Disable interrupt (MASK)
Check completion of number of receive data
Reception completed?
No
When transfer ends, an interrupt is generated.
Yes
Wait for receive completes
Read receive data then writes to storage area,
and counts up the number of receive data.
Update receive data pointer.
Transfer end interrupt
Interrupt processing routine
For the initial setting, refer to Figure 12-54.
(Select transfer end interrupt)