![](http://datasheet.mmic.net.cn/120000/R5F21388SDFP_datasheet_3573603/R5F21388SDFP_158.png)
R8C/38T-A Group
10. Power Control
Under development Preliminary document
Specifications in this document are tentative and subject to change.
R01UH0241EJ0010 Rev.0.10
Page 127 of 730
Aug 05, 2011
10.6.10 Stopping Flash Memory
In low-speed clock mode and low-speed on-chip oscillator mode, the flash memory can be stopped using the
FMSTP bit in the FMR0 register to further reduce the power consumption.
When the FMSTP bit is set to 1 (flash memory stops), the flash memory cannot be accessed. The FMSTP bit
must be written by a program that has been transferred to the RAM.
When entering stop mode or wait mode with CPU rewrite mode disabled, the power supply for the flash
memory is automatically turned off. It is turned on again when the MCU exits stop mode or wait mode. This
eliminates the need to set the FMR0 register.
Figure 10.6
Procedure for Reducing Power Consumption Using FMSTP Bit
FMSTP bit setting program
Transfer the FMSTP bit setting program
to the RAM
Jump to the FMSTP bit setting program
(The subsequent processing is executed
by the program in the RAM)
After writing 0 to the FMR01 bit, write 1
(CPU rewrite mode enabled)
Enter low-speed clock mode or low-speed
on-chip oscillator mode
Process in low-speed clock mode or
low-speed on-chip oscillator mode
Write 0 to the FMR01 bit
(CPU rewrite mode disabled)
Jump to the specified address
in the flash memory
Write 1 to the FMSTP bit (flash memory stops.
low power consumption state)
(1)
Wait until the flash memory circuit stabilizes
(60
s) (3)
Write 0 to the FMSTP bit (flash memory operates)
Switch the clock source for the CPU clock
(2)
Stop the high-speed on-chip oscillator
FMR01, FMSTP: Bits in FMR0 register
Notes:
1. Set the FMR01 bit to 1 (CPU rewrite mode enabled) and then set the
FMSTP bit to 1.
2. When switching the clock source for the CPU clock, the new clock
must be stable.
3. Provide a wait time of 60
s by a program.
Do not access the flash memory during this wait time .