
Flash EEPROM
68HC(9)12DG128 Rev 1.0
104
Flash EEPROM
MOTOROLA
Erasing the Flash EEPROM
The following sequence demonstrates the recommended procedure for
erasing any of the Flash EEPROM. The V
FP
pin voltage must be at the
proper level prior to executing step 4 the first time.
1.
2.
Turn on V
FP
(apply program/erase voltage to the V
FP
pin).
Set the PPAGE register to point to the 32K Flash array to be
erased. Set the LAT bit and ERAS bit to configure the Flash
EEPROM for erasing.
Write to any valid address in the 32K Flash array. This allows the
erase voltage to be turned on; the data written and the address
written are not important. The boot block will be erased only if the
control bit BOOTP is negated.
Apply erase voltage by setting ENPE.
Delay for a single erase pulse (t
EPULSE
).
Remove erase voltage by clearing ENPE.
Delay while high voltage is turning off (t
VERASE
).
Read the entire array to ensure that the Flash EEPROM is erased.
If all of the Flash EEPROM locations are not erased, repeat steps
4 through 7 until either the remaining locations are erased, or until
the maximum erase pulses have been applied (n
EP
)
If all of the Flash EEPROM locations are erased, repeat the same
number of pulses as required to erase the array. This provides
100% erase margin.
Read the entire array to ensure that the Flash EEPROM is erased.
Clear LAT.
Turn off V
FP
(reduce voltage on V
FP
pin to V
DD
).
3.
4.
5.
6.
7.
8.
9.
10.
11.
12.
13.
The flowchart in
Figure 11
demonstrates the recommended erase
sequence.
14-flash