Flash EEPROM
Programming the Flash EEPROM
68HC(9)12DG128 Rev 1.0
MOTOROLA
Flash EEPROM
101
11-flash
Software also controls the supply of the proper program/erase voltage to
the V
FP
pin, and should be at the proper level before ENPE is set during
a program/erase sequence.
A program/erase cycle should not be in progress when starting another
program/erase, or while attempting to read from the array.
NOTE:
Although clearing ENPE disables the program/erase voltage (V
FP
) from
the V
FP
pin to the array, care must be taken to ensure that V
FP
is at V
DD
whenever programming/erasing is not in progress. Not doing so could
damage the part. Ensuring that V
FP
is always greater or equal to V
DD
can be accomplished by controlling the V
FP
power supply with the
programming software via an output pin. Alternatively, all programming
and erasing can be done prior to installing the device on an application
circuit board which can always connect V
FP
to V
DD
. Programming can
also be accomplished by plugging the board into a special programming
fixture which provides program/erase voltage to the V
FP
pin.
Programming the Flash EEPROM
Programming the Flash EEPROM is accomplished by the following
sequence. The V
FP
pin voltage must be at the proper level prior to
executing step 4 the first time.
1.
2.
Apply program/erase voltage to the V
FP
pin.
Set the PPAGE to point to the 16K Flash window to be
programmed and corresponding register block. Clear ERAS and
set the LAT bit in the FEECTL register to establish program mode
and enable programming address and data latches.
Write data to a valid address. The address and data is latched. If
BOOTP is asserted, an attempt to program an address in the boot
block will be ignored.
Apply programming voltage by setting ENPE.
Delay for one programming pulse (t
PPULSE
).
Remove programming voltage by clearing ENPE.
Delay while high voltage is turning off (t
VPROG
).
Read the address location to verify that it has been programmed
3.
4.
5.
6.
7.
8.