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

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

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

538 次查看
nourgati
Contributor I
0 项奖励
回复
2 回复数

483 次查看
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 项奖励
回复

537 次查看
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 项奖励
回复