KV10 Self Secures Itself

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

KV10 Self Secures Itself

2,074 Views
asg_8
Contributor I

Hello to all,

I have been dealing with this problem for a week now, and I really don't know what else to search for or try...

I made a PCB to drive some WS2812B LEDs (not important here), and I bought 5 MCUs (reference MKV10Z32VLC7).

As I can't afford a proper debugger, I used the OpenSDA of my TWR-KE18F to program one of this MCUs soldered on an adaptation PCB:

IMG_9655.JPG

This allowed me to try some parts of the code and even to drive some of the LEDs.

The problem started when the final PCBs arrived and I soldered one (schematic attached):

IMG_9659.JPG

I was unable to debug a single time in the new PCB. But the first "test PCB" (that has literally nothing apart from the MCU) I can debug and connect without a problem.

One clear signal of something going wrong was the (in this case) red LED of the TWR board, which indicates the reset signal, constantly light up when the MCU is connected and powered. Later, with an oscilloscope I could see what many people have described as the MCU continuously resetting probably due to the watchdog.

After many research online I found the LinkServer GUI Flash programmer and I could manage to "Resurrect locked Kinetis device", but that only worked once and no more.

I could debug that resurrected MCU for a couple times before powercycling the board a few times and then it was "locked" again. Forever.

I borrowed a P&E Multilink from work for the weekend, and I could see a pop-up message telling me that the "Device is secure. Erase to unsecure?". After clicking on the YES option, the P&E Connection Assistant window would appear, as if it could not connect to the MCU, and after pressing "Retry" it would pop-up the "Secure Erase" message again. And this repeated for lots of tries... without success :smileysad:

Having access to the Multilink, I even unsoldered and soldered a new KV10 in the populated PCB, and tried to debug with the Multilink from the beginning... but the "Secure Erase?" message poped-up again :smileysad:

Out of the 5 MCUs I bought, I burnt one due to a wrong footprint of the linear regulator, another one is soldered on the adaptation PCB (the ONLY one that is still working), and two more are on the final PCBs (one fully populated, the other with ONLY the MCU, both fail); and last one was replaced on one of the 2 final PCBs.

What is causing the devices to self-secure? Maybe some supply issues? Why isn't the adaptation PCB failing? Should I keep the Reset_b pin low until the supply is stable? Are the SWD and Reset_b signals THAT critical? Haven't they internal pull-up resistors?

I am quite desperate on how to proceed next, what to search or what to try... :smileysad:

Any help would be much appreciated!

Many thanks in advance!!! :smileygrin:

Abel.

Labels (1)
0 Kudos
3 Replies

1,475 Views
Hui_Ma
NXP TechSupport
NXP TechSupport

Hi,

I would recommend to updated TWR-KE18F OpenSDA with Segger J-Link firmware.

Please check here to find more info about how to updated OpenSDA firmware.

When you get the Segger J-Link debugger(OpenSDA), then please refer below thread about how to unlock the Kinetis chip:

https://community.nxp.com/thread/439921?commentID=857127#comment-857127 

In above thread with a J-Link script, which could unlock most situation Kinetis product.

pastedImage_2.png

Another issue need to pay attention, you soldering temperature should not exceed datasheet required.

Wish it helps.


Have a great day,
Mike

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

0 Kudos

1,475 Views
asg_8
Contributor I

Hello Mike,

Thanks for all the help and your time!

The first thing I have done is to update the OpenSDA of the TWR-KE18F board with the latest J-Link firmware (29_OpenSDA_TWR-KE18F.bin).

I soldered another MCU to a blank PCB board, I tried with 260ºC but I could not get a single pin solderd, so I went up to 300ºC.

And, as expected, another locked self-secured continuously-resetting MCU. There must be something wrong in the PCB, but I can not find the issue...

I have read the 2 pdfs (Kinetis Lock issue analysis and unlock way.pdf and Kinetis_unlock guide.pdf) and done everything that is said, directly from the IDE, from the J-Flash and from the cmd.

In the IDE a pop-up message appears, and I can't debug even the working MCU...

problem ocurred.PNG

The cmd part went like this:

AP[0]: Skipped. Invalid implementer code read from CPUIDVal[31:24] = 0x00
AP[1]: Skipped. Not an AHB-AP
InitTarget()
Protection bytes in flash at addr. 0x400 - 0x40F indicate that readout protectio
n 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 SW-DP with ID 0x0BC11477
Scanning AP map to find all available APs
AP[2]: Stopped AP scan as end of AP map has been reached
AP[0]: AHB-AP (IDR: 0x04770031)
AP[1]: JTAG-AP (IDR: 0x001C0020)
Iterating through AP map to find AHB-AP to use
AP[0]: Skipped. Invalid implementer code read from CPUIDVal[31:24] = 0x00
AP[1]: Skipped. Not an AHB-AP
Cannot connect to target.

Target connection not established yet but required for command.
Device "MKV10Z32XXX7" selected.


Connecting to target via SWD
InitTarget()
Protection bytes in flash at addr. 0x400 - 0x40F indicate that readout protectio
n 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 SW-DP with ID 0x0BC11477
Scanning AP map to find all available APs
AP[2]: Stopped AP scan as end of AP map has been reached
AP[0]: AHB-AP (IDR: 0x04770031)
AP[1]: JTAG-AP (IDR: 0x001C0020)
Iterating through AP map to find AHB-AP to use
AP[0]: Skipped. Invalid implementer code read from CPUIDVal[31:24] = 0x00
AP[1]: Skipped. Not an AHB-AP
InitTarget()
Protection bytes in flash at addr. 0x400 - 0x40F indicate that readout protectio
n 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 SW-DP with ID 0x0BC11477
Scanning AP map to find all available APs
AP[2]: Stopped AP scan as end of AP map has been reached
AP[0]: AHB-AP (IDR: 0x04770031)
AP[1]: JTAG-AP (IDR: 0x001C0020)
Iterating through AP map to find AHB-AP to use
AP[0]: Skipped. Invalid implementer code read from CPUIDVal[31:24] = 0x00
AP[1]: Skipped. Not an AHB-AP

****** Error: Could not find core in Coresight setup
InitTarget()
Protection bytes in flash at addr. 0x400 - 0x40F indicate that readout protectio
n 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 SW-DP with ID 0x0BC11477
Scanning AP map to find all available APs
AP[2]: Stopped AP scan as end of AP map has been reached
AP[0]: AHB-AP (IDR: 0x04770031)
AP[1]: JTAG-AP (IDR: 0x001C0020)
Iterating through AP map to find AHB-AP to use
AP[0]: Skipped. Invalid implementer code read from CPUIDVal[31:24] = 0x00
AP[1]: Skipped. Not an AHB-AP
InitTarget()
Protection bytes in flash at addr. 0x400 - 0x40F indicate that readout protectio
n 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 SW-DP with ID 0x0BC11477
Scanning AP map to find all available APs
AP[2]: Stopped AP scan as end of AP map has been reached
AP[0]: AHB-AP (IDR: 0x04770031)
AP[1]: JTAG-AP (IDR: 0x001C0020)
Iterating through AP map to find AHB-AP to use
AP[0]: Skipped. Invalid implementer code read from CPUIDVal[31:24] = 0x00
AP[1]: Skipped. Not an AHB-AP
Cannot connect to target.

Target connection not established yet but required for command.
Device "MKV10Z32XXX7" selected.


Connecting to target via SWD
InitTarget()
Protection bytes in flash at addr. 0x400 - 0x40F indicate that readout protectio
n 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 SW-DP with ID 0x0BC11477
Scanning AP map to find all available APs
AP[2]: Stopped AP scan as end of AP map has been reached
AP[0]: AHB-AP (IDR: 0x04770031)
AP[1]: JTAG-AP (IDR: 0x001C0020)
Iterating through AP map to find AHB-AP to use
AP[0]: Skipped. Invalid implementer code read from CPUIDVal[31:24] = 0x00
AP[1]: Skipped. Not an AHB-AP
InitTarget()
Protection bytes in flash at addr. 0x400 - 0x40F indicate that readout protectio
n 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 SW-DP with ID 0x0BC11477
Scanning AP map to find all available APs
AP[2]: Stopped AP scan as end of AP map has been reached
AP[0]: AHB-AP (IDR: 0x04770031)
AP[1]: JTAG-AP (IDR: 0x001C0020)
Iterating through AP map to find AHB-AP to use
AP[0]: Skipped. Invalid implementer code read from CPUIDVal[31:24] = 0x00
AP[1]: Skipped. Not an AHB-AP

****** Error: Could not find core in Coresight setup
InitTarget()
Protection bytes in flash at addr. 0x400 - 0x40F indicate that readout protectio
n 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 SW-DP with ID 0x0BC11477
Scanning AP map to find all available APs
AP[2]: Stopped AP scan as end of AP map has been reached
AP[0]: AHB-AP (IDR: 0x04770031)
AP[1]: JTAG-AP (IDR: 0x001C0020)
Iterating through AP map to find AHB-AP to use
AP[0]: Skipped. Invalid implementer code read from CPUIDVal[31:24] = 0x00
AP[1]: Skipped. Not an AHB-AP
InitTarget()
Protection bytes in flash at addr. 0x400 - 0x40F indicate that readout protectio
n 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 SW-DP with ID 0x0BC11477
Scanning AP map to find all available APs
AP[2]: Stopped AP scan as end of AP map has been reached
AP[0]: AHB-AP (IDR: 0x04770031)
AP[1]: JTAG-AP (IDR: 0x001C0020)
Iterating through AP map to find AHB-AP to use
AP[0]: Skipped. Invalid implementer code read from CPUIDVal[31:24] = 0x00
AP[1]: Skipped. Not an AHB-AP
Cannot connect to target.


Sleep(1000)

Selecting SWD as current target interface.

Sleep(10)

Select SWD by sending SWD switching sequence.
Found SWD-DP with ID 0x0BC11477

Sleep(10)

Write DP register 2 = 0x01000000

Sleep(10)

Read AP register 0 = 0x00000000

Sleep(10)

Read AP register 0 = 0x00000036

Sleep(10)

Read AP register 1 = 0x00000036

Sleep(10)

Read AP register 1 = 0x00000001

Sleep(10)

Read AP register 0 = 0x00000001

Sleep(10)

Read AP register 0 = 0x00000036

Sleep(10)

Write AP register 1 = 0x00000001

Sleep(1000)

Read AP register 0 = 0x00000001

Sleep(10)

Read AP register 0 = 0x00000036

Sleep(10)

Read AP register 1 = 0x00000036

Sleep(10)

Read AP register 1 = 0x00000001

Sleep(100)

Write DP register 2 = 0x00000000

Sleep(1000)


JTAG is not supported by connected J-Link.

Sleep(100)

Target connection not established yet but required for command.
Device "MKV10Z32XXX7" selected.


Connecting to target via SWD
InitTarget()
Protection bytes in flash at addr. 0x400 - 0x40F indicate that readout protectio
n 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 SW-DP with ID 0x0BC11477
Scanning AP map to find all available APs
AP[2]: Stopped AP scan as end of AP map has been reached
AP[0]: AHB-AP (IDR: 0x04770031)
AP[1]: JTAG-AP (IDR: 0x001C0020)
Iterating through AP map to find AHB-AP to use
AP[0]: Skipped. Invalid implementer code read from CPUIDVal[31:24] = 0x00
AP[1]: Skipped. Not an AHB-AP
InitTarget()
Protection bytes in flash at addr. 0x400 - 0x40F indicate that readout protectio
n 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 SW-DP with ID 0x0BC11477
Scanning AP map to find all available APs
AP[2]: Stopped AP scan as end of AP map has been reached
AP[0]: AHB-AP (IDR: 0x04770031)
AP[1]: JTAG-AP (IDR: 0x001C0020)
Iterating through AP map to find AHB-AP to use
AP[0]: Skipped. Invalid implementer code read from CPUIDVal[31:24] = 0x00
AP[1]: Skipped. Not an AHB-AP

****** Error: Could not find core in Coresight setup
InitTarget()
Protection bytes in flash at addr. 0x400 - 0x40F indicate that readout protectio
n 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 SW-DP with ID 0x0BC11477
Scanning AP map to find all available APs
AP[2]: Stopped AP scan as end of AP map has been reached
AP[0]: AHB-AP (IDR: 0x04770031)
AP[1]: JTAG-AP (IDR: 0x001C0020)
Iterating through AP map to find AHB-AP to use
AP[0]: Skipped. Invalid implementer code read from CPUIDVal[31:24] = 0x00
AP[1]: Skipped. Not an AHB-AP
InitTarget()
Protection bytes in flash at addr. 0x400 - 0x40F indicate that readout protectio
n 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 SW-DP with ID 0x0BC11477
Scanning AP map to find all available APs
AP[2]: Stopped AP scan as end of AP map has been reached
AP[0]: AHB-AP (IDR: 0x04770031)
AP[1]: JTAG-AP (IDR: 0x001C0020)
Iterating through AP map to find AHB-AP to use
AP[0]: Skipped. Invalid implementer code read from CPUIDVal[31:24] = 0x00
AP[1]: Skipped. Not an AHB-AP
Cannot connect to target.


Script processing completed.


C:\Program Files (x86)\SEGGER\JLink_V632d>

I tried by pressing the reset button the whole time before powering on the MCU, then without the reset button pressed and connected to the reset of the OpenSDA...

As a test, I connected the ONLY MCU that is still working with the J-Flash and I could connect to the device successfully.

I have to be doing something wrong (in the PCB I guess) but I really don't know what or how to find it out... Smiley Sad

Anything else I could test? When powering up for the first time? or maybe solder some (5) wires instead of the whole IC to the PCB?

Many thanks!!!

0 Kudos

1,475 Views
Hui_Ma
NXP TechSupport
NXP TechSupport

Hi,

"The first thing I have done is to update the OpenSDA of the TWR-KE18F board with the latest J-Link firmware (29_OpenSDA_TWR-KE18F.bin)."

If you have tested that J-Link tool works before doing the Kinetis unlock process?

I check the below description, I think that J-Link tool works. Is my understanding right?

"As a test, I connected the ONLY MCU that is still working with the J-Flash and I could connect to the device successfully."

If possible, could you just connect SWD interface and Power system to KV10 chip and check if there could works or not.

BTW: Please check the +3V3.uC power driver strength, if the regulator provide enough power driver to the whole board.

Wish it helps.
Have a great day,
Mike

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

0 Kudos