Freescale Semiconductor, Inc.
EEPROM-2
7.4.2 EEPROM Erasing
The unprogrammed state is a logic 1. Only the valid EEPROM bytes in
the non-protected blocks and EENVR2 can be erased. When the array
is configured in the redundant mode, erasing the first 256 bytes also will
erase the last 256 bytes.
Using this step-by-step procedure erases EEPROM:
1. Clear/set EERAS1 and EERAS0 to select byte/block/bulk erase,
and set EELAT in EECR2. (See note a.)
2. Write any data to the desired address for byte erase, to any
address in the desired block for block erase, or to any array
address for bulk erase.
3. Set the EEPGM bit. (See note b.)
4. Wait for a time, tEEPGM EEBLOCK EEBULK
/t
/t
.
5. Clear EEPGM bit.
6. Wait for a time, tEEFPV, for the erasing voltage to fall.
7. Clear EELAT bits. (See note c.)
8. Repeat steps 1 to 7 for more EEPROM byte/block erasing.
EEBPx bit must be cleared to erase EEPROM data in the corresponding
block. If any EEBPx is set, the corresponding block cannot be erased
and bulk erase mode does not apply.
Notes:
a. Setting the EELAT bit configures the address and data buses to
latch data for erasing the array. Only valid EEPROM addresses
with their data will be latched. If another consecutive valid
EEPROM write occurs, this address and data will override the
previous address and data. In block erase mode, any EEPROM
address in the block may be used in step 2. All locations within
this block will be erased. In bulk erase mode, any EEPROM
address may be used to erase the whole EEPROM. EENVR2 is
not affected with block or bulk erase. Any attempts to read other
EEPROM data will read the latched data. If EELAT is set, other
writes to the EECR2 will be allowed after a valid EEPROM write.
Technical Data
MC68HC908AS60 — Rev. 1.0
EEPROM-2
For More Information On This Product,
Go to: www.freescale.com