164
— Oscillation must have stabilized (following the elapse of the oscillation settling
time) or be stopped.
When the V
CC
power is turned on, hold the
RES
pin low for the duration of the
oscillation settling time*
2
(t
rc
= 20 ms) before applying V
PP
.
— The MCU must be in the reset state, or in a state in which reset has ended normally
(reset has been released) and flash memory is not being accessed.
Apply or release V
PP
either in the reset state, or when the CPU is not accessing flash
memory (when a program in on-chip RAM or external memory is executing). Flash
memory data cannot be read normally at the instant when V
PP
is applied or released,
so do not read flash memory while V
PP
is being applied or released.
For a reset during operation, apply or release V
PP
only after the
RES
pin has been
held low for at least 10 system clock cycles (10).
— The P and E bits must be cleared in the flash memory control register (FLMCR).
When applying or releasing V
PP
, make sure that the P or E bit is not set by mistake.
— There must be no program runaway.
When V
PP
is applied, program execution must be supervised, e.g. by the watchdog
timer.
These power-on and power-off timing requirements for V
CC
and V
PP
should also be
satisfied in the event of a power failure and in recovery from a power failure. If these
requirements are not satisfied, overprogramming or overerasing may occur due to
program runaway, etc., which could cause memory cells to malfunction.
b. The V
PP
flag is set and cleared by a threshold decision on the voltage applied to the FV
PP
pin. The threshold level is approximately in the range from V
CC
+2 V to 11.4 V.
When this flag is set, it becomes possible to write to the flash memory control register
(FLMCR) and the erase block registers (EBR1 and EBR2), even though the V
PP
voltage
may not yet have reached the programming voltage range of 12.0 V
±
0.6 V.
Do not actually program or erase the flash memory until V
PP
has reached the programming
voltage range.
The programming voltage range for programming and erasing flash memory is 12.0 V
±
0.6
V (11.4 V to 12.6 V). Programming and erasing cannot be performed correctly outside this
range. When not programming or erasing the flash memory, insure that the V
PP
voltage
does not exceed the V
CC
voltage. This will prevent unintentional programming and erasing.
Notes: 1. Definitions of V
PP
application, release, and cut-off are as follows:
Application: Raising the voltage from V
CC
to 12.0 V
±
0.6 V
Release:
Dropping the voltage from 12.0 V
±
0.6 V to V
CC
Cut-off:
Halting voltage application (floating state)
2. The time depends on the resonator used; refer to the electrical characteristics.