Hi Subash,
Yes, the EEE at S12XE is typically partitioned just once per lifetime.
Yes, the only way how to clear partitioning is complete mass erase of whole MCU.
The simplest way how to do it is execution unsecure procedure.
In Code Warrior debugger menu ->MultilinkCyclonePro->Unsecure…
If not work you can use unsecure12 from P&E (only for PEmicro BDM interfaces):
http://www.pemicro.com/downloads/download_file.cfm?download_id=16
That will complete erasing the whole MCU include partitioning information.
The execution "Erase All Blocks Command - 0x08" directly by MCU code goes to Illegal break point because you erase code which you execute. The execution "Erase All Blocks Command - 0x08" directly by MCU code doesn’t have so much sense except “self-destruction” application. ;-)
Q1)
Not possible due to safety reason. The only way is through complete mass erase in a special mode.
Q2)
The commands "Set User Margin Level Command - 0x0D, Set Field Margin Level Command - 0x0E" are designed for flash reliability testing – test whether memory cells are enough charged/discharged.
They cannot help in such manner.
For more details about Margin Level commands, please check AN3419 System Integrity Techniques for the S12XE:
http://www.nxp.com/files/microcontrollers/doc/app_note/AN3419.pdf
Q3)
Not possible due to safety reason. The only way is through complete mass erase in a special mode.
More details about EEE at S12XE may be found in attached short description and example codes.
I hope it helps you.
Have a great day,
Radek
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------