Chapter 3 2 Kbyte EEPROM Module (EETS2KV1)
MC9S12HZ256 Data Sheet, Rev. 2.05
102
Freescale Semiconductor
To change the EEPROM protection that will be loaded on reset, the upper sector of EEPROM must rst
be unprotected, then the EEPROM protect byte located at address 0x07FD must be written to.
A protected EEPROM sector is disabled by the EPDIS bit while the size of the protected sector is dened
by the EP bits in the EPROT register.
Trying to alter any of the protected areas will result in a protect violation error and PVIOL ag will be set
in the ESTAT register. A mass erase of a whole EEPROM block is only possible when protection is fully
disabled by setting the EPOPEN and EPDIS bits. An attempt to mass erase an EEPROM block while
protection is enabled will set the PVIOL ag in the ESTAT register.
3.3.2.6
EEPROM Status Register (ESTAT)
The ESTAT register denes the EEPROM state machine command status and EEPROM array access,
protection and erase verify status.
Table 3-5. EPROT Field Descriptions
Field
Description
7
EPOPEN
Opens EEPROM for Program or Erase
0 The whole EEPROM array is protected. In this case, the EPDIS and EP bits within the protection register are
ignored.
1 The EEPROM sectors not protected are enabled for program or erase.
6:4
NV[6:4]
Nonvolatile Flag Bits — These three bits are available to the user as nonvolatile ags.
3
EPDIS
EEPROM Protection Address Range Disable — The EPDIS bit determines whether there is a protected area
in the space of the EEPROM address map.
0 Protection enabled
1 Protection disabled
2:0
EP[2:0]
EEPROM Protection Address Size — The EP[2:0] bits determine the size of the protected sector. Refer to
Table 3-6. EEPROM Address Range Protection
EP[2:0]
Protected
Address Range
Protected Size
000
0x07C0-0x07FF
64 bytes
001
0x0780-0x07FF
128 bytes
010
0x0740-0x07FF
192 bytes
011
0x0700-0x07FF
256 bytes
100
0x06C0-0x07FF
320 bytes
101
0x0680-0x07FF
384 bytes
110
0x0640-0x07FF
448 bytes
111
0x0600-0x07FF
512 bytes