Advance Information MC68HC908MR16/MC68HC908MR32 — Rev. 4.0
64 FLASH Memory MOTOROLA
FLASH Memory
NOTE: Programming and erasing of FLASH locations cannot be performed by
code being executed from the FLASH memory. While these operat io ns
must be performed in the order shown, other unrelat ed o per ations may
occur between the steps. Do not exceed tPROG maximum. See Section
22. Electrical Specifications.
4.8 FLASH Block ProtectionDue to the ability of the on-board charge pump to erase and program the
FLASH memory in the target application, provision is made for protecting
a block of memory from unintentional erase or program operations due
to system malfunction. This protection is done by using a FLASH block
protect register (FLBPR).
The FLBPR determines the range of the FLASH memory whi ch is to b e
protected. The range of the protected area starts from a location d efined
by FLBPR and ends at 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
When the FLBPR is programmed with all 0s, the entire memory is
protected from being programmed and erased. When all the bits are
erased (all 1s), the entire memory is accessible for program and erase.
When bits within the FLBPR are programmed, th ey lock a block of
memory, whose address ranges are shown in 4.9 FLASH Block Protect
Register. Once the FLBPR is programmed with a val ue other than $FF,
any erase or program of the FLBPR or the protected block of FLASH
memory is prohibited. The FLBPR itself can be erased or programmed
only with an external voltage, VTST, presen t on the IRQ pin. This voltage
also allows entry from reset into the monitor mode.