Datasheet
Programming the FLASH EEPROM
M68HC12B Family Data Sheet, Rev. 9.1
Freescale Semiconductor 105
8.5 Programming the FLASH EEPROM
Programming the FLASH EEPROM is accomplished by this step-by-step procedure. The V
FP
pin voltage
must be at the proper level prior to executing step 4 the first time.
1. Apply program/erase voltage to the V
FP
pin.
2. Clear ERAS and set the LAT bit in the FEECTL register to establish program mode and enable
programming address and data latches.
3. Write data to a valid address. The address and data are latched. If BOOTP is asserted, an attempt
to program an address in the boot block will be ignored.
4. Apply programming voltage by setting ENPE.
5. Delay for one programming pulse, t
PPULSE
.
6. Remove programming voltage by clearing ENPE.
7. Delay while high voltage is turning off, t
VPROG
.
8. Read the address location to verify that it has been programmed,
9. If the location is not programmed, repeat steps 4 through 7 until the location is programmed or until
the specified maximum number of program pulses, n
PP
, has been reached.
10. If the location is programmed, repeat the same number of pulses as required to program the
location. This provides 100 percent program margin.
11. Read the address location to verify that it remains programmed.
12. Clear LAT.
13. If there are more locations to program, repeat steps 2 through 10.
14. Turn off V
FP
. Reduce voltage on V
FP
pin to V
DD
.
The flowchart in Figure 8-5 demonstrates the recommended programming sequence.
