Freescale Semiconductor TWR-S12G64 Scalable Platform for Automotive Applications TWR-S12G64-KIT TWR-S12G64-KIT Data Sheet

Product codes
TWR-S12G64-KIT
Page of 1292
16 KByte Flash Module (S12FTMRG16K1V1)
MC9S12G Family Reference Manual, Rev.1.23
Freescale Semiconductor
797
24.3.2.10 EEPROM Protection Register (EEPROT)
The EEPROT register defines which EEPROM sectors are protected against program and erase operations.
The (unreserved) bits of the EEPROT register are writable with the restriction that protection can be added
but not removed. Writes must increase the DPS value and the DPOPEN bit can only be written from 1
(protection disabled) to 0 (protection enabled). If the DPOPEN bit is set, the state of the DPS bits is
irrelevant.
During the reset sequence, fields DPOPEN and DPS of the EEPROT register are loaded with the contents
of the EEPROM protection byte in the Flash configuration field at global address 0x3_FF0D located in
P-Flash memory (see
) as indicated by reset condition F in
. To change the
EEPROM protection that will be loaded during the reset sequence, the P-Flash sector containing the
EEPROM protection byte must be unprotected, then the EEPROM protection byte must be programmed.
If a double bit fault is detected while reading the P-Flash phrase containing the EEPROM protection byte
during the reset sequence, the DPOPEN bit will be cleared and DPS bits will be set to leave the EEPROM
memory fully protected.
Trying to alter data in any protected area in the EEPROM memory will result in a protection violation error
and the FPVIOL bit will be set in the FSTAT register. Block erase of the EEPROM memory is not possible
if any of the EEPROM sectors are protected.
Offset Module Base + 0x0009
7
6
5
4
3
2
1
0
R
DPOPEN
0
0
DPS[4:0]
W
Reset
F
1
1
Loaded from IFR Flash configuration field, during reset sequence.
0
0
F
F
F
F
= Unimplemented or Reserved
Figure 24-14. EEPROM Protection Register (EEPROT)
Table 24-20. EEPROT Field Descriptions
Field
Description
7
DPOPEN
EEPROM Protection Control
0 Enables EEPROM memory protection from program and erase with protected address range defined by DPS
bits
1 Disables EEPROM memory protection from program and erase
4–0
DPS[4:0]
EEPROM Protection Size — The DPS[4:0] bits determine the size of the protected area in the EEPROM
memory as shown in