English
Language : 

MC68HC908AS32A Datasheet, PDF (56/280 Pages) Freescale Semiconductor, Inc – Microcontrollers
Memory
In order to avoid program disturbs, the row must be erased before any byte on that row is programmed.
1. Set the PGM bit. This configures the memory for program operation and enables the latching of
address and data for programming.
2. Read the FLASH block protect register.
3. Write any data to any FLASH location within the address range desired.
4. Wait for a time, tNVS (minimum 10 µs).
5. Set the HVEN bit.
6. Wait for a time, tPGS (minimum 5 µs).
7. Write data to the FLASH address being programmed(1).
8. Wait for time, tPROG (minimum 30 µs).
9. Repeat step 7 and 8 until all desired bytes within the row are programmed.
10. Clear the PGM bit(1).
11. Wait for time, tNVH (minimum 5 µs).
12. Clear the HVEN bit.
13. After time, tRCV (typical 1 µs), the memory can be accessed in read mode again.
The FLASH programming algorithm flowchart is shown in Figure 2-14.
NOTE
A. Programming and erasing of FLASH locations can not be performed by
code being executed from the same FLASH array.
B. While these operations must be performed in the order shown, other
unrelated operations may occur between the steps. However, care must be
taken to ensure that these operations do not access any address within the
FLASH array memory space such as the COP control register at $FFFF.
C. It is highly recommended that interrupts be disabled during
program/erase operations.
D. Do not exceed t PROG maximum or tHV maximum. tHV is defined as the
cumulative high voltage programming time to the same row before next
erase. tHV must satisfy this condition: tNVS+ tNVH + tPGS + (tPROGX 64) ≤ tHV
max. Please also see 19.11.3 FLASH Memory Characteristics.
E. The time between each FLASH address change (step 7 to step 7), or the
time between the last FLASH address programmed to clearing the PGM bit
(step 7 to step 10) must not exceed tPROG maximum.
F. Be cautious when programming the FLASH array to ensure that
non-FLASH locations are not used as the address that is written to when
selecting either the desired row address range in step 3 of the algorithm or
the byte to be programmed in step 7 of the algorithm. This applies
particularly to $FFDA–$FFFF (38 bytes)
1. The time between each FLASH address change, or the time between the last FLASH address programmed to clearing PGM
bit, must not exceed the maximum programming time, tPROG maximum.
MC68HC908AS32A Data Sheet, Rev. 2.0
56
Freescale Semiconductor