English
Language : 

MC9S12NE64_06 Datasheet, PDF (102/554 Pages) Freescale Semiconductor, Inc – Microcontrollers
Chapter 2 64 Kbyte Flash Module (S12FTS64KV3)
2.6.2 Unsecuring the Flash Module in Special Single-Chip Mode using
BDM
The MCU can be unsecured in special single-chip mode by erasing the Flash module by the following
method :
• Reset the MCU into special single-chip mode, delay while the erase test is performed by the BDM
secure ROM, send BDM commands to disable protection in the Flash module, and execute a mass
erase command write sequence to erase the Flash memory.
After the CCIF flag sets to indicate that the mass operation has completed, reset the MCU into special
single-chip mode. The BDM secure ROM will verify that the Flash memory is erased and will assert the
UNSEC bit in the BDM status register. This BDM action will cause the MCU to override the Flash security
state and the MCU will be unsecured. All BDM commands will be enabled and the Flash security byte
may be programmed to the unsecure state by the following method:
• Send BDM commands to execute a word program sequence to program the Flash security byte to
the unsecured state and reset the MCU.
2.7 Resets
2.7.1 Flash Reset Sequence
On each reset, the Flash module executes a reset sequence to hold CPU activity while loading the following
registers from the Flash memory according to Table 2-1:
• FPROT — Flash Protection Register (see Section 2.3.2.5).
• FCTL — Flash Control Register (see Section 2.3.2.9).
• FSEC — Flash Security Register (see Section 2.3.2.2).
2.7.2 Reset While Flash Command Active
If a reset occurs while any Flash command is in progress, that command will be immediately aborted. The
state of the word being programmed or the sector / block being erased is not guaranteed.
2.8 Interrupts
The Flash module can generate an interrupt when all Flash command operations have completed, when the
Flash address, data, and command buffers are empty.
Table 2-19. Flash Interrupt Sources
Interrupt Source
Interrupt Flag
Local Enable
Global (CCR) Mask
Flash address, data and command buffers empty CBEIF (FSTAT register) CBEIE (FCNFG register)
I Bit
All Flash commands completed
CCIF (FSTAT register) CCIE (FCNFG register)
I Bit
MC9S12NE64 Data Sheet, Rev. 1.1
102
Freescale Semiconductor