R8C/13 Group
17.4 CPU Rewrite Mode
On-chip oscillator mode
(main clock stop) program
Transfer a on-chip oscillator mode (main clock
stop) program to any area other the flash memory
Set the FMR01 bit by writing “0” and then “1”
(CPU rewrite mode enabled)
Set FMSTP bit to “1”
(flash memory stopped. Low power state)(1)
Jump to the on-chip oscillator mode (main clock
stop) program which has been transferred to any
area other the flash memory.
(The subsequent processing is executed by a
program in any area other than the flash memory.)
Switch the clock source for CPU clock.
Turn XIN off
Process of on-chip oscillator mode (main
clock stop)
wait until oscillation stabilizes
Turn main clock on
switch the clock source for CPU clock(2)
Set the FMSTP bit to “0” (flash memory operation)(4)
Write “0” to the FMR01 bit
(CPU rewrite mode disabled)
Wait until the flash memory circuit stabilizes
(15 µs)(3)
Jump to a specified address in the flash memory
NOTES:
1. Set the FMR01 bit to “1” (CPU rewrite mode) before setting the FMSTP bit to “1” .
2. Before the clock source for CPU clock can be changed, the clock to which to be changed must be stable.
3. Insert a 15 µs wait time in a program. Avoid accessing to the flash memory during this wait time.
4. Ensure 10 µs until setting “0” (flash memory operates) after setting the FMSTP bit to “1” (flash memory stops).
Figure 17.8 Process to Reduce Power Consumption in On-Chip Oscillator Mode (Main Clock Stops)
Rev.1.20 Jan 27, 2006 page 174 of 205
REJ09B0111-0120