Memory
FLASH Memory (FLASH)
MC68HLC908QY/QT Family — Rev. 2
Data Sheet
MOTOROLA
Memory
35
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.
NOTE:
The COP register at location $FFFF should not be written between steps 5-12,
when the HVEN bit is set. Since this register is located at a valid FLASH address,
unpredictable behavior may occur if this location is written while HVEN is set.
This program sequence is repeated throughout the memory until all data is
programmed.
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 shown, other unrelated operations may occur between the steps. Do not
2.6.5 FLASH Protection
Due to the ability of the on-board charge pump to erase and program the FLASH
memory in the target application, provision is made to protect blocks of memory
from unintentional erase or program operations due to system malfunction. This
protection is done by use of a FLASH block protect register (FLBPR). The FLBPR
determines the range of the FLASH memory which is to be protected. The range
of the protected area starts from a location defined by FLBPR and ends to the
bottom of the FLASH memory ($FFFF). When the memory is protected, the HVEN
bit cannot be set in either ERASE or PROGRAM operations.
NOTE:
In performing a program or erase operation, the FLASH block protect register must
be read after setting the PGM or ERASE bit and before asserting the HVEN bit.
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.