Datasheet

Chapter 4 Memory
MC9S08SG32 Data Sheet, Rev. 8
Freescale Semiconductor 47
Nonvolatile FLASH registers, shown in Table 4-4, are located in the FLASH memory. These registers
include an 8-byte backdoor key, NVBACKKEY, which can be used to gain access to secure memory
resources. During reset events, the contents of NVPROT and NVOPT in the nonvolatile register area of the
FLASH memory are transferred into corresponding FPROT and FOPT working registers in the high-page
registers to control security and block protection options.
Provided the key enable (KEYEN) bit is 1, the 8-byte comparison key can be used to temporarily
disengage memory security. This key mechanism can be accessed only through user code running in secure
memory. (A security key cannot be entered directly through background debug commands.) This security
key can be disabled completely by programming the KEYEN bit to 0. If the security key is disabled, the
only way to disengage security is by mass erasing the FLASH if needed (normally through the background
debug interface) and verifying that FLASH is blank. To avoid returning to secure mode after the next reset,
program the security bits (SEC) to the unsecured state (1:0).
Table 4-4. Nonvolatile Register Summary
Address Register Name Bit 7 654321Bit 0
0xFFAE NVFTRIM
0 0 0 0 0 0 0 FTRIM
0xFFAF NVTRIM TRIM
0xFFB0 –
0xFFB7
NVBACKKEY
8-Byte Comparison Key
0xFFB8 –
0xFFBC
Reserved
0xFFBD NVPROT
FPS FPDIS
0xFFBE Reserved
0xFFBF NVOPT
KEYEN FNORED 0 0 0 0 SEC