English
Language : 

MC9S12E128CFUE Datasheet, PDF (116/606 Pages) Freescale Semiconductor, Inc – MC9S12E128 Data Sheet
Chapter 2 128 Kbyte Flash Module (FTS128K1V1)
2.4.2 Operating Modes
2.4.2.1 Wait Mode
If the MCU enters wait mode while a Flash command is active (CCIF = 0), that command and any buffered
command will be completed.
The Flash module can recover the MCU from wait mode if the interrupts are enabled (see Section 2.4.5).
2.4.2.2 Stop Mode
If the MCU enters stop mode while a Flash command is active (CCIF = 0), that command will be aborted
and the data being programmed or erased is lost. The high voltage circuitry to the Flash array will be
switched off when entering stop mode. CCIF and ACCERR flags will be set. Upon exit from stop mode,
the CBEIF flag will be set and any buffered command will not be executed. The ACCERR flag must be
cleared before returning to normal operation.
NOTE
As active Flash commands are immediately aborted when the MCU enters
stop mode, it is strongly recommended that the user does not use the STOP
instruction during program and erase execution.
2.4.2.3 Background Debug Mode
In background debug mode (BDM), the FPROT register is writable. If the MCU is unsecured, then all
Flash commands listed in Table 2-16 can be executed. If the MCU is secured and is in special single chip
mode, the only possible command to execute is mass erase.
2.4.3 Flash Module Security
The Flash module provides the necessary security information to the MCU. After each reset, the Flash
module determines the security state of the MCU as defined in Section 2.3.2.2, “Flash Security Register
(FSEC)”.
The contents of the Flash security/options byte at address 0xFF0F in the Flash configuration field must be
changed directly by programming address 0xFF0F when the device is unsecured and the higher address
sector is unprotected. If the Flash security/options byte is left in the secure state, any reset will cause the
MCU to return to the secure operating mode.
2.4.3.1 Unsecuring the MCU using Backdoor Key Access
The MCU may only be unsecured by using the backdoor key access feature which requires knowledge of
the contents of the backdoor key (four 16-bit words programmed at addresses 0xFF00–0xFF07). If
KEYEN[1:0] = 1:0 and the KEYACC bit is set, a write to a backdoor key address in the Flash array triggers
a comparison between the written data and the backdoor key data stored in the Flash array. If all four words
of data are written to the correct addresses in the correct order and the data matches the backdoor key
stored in the Flash array, the MCU will be unsecured. The data must be written to the backdoor key
MC9S12E128 Data Sheet, Rev. 1.07
116
Freescale Semiconductor