I used J-Link V9 to connect and flash SW for FS32K148 chip, but I faced this issue as picture below.
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:
Is there anyone faced this issue? Could you please to support for fixing this.
Thank you.
Solved! Go to Solution.
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
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
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
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
Am I missing anything here? Thanks