English
Language : 

MC9S12XD256MAL Datasheet, PDF (1225/1348 Pages) Freescale Semiconductor, Inc – Freescale’s Scalable Controller Area Network
29.5 Operating Modes
Chapter 29 128 Kbyte Flash Module (S12XFTX128K1V1)
29.5.1 Wait Mode
If a command is active (CCIF = 0) when the MCU enters wait mode, the active command and any buffered
command will be completed.
The Flash module can recover the MCU from wait mode if the CBEIF and CCIF interrupts are enabled
(see Section 29.8, “Interrupts”).
29.5.2 Stop Mode
If a command is active (CCIF = 0) when the MCU enters stop mode, the operation will be aborted and, if
the operation is program or erase, the Flash array data being programmed or erased may be corrupted and
the CCIF and ACCERR flags will be set. If active, the high voltage circuitry to the Flash memory will
immediately be switched off when entering stop mode. Upon exit from stop mode, the CBEIF flag is set
and any buffered command will not be launched. The ACCERR flag must be cleared before starting a
command write sequence (see Section 29.4.1.2, “Command Write Sequence”).
NOTE
As active 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 or erase operations.
29.5.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 29-18 can be executed. If the MCU is secured and is in special single chip
mode, only mass erase can be executed.
29.6 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 29.3.2.2, “Flash Security Register
(FSEC)”.
The contents of the Flash security byte at 0x7F_FF0F in the Flash Configuration Field must be changed
directly by programming 0x7F_FF0F when the MCU is unsecured and the higher address sector is
unprotected. If the Flash security byte is left in a secured state, any reset will cause the MCU to initialize
to a secure operating mode.
29.6.1 Unsecuring the MCU using Backdoor Key Access
The MCU may be unsecured by using the backdoor key access feature which requires knowledge of the
contents of the backdoor keys (four 16-bit words programmed at addresses 0x7F_FF00–0x7F_FF07). If
the KEYEN[1:0] bits are in the enabled state (see Section 29.3.2.2, “Flash Security Register (FSEC)”) and
the KEYACC bit is set, a write to a backdoor key address in the Flash memory triggers a comparison
Freescale Semiconductor
MC9S12XDP512 Data Sheet, Rev. 2.21
1227