Freescale Semiconductor MC9S12XDP512 Microscope & Magnifier User Manual


 
Chapter 3 4 Kbyte EEPROM Module (S12XEETX4KV2)
MC9S12XDP512 Data Sheet, Rev. 2.11
Freescale Semiconductor 175
3.6.1 Unsecuring the MCU in Special Single Chip Mode using BDM
Before the MCU can be unsecured in special single chip mode, the EEPROM memory must be erased
using 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 EEPROM module, and execute a
mass erase command write sequence to erase the EEPROM memory.
After the CCIF flag sets to indicate that the EEPROM mass operation has completed and assuming that the
Flash memory has also been erased, reset the MCU into special single chip mode. The BDM secure ROM
will verify that the Flash and EEPROM memory are 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. Once the MCU is unsecured, BDM commands will be enabled and the Flash security byte
may be programmed to the unsecure state.
3.7 Resets
3.7.1 EEPROM Reset Sequence
On each reset, the EEPROM module executes a reset sequence to hold CPU activity while loading the
EPROT register from the EEPROM memory according to Table 3-1.
3.7.2 Reset While EEPROM Command Active
If a reset occurs while any EEPROM command is in progress, that command will be immediately aborted.
The state of a word being programmed or the sector / block being erased is not guaranteed.
3.8 Interrupts
The EEPROM module can generate an interrupt when all EEPROM command operations have completed,
when the EEPROM address, data, and command buffers are empty.
NOTE
Vector addresses and their relative interrupt priority are determined at the
MCU level.
Table 3-11. EEPROM Interrupt Sources
Interrupt Source Interrupt Flag Local Enable Global (CCR) Mask
EEPROM address, data, and command buffers empty CBEIF
(ESTAT register)
CBEIE
(ECNFG register)
I Bit
All EEPROM commands completed CCIF
(ESTAT register)
CCIE
(ECNFG register)
I Bit