How to unlock a secured Freescale Kinetis L chip

This site uses cookies. By continuing to browse this site, you are agreeing to our Cookie Policy.

  • 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!
    Images
    • unlock kinetis.jpg

      101.22 kB, 681×440, viewed 1,912 times
  • Hi,

    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
    Please read the forum rules before posting.

    Keep in mind, this is *not* a support forum.
    Our engineers will try to answer your questions between their projects if possible but this can be delayed by longer periods of time.
    Should you be entitled to support you can contact us via our support system: segger.com/ticket/

    Or you can contact us via e-mail.
  • 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!
    Images
    • unlock.png

      35.14 kB, 677×442, viewed 1,661 times
  • 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
    Please read the forum rules before posting.

    Keep in mind, this is *not* a support forum.
    Our engineers will try to answer your questions between their projects if possible but this can be delayed by longer periods of time.
    Should you be entitled to support you can contact us via our support system: segger.com/ticket/

    Or you can contact us via e-mail.
  • 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. ?(
    Images
    • prompt.png

      47.65 kB, 677×442, viewed 1,476 times
    • failed.png

      35.14 kB, 677×442, viewed 1,302 times