English
Language : 

MC68HC908RK2 Datasheet, PDF (32/158 Pages) Motorola, Inc – Microcontroller Unit
Memory
2.5.4 FLASH 2TS Program/Margin Read Operation
NOTE
After a total of eight program operations have been applied to a row, the row
must be erased before further programming to avoid program disturb. An
erased byte will read $00.
The FLASH 2TS memory is programmed on a page basis. A page consists of one byte. The smart
programming algorithm (Figure 2-4) is recommended to program every page in the FLASH 2TS memory.
The embedded smart programming algorithm uses this step-by-step sequence to program the data into
the FLASH memory. The algorithm optimizes the time required to program each page. Refer to 2.5.7
Embedded Program/Erase Routines for information on utilizing embedded routines.
1. Set the FDIV bits. These bits determine the charge pump frequency.
2. Set PGM = 1. This configures the memory for program operation and enables the latching of
address and data for programming.
3. Read the FLASH 2TS block protect register (FLBPR).
4. Write data to the one byte being programmed.
5. Set HVEN = 1.
6. Wait for a time, tStep.
7. Set HVEN = 0.
8. Wait for a time, tHVTV.
9. Set MARGIN = 1.
10. Wait for a time, tVTP.
11. Set PGM = 0.
12. Wait for a time, tHVD.
13. Read back data in margin read mode. This read operation is stretched by eight cycles.
14. Clear the MARGIN bit. If the margin read data is identical to
write data, the program operation is complete; otherwise, jump to step 2.
NOTE
While these operations must be performed in the order shown, other
unrelated operations may occur between the steps.
The smart programming algorithm guarantees the minimum possible program time.
MC68HC908RK2 Data Sheet, Rev. 5.1
32
Freescale Semiconductor