AnsweredAssumed Answered

MK64FN1M0VLQ12 protected chip and timeout for connection

Question asked by Davi Campos on Mar 6, 2017

 

Hi

I have a problem with the MK64FN1M0VLQ12 on custom boards. I tried programming with two versions of micro PE (USB Multilink Universal and USB Multilink Universal FX) and Segger J-Link from KWIK-STIK, the result is protected chip or timeout for the connection.

I found several forum posts related to the secure Kinetis system, such as unlock command and erase_all script on J-Link, Kinetis_Recovery_Utility.exe from PEMicro. Try several, with no success.

I can not find the cause of this problem. I tested three boards and replaced five microcontrollers without success.
Following is the response of the J-Link commands on the three boards and the schematic of the microcontroller part.

I need help to find the cause this problem.

Thank

 

SEGGER J-Link Commander V6.14 (Compiled Feb 23 2017 17:30:02)
DLL version V6.14, compiled Feb 23 2017 17:29:32

Connecting to J-Link via USB...O.K.
Firmware: J-Link Lite-FSL V1 compiled Jun 25 2012 16:40:07
Hardware version: V1.00
S/N: 430110131

 

 

BOARD A
J-Link>st
VTarget=3.131V
ITarget=0mA
TCK=0 TDI=1 TDO=1 TMS=0 TRES=0 TRST=1
Supported target interface speeds:
- 4 MHz/n, (n>=1). => 4000kHz, 2000kHz, 1333kHz, ...
- Adaptive clocking


J-Link>unlock kinetis
Found SWD-DP with ID 0x2BA01477
Unlocking device...Timeout while unlocking device.


J-Link>swdreadap 0
Read AP register 0 = 0x00000036


J-Link>connect
Device "MK64FN1M0XXX12 (ALLOW SECURITY)" selected.


Found SWD-DP with ID 0x2BA01477
Protection bytes in flash at addr. 0x400 - 0x40F indicate that readout protection is set.
For debugger connection the device needs to be unsecured.
Note: Unsecuring will trigger a mass erase of the internal flash.
Executing default behavior previously saved in the registry.
Device will be unsecured now.
Found SWD-DP with ID 0x2BA01477
Protection bytes in flash at addr. 0x400 - 0x40F indicate that readout protection is set.
For debugger connection the device needs to be unsecured.
Note: Unsecuring will trigger a mass erase of the internal flash.
Executing default behavior previously saved in the registry.
Device will be unsecured now.

****** Error: Kinetis (connect): Timeout while unsecuring device. Erase never starts.
Kinetis (connect): Failed to unsecure Kinetis device.

Found SWD-DP with ID 0x2BA01477
Protection bytes in flash at addr. 0x400 - 0x40F indicate that readout protection is set.
For debugger connection the device needs to be unsecured.
Note: Unsecuring will trigger a mass erase of the internal flash.
Executing default behavior previously saved in the registry.
Device will be unsecured now.
Found SWD-DP with ID 0x2BA01477
Protection bytes in flash at addr. 0x400 - 0x40F indicate that readout protection is set.
For debugger connection the device needs to be unsecured.
Note: Unsecuring will trigger a mass erase of the internal flash.
Executing default behavior previously saved in the registry.
Device will be unsecured now.

****** Error: Kinetis (connect): Timeout while unsecuring device. Erase never starts.
Kinetis (connect): Failed to unsecure Kinetis device.

Cannot connect to target.

 

BOARD B

J-Link>st
VTarget=3.104V
ITarget=0mA
TCK=0 TDI=1 TDO=0 TMS=0 TRES=0 TRST=1
Supported target interface speeds:
- 4 MHz/n, (n>=1). => 4000kHz, 2000kHz, 1333kHz, ...
- Adaptive clocking


J-Link>unlock kinetis
Found SWD-DP with ID 0x2BA01477
Unlocking device...Timeout while unlocking device.


J-Link>swdreadap 0
Read AP register 0 = 0x00000034


J-Link>connect
Device "MK64FN1M0XXX12 (ALLOW SECURITY)" selected.


Found SWD-DP with ID 0x2BA01477
Protection bytes in flash at addr. 0x400 - 0x40F indicate that readout protection is set.
For debugger connection the device needs to be unsecured.
Note: Unsecuring will trigger a mass erase of the internal flash.
Executing default behavior previously saved in the registry.
Device will be unsecured now.
Found SWD-DP with ID 0x2BA01477
Protection bytes in flash at addr. 0x400 - 0x40F indicate that readout protection is set.
For debugger connection the device needs to be unsecured.
Note: Unsecuring will trigger a mass erase of the internal flash.
Executing default behavior previously saved in the registry.
Device will be unsecured now.

****** Error: Kinetis (connect): Timeout while unsecuring device. Erase never starts.
Kinetis (connect): Failed to unsecure Kinetis device.

Found SWD-DP with ID 0x2BA01477
Protection bytes in flash at addr. 0x400 - 0x40F indicate that readout protection is set.
For debugger connection the device needs to be unsecured.
Note: Unsecuring will trigger a mass erase of the internal flash.
Executing default behavior previously saved in the registry.
Device will be unsecured now.
Found SWD-DP with ID 0x2BA01477
Protection bytes in flash at addr. 0x400 - 0x40F indicate that readout protection is set.
For debugger connection the device needs to be unsecured.
Note: Unsecuring will trigger a mass erase of the internal flash.
Executing default behavior previously saved in the registry.
Device will be unsecured now.

****** Error: Kinetis (connect): Timeout while unsecuring device. Erase never starts.
Kinetis (connect): Failed to unsecure Kinetis device.

Cannot connect to target.

 

 

 

BOARD C

J-Link>unlock kinetis
Found SWD-DP with ID 0x2BA01477
Unlocking device...O.K.


J-Link>swdreadap 0
Read AP register 0 = 0x00000000


J-Link>swdreadap 0
Read AP register 0 = 0x00000033


J-Link>connect
Device "MK64FN1M0XXX12 (ALLOW SECURITY)" selected.


Found SWD-DP with ID 0x2BA01477
Found SWD-DP with ID 0x2BA01477

****** Error: Kinetis (connect): Timeout while halting CPU. CPU does not stop.

Found SWD-DP with ID 0x2BA01477
Found SWD-DP with ID 0x2BA01477

****** Error: Kinetis (connect): Timeout while halting CPU. CPU does not stop.

Cannot connect to target.

Attachments

Outcomes