R01UH0823EJ0100 Rev.1.00
Page 1412 of 1823
Jul 31, 2019
RX23W Group
38. Serial Peripheral Interface (RSPIa)
38.5
Usage Notes
38.5.1
Setting Module Stop Function
Module stop control register B (MSTPCRB) can be used to enable or disable the RSPI. Immediately after a reset,
operation of the RSPI is disabled. Register access is enabled by releasing the module stop state. For details, refer to
section 11, Low Power Consumption
38.5.2
Note on Low Power Consumption Functions
When using the module stop function and entering a low power consumption mode other than sleep mode, set the
SPCR.SPE bit to 0 before completing communication.
38.5.3
Notes on Starting Transfer
If the ICU.IRn.IR flag is 1 at the time transfer is to be started, an interrupt request is internally retained after transfer
starts, and this can lead to unanticipated behavior of the ICU.IRn.IR flag.
When the ICU.IRn.IR flag is 1 at the time transfer is to start, follow the procedure below to clear interrupt requests
before enabling operations (by setting the SPCR.SPE bit to 1).
1. Confirm that transfer has stopped (i.e. that the SPCR.SPE bit is 0).
2. Set the relevant interrupt enable bit (the SPCR.SPTIE or SPCR.SPRIE bit) to 0.
3. Read the relevant interrupt enable bit (the SPCR.SPTIE or SPCR.SPRIE bit) and confirm that its value is 0.
4. Set the ICU.IRn.IR flag to 0.
38.5.4
Notes on the SPRF and SPTEF flags
When polling the SPSR.SPRF flag and/or SPSR.SPTEF flag, set the SPCR.SPRIE bit and/or SPCR.SPTIE bit to 0.