
ML66525 Family User’s Manual
Chapter 20
Flash Memory
20 - 15
20.6.5 Notes on Use of User Mode
Note the following items when generating a program to be used with the user mode.
If an interrupt other than Timer 0 interrupt occurs during programming of the flash memory,
the interrupt is processed.
However, the flash memory area will be incorrectly
programmed.
Also, the CPU program will get out of control after the interrupt is
processed.
If reset is initiated by input to the RESn pin during programming of the flash memory, the
reset is processed.
However, the flash memory area that was in the process of being
programmed will have been incorrectly programmed.
If reset is initiated during
programming, reprogram the flash memory area that was in the process of being
programmed.
Do not program to the flash memory area that contains the programming program being
executing.
(After programming is completed, the CPU program control will run out of
control.)
When the flash memory is programmed in the user mode while the watchdog timer (WDT)
is running, the WDT is designed to stop the count clock during HALT mode is in progress.
After programming of the flash memory in the user mode, the flash memory is changed
from programming mode to read mode.
To read data from the first flash memory, set
CPUCLK = 1/2 OSCCLK in advance before programming of the flash memory in the user
mode.
(If CPUCLK = 1/1 OSCCLK, the CPU program control will run out of control after
programming is completed.)
Development tools (emulator) cannot evaluate programming or erasing.
20.7 Notes on Program
(1)
Programming of flash memory immediately after power-on
Programming to flash memory is automatically disabled for approximately 20 ms (for 2.4 to
3.6 V devices) after power is turned on.
Therefore, if flash memory is to be programmed
immediately after power is turned on, wait for the above time by guaranteeing a power-on reset
time.
(2)
When the supply voltage drops
If the supply voltage drops to a value below the guaranteed value (2.4 V) during programming
to the flash memory, data may not be programmed correctly.
So take care that the supply
voltage during programming does not drop below the guaranteed value.
After programming,
be sure to check the data in the flash memory to see if data has been programmed correctly.