
25. Flash Memory
Figure 25.7
Entering and Exiting Low Power Mode
Start
End
Transfer the program used in low-power consumption
mode to an area other than the flash memory
Jump to the program used in low-power
consumption mode transferred to an area
other than the flash memory.
Execute the following procedure using the program
used in low-power consumption mode transferred to
an area other than the flash memory
Set the FMR01 bit in the FMR0 register to 0
Set the FMR01 bit in the FMR0 register to 1
CPU rewrite mode enabled(1)
Processing in low-power consumption mode
or on-chip oscillator low-power consumption
mode
Jump to a given address in the flash memory
Low-power consumption mode program
Set the FMSTP bit in the FMR0 register to 1
Flash memory stops operating(2)
Switch the CPU clock source(3)
Oscillate main clock
Set the FMSTP bit in the FMR0 register to 0
Flash memory starts operating
Set the FMR01 bit in the FMR0 register to 0
CPU rewrite mode disabled(4)
Wait for tps (wait time to stabilize flash
memory circuit)(5)
NOTES:
1. To set the FMR01 bit to 1, set it to 1 immediately after setting it to 0. Write the value to the FMR0 register in bytes. Do not
generate an interrupt or a DMA or DMACII transfer between setting the FMR01 bit to 0 and to 1. Set it while the NMI pin level is
held "H".
2. Set the FMSTP bit in the FMR0 register to 1 (flash memory stopped) after the FMR01 bit is set to 1 (CPU rewrite mode enabled).
3. Wait until the selected clock source stabilizes to switch the clock source for the CPU to the main clock or sub clock.
4. To change the FMR01 bit from 1 to 0, write to address 0057h in words in read array mode. Write 00h into 8 high-order bits.
5. Add
tps wait time by program. Do not access the flash memory during this wait time.
Main clock stops
Wait until the main clock stabilizes
Switch the CPU clock source(3)