Technical data

MOTOROLA MC68HC912B32
42 MC68HC912B32TS/D
7.6 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. 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 is latched. If BOOTP is asserted, an at-
tempt 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
• 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 has been reached (n
PP
)
• If the location is programmed, repeat the same number of pulses as required to program the
location. This provides 100% program margin.
9. Read the address location to verify that it remains programmed.
10. Clear LAT.
11. If there are more locations to program, repeat steps 2 through 10.
12. Turn off V
FP
(reduce voltage on V
FP
pin to V
DD
).
The flowchart in Figure 7 demonstrates the recommended programming sequence.