![](http://datasheet.mmic.net.cn/370000/P9S12XEP100J1VVLR_datasheet_16728329/P9S12XEP100J1VVLR_348.png)
Chapter 9 Security (S12XE9SECV2)
MC9S12XE-Family Reference Manual , Rev. 1.07
348
Freescale Semiconductor
9.1.3
Securing the Microcontroller
Once the user has programmed the Flash and EEPROM, the chip can be secured by programming the
security bits located in the options/security byte in the Flash memory array. These non-volatile bits will
keep the device secured through reset and power-down.
Theoptions/securitybyteislocatedataddress0xFF0F(=globaladdress0x7F_FF0F)intheFlashmemory
array.ThisbytecanbeerasedandprogrammedlikeanyotherFlashlocation.Twobitsofthisbyteareused
for security (SEC[1:0]). On devices which have a memory page window, the Flash options/security byte
is also available at address 0xBF0F by selecting page 0x3F with the PPAGE register. The contents of this
byte are copied into the Flash security register (FSEC) during a reset sequence.
The meaning of the bits KEYEN[1:0] is shown in
Table 9-3
. Please refer to
Section 9.1.5.1, “Unsecuring
the MCU Using the Backdoor Key Access”
for more information.
Table 9-2. Feature Availability in Unsecure and Secure Modes on S12XE
Unsecure Mode
Secure Mode
NS
SS
NX
ES
EX
ST
NS
SS
NX
ES
EX
ST
Flash Array Access
(1)
1. Availability of Flash arrays in the memory map depends on ROMCTL/EROMCTL pins and/or the state of the
ROMON/EROMON bits in the MMCCTL1 register. Please refer to the S12X_MMC block guide for detailed
information.
2. Restricted NVM command set only. Please refer to the NVM wrapper block guides for detailed information.
3. BDM hardware commands restricted to peripheral registers only.
1
1
1
—
—
—
—
EEPROM Array Access
—
—
—
—
NVM Commands
(2)
2
2
2
2
2
2
2
2
2
BDM
—
(3)
—
—
—
—
DBG Module Trace
—
—
—
—
—
—
XGATE Debugging
—
—
—
—
—
—
External Bus Interface
—
—
—
—
Internal status visible
multiplexed on
external bus
—
—
—
—
—
—
—
—
Internal accesses visible
on external bus
—
—
—
—
—
—
—
—
—
—
7
6
5
4
3
2
1
0
0xFF0F
KEYEN1
KEYEN0
NV5
NV4
NV3
NV2
SEC1
SEC0
Figure 9-1. Flash Options/Security Byte