Datasheet

Table Of Contents
FLASH-2 Memory (FLASH-2)
MC68HC908GR60A • MC68HC908GR48A • MC68HC908GR32A Data Sheet, Rev. 5
Freescale Semiconductor 53
When bits within FL2BPR are programmed (0), they lock a block of memory address ranges as shown in
2.7.2.2 FLASH-2 Block Protect Register. If FL2BPR is programmed with any value other than $FF, the
protected block of FLASH memory can not be erased or programmed.
NOTE
The vector locations and the FLASH block protect registers are located in
the same page. FL1BPR and FL2BPR are not protected with special
hardware or software. Therefore, if this page is not protected by FL1BPR
and the vector locations are erased by either a page or a mass erase
operation, both FL1BPR and FL2BPR will also get erased.
2.7.4 FLASH-2 Mass Erase Operation
Use this step-by-step procedure to erase the entire FLASH-2 memory:
1. Set both the ERASE bit and the MASS bit in the FLASH-2 control register (FL2CR).
2. Read the FLASH-2 block protect register (FL2BPR).
NOTE
Mass erase is disabled whenever any block is protected (FL2BPR does not
equal $FF).
3. Write to any FLASH-2 address within the FLASH-2 array with any data.
4. Wait for a time, t
NVS
(minimum 10 μs).
5. Set the HVEN bit.
6. Wait for a time, t
MERASE
(minimum 4 ms).
7. Clear the ERASE and MASS bits.
8. Wait for a time, t
NVHL
(minimum 100 μs).
9. Clear the HVEN bit.
10. Wait for a time, t
RCV
, (typically 1 μs) after which the memory can be accessed in normal read mode.
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 (COPCTL) at
$FFFF.
C. It is highly recommended that interrupts be disabled during program/erase operations.