English
Language : 

MC68HC908JW32_09 Datasheet, PDF (37/232 Pages) Freescale Semiconductor, Inc – M68HC08 Microcontrollers
FLASH Memory
7. Wait for a time, tnvh (5 µs).
8. Clear the HVEN bit
9. After time, trcv (1 µs), the memory can be accessed in read mode again.
NOTE
Programming and erasing of FLASH locations cannot be performed by
code being executed from the FLASH memory. While these operations
must be performed in the order as shown, but other unrelated operations
may occur between the steps.
2.5.4 FLASH Mass Erase Operation
Use the following procedure to erase the entire FLASH memory:
1. Set both the ERASE bit and the MASS bit in the FLASH control register.
2. Write any data to any FLASH location within the FLASH memory address range.
3. Wait for a time, tnvs (5 µs).
4. Set the HVEN bit.
5. Wait for a time tme (200 ms).
6. Clear the ERASE bit.
7. Wait for a time, tnvh1 (100 µs).
8. Clear the HVEN bit.
9. After time, trcv (1 µs), the memory can be accessed in read mode again.
NOTE
Programming and erasing of FLASH locations cannot be performed by
code being executed from the FLASH memory. While these operations
must be performed in the order as shown, but other unrelated operations
may occur between the steps.
2.5.5 FLASH Program Operation
Programming of the FLASH memory is done on a row basis. A row consists of 64 consecutive bytes
starting from addresses $XX00, $XX40, $XX800 or $XXC00. Use the following procedure to program a
row of FLASH memory. (Figure 2-4 shows a flowchart of the programming algorithm.)
1. Set the PGM bit. This configures the memory for program operation and enables the latching of
address and data for programming.
2. Write any data to any FLASH location within the address range of the row to be programmed.
3. Wait for a time, tnvs (5 µs).
4. Set the HVEN bit.
5. Wait for a time, tpgs (10 µs).
6. Write data to the FLASH location to be programmed.
7. Wait for time, tprog (20 µs to 40 µs).
8. Repeat steps 6 and 7 until all bytes within the row are programmed.
9. Clear the PGM bit.
10. Wait for time, tnvh (5 µs).
11. Clear the HVEN bit.
12. After time, trcv (1 µs), the memory can be accessed in read mode again.
MC68HC908JW32 Data Sheet, Rev. 6
Freescale Semiconductor
37