Saturday, February 24th 2018, 4:47am UTC+1

You are not logged in.

  • Login
  • Register

Dear visitor, welcome to SEGGER Forum. If this is your first visit here, please read the Help. It explains how this page works. You must be registered before you can use all the page's features. Please use the registration form, to register here or read more information about the registration process. If you are already registered, please login here.

zhongyb

Beginner

Date of registration: Dec 6th 2007

Posts: 18

1

Thursday, November 1st 2012, 5:43pm

How to unlock a secured Freescale Kinetis L chip

Hi,

I am working on an FRDM-KL25Z board. But the MKL24Z128xx chip was secured accidentally, the on-board OpenSDA can not unlock this chip, so I try to using "unlock kinetis" command in Jlink commander, but it also can not be unlocked successfully, and Jlink commander displays the following message.


===================================================

SEGGER J-Link Commander V4.56 ('?' for help)
Compiled Oct 22 2012 19:40:24
DLL version V4.56, compiled Oct 22 2012 19:40:04
Firmware: J-Link ARM V8 compiled Sep 20 2012 13:27:01
Hardware: V8.00
S/N:
Feature(s):
VTarget = 3.002V
Info: Found SWD-DP with ID 0x0BC11477


****** Error: Could not read AHB-AP Id. Could not connect to target.
Info: Found SWD-DP with ID 0x0BC11477
No devices found on JTAG chain. Trying to find device on SWD.
Info: Found SWD-DP with ID 0x0BC11477


****** Error: Could not read AHB-AP Id. Could not connect to target.
Info: Found SWD-DP with ID 0x0BC11477
No device found on SWD.
Failed to identify target. Trying again with slow (4 kHz) speed.
Info: TotalIRLen = ?, IRPrint = 0x..000000000000000000000000
Info: TotalIRLen = ?, IRPrint = 0x..000000000000000000000000
No devices found on JTAG chain. Trying to find device on SWD.
Info: Found SWD-DP with ID 0x0BC11477


****** Error: Could not read AHB-AP Id. Could not connect to target.
Info: Found SWD-DP with ID 0x0BC11477
No device found on SWD.
J-Link>unlock kinetis
Unlocking device...Timeout while unlocking device.
J-Link>
===================================================
How to unlock a secured Kinetis L MCU with a JLink? Does Jlink support such feature of unlocking Kinetis L MCU? ?(


Thanks!
zhongyb has attached the following image:
  • unlock kinetis.jpg

SEGGER - Alex

Super Moderator

Date of registration: Dec 18th 2007

Posts: 1,516

2

Monday, November 5th 2012, 10:08am

Hi,

Quoted

Does Jlink support such feature of unlocking Kinetis L MCU?

Of course it does, since it seems people always lock their Kinetis devices accidentally.
This is why the J-Link flashloader makes sure that the security state of the CPU is not set by default.

Just try to start J-Link Commander and type in:
si 1
device MKL25Z128xxx4

si 1: Selects SWD as target interface
device <DeviceName> selects the device and performs a reconnect.

The DLL will then perform a detect a secured Kinetis device automatically and provide an unlock to the user.

PS: I do not see a MKL24Z128xxx available on the Freescale website, so I guess you mean the MKL25


Best regards
Alex

zhongyb

Beginner

Date of registration: Dec 6th 2007

Posts: 18

3

Monday, November 5th 2012, 8:51pm

Hi Alex,

Thanks for your respone.

Sorry for the incorrect keyboard input, it is indeed an MKL25Z128xxx4 chip instead of MKL24Z128xxx4 on the FRDM-KL25Z board. I did it the way that you advised, but it seems to be failed to unlock it. The screenshot is also attached.

Thanks!
zhongyb has attached the following image:
  • unlock.png

SEGGER - Alex

Super Moderator

Date of registration: Dec 18th 2007

Posts: 1,516

4

Monday, November 5th 2012, 8:57pm

Hi,

Did you see the MessageBox informing you about that your device is secured and needs to be unsecured for further debugging?
From the screenshot it looks as you did not. This means J-Link did not detect the device as protected device.
Now the question is: Why?

I will write you a PM how we might proceed here further.


Best regards
Alex

zhongyb

Beginner

Date of registration: Dec 6th 2007

Posts: 18

5

Tuesday, November 6th 2012, 3:01am

Hi Alex,

After I typed the commands into J-Link Commander as below,
si 1
device MKL25Z128xxx4

A messagebox appears, it prompts the device needs to be unsecured. I click the "OK" button to confirm it, but J-Link outputs the information as "Error: Kinetis <connect>:Timeout while halting CPU. CPU does not stop." The MCU can not be unlocked yet. ?(
zhongyb has attached the following images:
  • prompt.png
  • failed.png