Chapter 19 64 Kbyte Flash Module (S12FTS64KV4)
Freescale Semiconductor
MC9S12C-Family / MC9S12GC-Family
571
Rev 01.24
19.4.2
Operating Modes
19.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
19.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.
19.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
can be executed. If the MCU is secured and is in special single chip
mode, the only possible command to execute is mass erase.
19.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 19.3.2.2, “Flash Security Register
.
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.
19.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
Summary of Contents for MC9S12C Family
Page 689: ......