Users Manual

Table Of Contents
R01UH0823EJ0110 Rev.1.10 Page 1403 of 1852
Nov 30, 2020
RX23W Group 38. Serial Peripheral Interface (RSPIa)
(b) Receive Processing Flow
The RSPI does not handle receive-only operation, so processing for transmission is required.
Figure 38.37 Flowchart in Master Mode (Reception)
Set SPCR.SPE = 1 and set bits
SPTIE, SPRIE, and SPEIE
Proceed to
processing for
transmission
Proceed to
processing for
reception
Proceed to
error
processing
[3] Set the SPE bit to “enabled”.
Enable the required interrupts at
the same time (Disables the related
interrupt when using a polling).
Clear the SPSR.MODF, OVRF,
and PERF flags
End of initial settings
Pre-transfer processing
[1] Clear error sources.
Set SPCR2.SPIIE = 0
[2] Disable SPII interrupts.
Processing for reception
Start processing
for reception
SPRI interrupt generated
or SPSR.SPRF = 1?
Yes
No
Read receive data from SPDR
Have the last of the data been
read?
Yes
No
SPCR.SPRIE = 0
End of
processing for
reception
[4] Each time the handling routine runs,
access to the number of frames set
in the SPDCR.SPFC[1:0] bits
proceeds.
[5] Prohibition of operation is handled by
processing for transmission.
[4]