English
Language : 

MC68HC908AT32 Datasheet, PDF (59/378 Pages) Freescale Semiconductor, Inc – Microcontrollers
Functional Description
erase the whole EEPROM. EENVR 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 EECR
will be allowed after a valid EEPROM write.
b. The EEPGM bit cannot be set if the EELAT bit is cleared and a non-EEPROM write has
occurred. This is to ensure proper erasing sequence. Once EEPGM is set, the type of erase
mode cannot be modified. If EEPGM is set, the onboard charge pump generates the erase
voltage and applies it to the user EEPROM array. When the EEPGM bit is cleared, the erase
voltage is removed from the array and the internal charge pump is turned off.
c. Any attempt to clear both EEPGM and EELAT bits with a single instruction will only clear
EEPGM. This is to allow time for removal of high voltage from the EEPROM array.
In general, all bits should be erased before being programmed. However, if program/erase cycling is of
concern, minimize bit cycling in each EEPROM byte. If any bit in a byte requires change from a 0 to a 1,
the byte needs be erased before programming. Table 5-1 summarizes the conditions for erasing before
programming.
Table 5-1. EEPROM Program/Erase Cycling Reduction
EEPROM Data
to be Programmed
0
0
1
1
EEPROM Data
before Programming
0
1
0
1
Erase
before Programming?
No
No
Yes
No
5.3.3 EEPROM Block Protection
The 512 bytes of EEPROM are divided into four 128-byte blocks. Each of these blocks can be separately
protected by EEBPx bit. Any attempt to program or erase memory locations within the protected block will
not allow the program/erase voltage to be applied to the array. Table 5-2 shows the address ranges within
the blocks.
Table 5-2. EEPROM Array Address Blocks
Block Number (EEBPx)
EEBP0
EEBP1
EEBP2
EEBP3
Address Range
$0800–$087F
$0880–$08FF
$0900–$097F
$0980–$09FF
If EEBPx bit is set, that corresponding address block is protected. These bits are effective after a reset or
a read to EENVR register. The block protect configuration can be modified by erasing/programming the
corresponding bits in the EENVR register and then reading the EENVR register.
In redundant mode, EEBP3 and EEBP2 will have no meaning.
MC68HC908AT32 Data Sheet, Rev. 3.1
Freescale Semiconductor
59