How to unlock S32K148 Chip

cancel
Showing results for 
Search instead for 
Did you mean: 

How to unlock S32K148 Chip

Jump to solution
132 Views
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 Kudos
1 Solution
100 Views
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

View solution in original post

0 Kudos
2 Replies
104 Views
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 Kudos
101 Views
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

View solution in original post

0 Kudos