Failed to unsecure Kinetis device (K64F)

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Failed to unsecure Kinetis device (K64F)

2,723 Views
digibin
Contributor I

Hi all. I'm having some trouble programming a K64F microcontroller. I have two FRDM-K64F development boards and I'm using one to program the other. This works fine. When I try to program another MK64FN1M0VLL12 on a custom PCB it fails. The following is the console output in KDS v3.0.0:

Connecting to J-Link...
J-Link is connected.
Firmware: J-Link OpenSDA 2 compiled Feb 14 2017 15:54:11
Hardware: V1.00
S/N: 621000000
Checking target voltage...
Target voltage: 3.30 V
Listening on TCP/IP port 2331
Connecting to target...ERROR: Kinetis (connect): Timeout while unsecuring device. Erase never starts.
Kinetis (connect): Failed to unsecure Kinetis device.
ERROR: Error while identifying Cortex-M core.
ERROR: Could not connect to target.
Target connection failed. GDBServer will be closed...Restoring target state and closing J-Link connection...
Shutting down...

My board is very simple indeed. I copied the SWD traces directly from the FRDM-K64F schematics. I've tried two of my own boards, with MCU's sourced from different suppliers (DigiKey and Farnell), and get the same result. Is the MCU actually secured as the console output suggests? If so this is rather frustrating as they have been shipped in this state. I've tried unlocking using the Segger J-Flash utility but no luck. It seems the device cannot be erased.

I've attached the schematic for the board.

Not sure what to do, any help would be appreciated.

Thanks.

0 Kudos
4 Replies

1,237 Views
chriskeeser
Contributor III

Looking at your schematic, there is no connection to the device reset.  Perhaps you need a connection between the programmer and the device reset to establish SWD communications.  I have worked on other devices that have 2 methods for acquiring the device through SWD:
1.) Force a device reset through the reset pin to acquire the device during the acquire window

2.) Attempt to capture the device during the acquire window after power on.  This method is often problematic since the device must not be powered by anything else and the programmer must be able control the power to the device.  Even then, the acquire window can be missed due to poor ramping on the supply.

I have no idea if you are actually locked out of your device, or if you are not able to acquire the device and the error you are receiving is red-herring.

0 Kudos

1,237 Views
digibin
Contributor I

Hi Alice. I've tried the suggestions in the related question. J-Link Commander fails to connect to the target:

pastedImage_1.png

0 Kudos

1,237 Views
Alice_Yang
NXP TechSupport
NXP TechSupport

Hello Mike,

I'm very sorry for I don't know why there isn't the linker on my last message.

It seems the chip secured , there is a method about how to unsecured it

use J-link command :

j-link 

or How to unlock a secured Freescale Kinetis L chip

BR

Alice


Have a great day,
Alice Yang

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos

1,237 Views
Alice_Yang
NXP TechSupport
NXP TechSupport

Hello Mike,

There is a same question with yours , please refer to his method to have a try.

If still can not work , please contact us without any hesitate .

BR

Alice

0 Kudos