Hi Angelo,
According to your description, it rather looks like secured MCU.
Please try using the unsecure feature in CW In Code Warrior debugger menu ->MultilinkCyclonePro->Unsecure…
It should completely erase the whole MCU…
The reason for secured MCU may be probably ECC.
Datasheet says:
"If a double bit fault is detected while reading the P-Flash phrase containing the P-Flash protection byte during the reset sequence, the FPOPEN bit will be cleared and remaining bits in the FPROT register will be set to leave the P-Flash memory fully protected."
The security byte at 0xFF0F address is programmed to 0xFE by default. If we load any data into phrase 0xFF08~0xFF0F, we have to erase security byte first.
This may be solved by “FLASH NOUNSECURE” command in preload command file (P&E_Multilink_USB_Preload.cmd if you use PE Multilink).
See short description about S12(X) security for more details:
https://community.nxp.com/docs/DOC-93803
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!
-----------------------------------------------------------------------------------------------------------------------