How to unlock S32K148 Chip

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

How to unlock S32K148 Chip

跳至解决方案
4,955 次查看
VinhNguyen13
Contributor II

I used J-Link V9 to connect and flash SW for FS32K148 chip, but I faced this issue as picture below.

VinhNguyen13_0-1608265265033.png

From my understanding, my chip is locked due to the wrong data is written to the flash at Address 0x400 -> 0x40F (related to protection bytes).

I tried to unlock chip by command:

[

J-Link>r0 // pull reset pin low

J-Link>swdwritedp 2,0x01000000 // MDM_AP status register

J-Link>swdreadap 0 // Read MDM_AP status register
J-Link>swdreadap 0 // Read MDM_AP status register (has to be done 2x) Flash memory ready and Mass erase enable bits should be set

J-Link>swdreadap 1 // Read MDM_AP control register
J-Link>swdreadap 1 // Read MDM_AP control register (has to be done 2x)

J-Link>unlock Kinetis // Erase and unsecure the MCU

]

But I can't. The error shown that:

VinhNguyen13_1-1608265584055.png

VinhNguyen13_2-1608265600338.png

 

Is there anyone faced this issue? Could you please to support for fixing this.

Thank you.

 

0 项奖励
回复
1 解答
4,923 次查看
VinhNguyen13
Contributor II

Hello Alexis,

I unlocked the ECU successfully!

The hints are: connect the Reset Pin (in JTAG) to the GND. Then, performing the unlocking procedure. After that, I loaded the correct source code (srec file) by Production Programming. Now the ECU is alive. 

Best Regards

在原帖中查看解决方案

0 项奖励
回复
3 回复数
4,927 次查看
Alexis_A
NXP TechSupport
NXP TechSupport

Hello @VinhNguyen13,

Writing to this register without taking care of the bits written will lock the MCU without the recovery option and for the messages in the debug probe looks like that this is the case.  You can take a look at the description of this register at the RM 36.4.1 Flash configuration field description.

Best Regards,

Alexis Andalon

0 项奖励
回复
4,924 次查看
VinhNguyen13
Contributor II

Hello Alexis,

I unlocked the ECU successfully!

The hints are: connect the Reset Pin (in JTAG) to the GND. Then, performing the unlocking procedure. After that, I loaded the correct source code (srec file) by Production Programming. Now the ECU is alive. 

Best Regards

0 项奖励
回复
4,698 次查看
KiranE
Contributor I

Hi VinhNguyen13,

I am also facing the same issue. Getting time out error while unlocking the device. I have followed the procedure as mentioned. I have connected reset pin to ground and executed the J-Link commands as follows

J-Link>r0

J-Link>si 1

J-Link>swdselect

J-Link>swdwritedp 2, 0x01000000

J-Link>swdreadap 0

J-Link>swdreadap 0

J-Link>swdreadap 1

J-Link>swdreadap 1

J-Link>unlock Kinetis

J-Link Command line Unlock.png

Am I missing anything here? Thanks

 

 

 

 

 

 

 

0 项奖励
回复