S32K118 Protection bytes in flash at addr. 0x400 - 0x40F

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

S32K118 Protection bytes in flash at addr. 0x400 - 0x40F

543 Views
nourgati
Contributor I
0 Kudos
Reply
2 Replies

488 Views
VaneB
NXP TechSupport
NXP TechSupport

Hi @nourgati 

Please use J-Link Commander to read the MDM-AP registers (see Section 58.6, "MDM-AP Status and Control Registers," in the S32K1xx Series Reference Manual, Rev. 14.1). Then, manually trigger the mass-erase. Before you do this, make sure the MDM-AP_STATUS[1] bit (Flash ready) and the MDM-AP_STATUS[5] bit (mass erase enabled) are both set. You can find the J-Link script in the S32Kxxx SEGGER Knowledge Base.

Also, before the MCU was locked, did you enable CSEc (keys allocated) in the MCU? This might have happened if you tested the encrypted SDK example. If CSEc was enabled before the MCU was locked, you cannot recover the MCU, as mass erase is not allowed even if the MDM-AP status register shows that mass erase is enabled.

Be aware that the first sector might not be programmed correctly when loading new code, which can cause the MCU to become permanently locked.

 

BR, VaneB

0 Kudos
Reply

542 Views
nourgati
Contributor I

When I try to connect to my S32K118 MCU, I encounter an error. I believe that during the last programming session, the device wrote to the secure zone of the flash (the flash configuration field at 0x400–0x40F), which should be protected. I don’t understand why this write occurred. As a result, I cannot reconnect to the device to erase it or perform any other actions. how can i unlock it?? please a response 

0 Kudos
Reply