Reasons to "Device is Secure" error on MCUExpresso v11

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

Reasons to "Device is Secure" error on MCUExpresso v11

2,304 Views
moura_fmo
Contributor I

I developed board using MKL26Z128VFT4 MCU. After download first firmware (Hello Word) the device give error "Device is Secure. Erase to unsecure". If I click on "yes", pop-up comes again. 

I tried use "Emergency Kinetis Device Recovery..." but without success.

I only have more one MCU so I can t do a mistake again (I can t find this MCU in Brazil and to buy from other country, it maybe take 1 month or more).

I m using Multilink Universal by PEMicro.

I tried on OSX and Windows 10.

My schematic is similar to freedom.

pastedImage_1.png

The connections to MCU are direct, in other words, without any resistors or capacitors.

Tnx very much for any help!

Labels (1)
Tags (1)
0 Kudos
8 Replies

2,013 Views
moura_fmo
Contributor I

Hi Erick, Robin!

Unfortunately today I could not apply long time in this work. But I catch a oscilloscope to do measurement as Robin asked.

First... My layout no have nothing connected to NMI_b  different from what was requested in the item 3 of doc and I no do it yet because will be so hard, tomorrow I will try it. 

I have 10k pull up as asked in the item 2 (connected in the RESET_b).

Using oscilloscope I have continuous + 3V on NMI_b pin.

And figures below show signal on RESET_b pin.

1 - PCB with +3.6V and GND

pastedImage_2.png 

Note that my sample time is equal to showed in item 6 of your doc, but signal of RESET_b have frequency higher than yours.

2 - When Multilink Connected

pastedImage_3.png

Following your Steps "resurrect locked Kinetis device in GUI Flash Tool", the error below appear:

pastedImage_4.png

I need do pull up on NMI_b pin, but without it, Do you want that I do any other measurement or check ?

Tns Very Much.

0 Kudos

2,013 Views
moura_fmo
Contributor I

Hi Erick, Robin!

So, I put pull up in NMI_b pin and nothing change.

Today I put my last MCU and put pull ups in my pcb, I follow Robin recommendations too and I could flash my pcb more than one time.

One point in print console generate a doubt:

The point is bolded in text bellow.

Executing flash operation 'Program' (Program file into flash: Test_Project.axf) - Thu Sep 05 20:59:46 BRT 2019
Checking MCU info...
Scanning for targets...
Executing flash action...
P&E GDB Server for Arm(R) devices, Version 7.14.00.00
Copyright 2018, P&E Microcomputer Systems Inc, All rights reserved
Loading library /Applications/MCUXpressoIDE_10.3.1_2233/ide/plugins/com.pemicro.debug.gdbjtag.pne_3.9.9.201902081724/osx/gdi/unit_ngs_arm_internal.so ... Done.
Command line arguments: -interface=USBMULTILINK -port=USB1 -speed=5000 -flashobjectfile=/Users/felipeoliveira/Documents/BabyMonitor/Code/Baby_monitor/Test_Project/Release/Test_Project.axf -device=NXP_KL2x_KL26Z128M4 -programmingtype=0 -runafterprogramming -startserver -singlesession -quitafterprogramming
Device selected is NXP_KL2x_KL26Z128M4
User Specified Hardware Selection : Interface=USBMULTILINK and Port=USB1
Connecting to target.
P&E Interface detected - Flash Version 10.26
Device is NXP_KL2x_KL26Z128M4.
Mode is In-Circuit Debug.
(C)opyright 2012, P&E Microcomputer Systems, Inc. (www.pemicro.com)
API version is 101
Creating kernel driver for freertos
Server 1 running on 127.0.0.1:7224
Server 2 running on 127.0.0.1:7226
Server 3 running on 127.0.0.1:7228
Server 4 running on 127.0.0.1:7230
Server 5 running on 127.0.0.1:7232
Server 6 running on 127.0.0.1:7234
Server 7 running on 127.0.0.1:7236
Server 8 running on 127.0.0.1:7238
Server 9 running on 127.0.0.1:7240
Server 10 running on 127.0.0.1:7242
Copyright 2018 P&E Microcomputer Systems,Inc.
Command Line :
CMD>RE
Initializing.
Target has been RESET and is active.
CMD>CM /Applications/MCUXpressoIDE_10.3.1_2233/ide/plugins/com.pemicro.debug.gdbjtag.pne_3.9.9.201902081724/osx/gdi/P&E/supportFiles_ARM/NXP/KL2x/freescale_kl26z128m4_1x32x32k_pflash.arp
Initializing.
Initialized.
;version 1.05, 06/02/2014, Copyright 2014 P&E Microcomputer Systems, Inc. All rights reserved. www.pemicro.com [mk_128k_n_pflash_m0]
;device freescale, kl26z128m4, 1x32x32k, desc=pflash
;begin_cs device=$00000000, length=$00020000, ram=$20000000
Loading programming algorithm ...
WARNING - Selected .ARP file has been modified. CRC16 = $597F

Programming sequency is : erase, blank check, program, and verify {default}
CMD>VC
Verifying object file CRC-16 to device ranges ...
block 00000000-00001C97 ...
Calculated CRC-16 does not match block. (File = $0695, Device = $C908)
Error verifying flash of device
CMD>EM
Erasing.
Module has been erased.
Reloading programming algorithm ...

CMD>PM
Programming.
Processing Object File Data ...
.
Programmed.
CMD>VC
Verifying object file CRC-16 to device ranges ...
block 00000000-00001C97 ...

Checksum Verification Successful. (Cumulative CRC-16=$0695)
CMD>GO
All Servers Running
Target Disconnected.

Is normal this warning ?

And... to close my doubts...

The correct process to flash new MCUs is always start using GUI Flash ?

So I cant direct use bug icon in IDE ?

Tnx very much for your help.

0 Kudos

2,013 Views
Robin_Shen
NXP TechSupport
NXP TechSupport

Hi Felipe Oliveira,

Please refer: How To Sucessfully Program a Custom made Kinetis Microcontroller Board.

Check the NMI_b and Reset_b and SWD pins.

Since you are using the MCUXpresso IDE, step8 be replaced by resurrect locked Kinetis device in GUI Flash Tool.

GUI Flash Tool extended for P&E and SEGGER

The GUI Flash Tool previously was only for the LinkServer (or LPC-Link2) connections.

GUI Flash Tool

GUI Flash Tool

Now it supports all debug probe connections, including P&E and SEGGER, and I can program, erase or even resurrect a ‘bricked’ Kinetis device:

LinkServer GUI Flash Tool

LinkServer GUI Flash Tool

PEMicro GUI Flash Tool

PEMicro GUI Flash Tool

Segger GUI Flash Tool

Segger GUI Flash Tool

Using the toolbar icon is probably the most convenient way to use the GUI Flash Programmer, it is possible to run it from the debugger launch configuration too:

Running GUI Flash Programmer from Launch Configuration

Running GUI Flash Programmer from Launch Configuration

The operation executed is logged in the Console View:

GUI Flash Tool Console Output

GUI Flash Tool Console Output

 

Best Regards,

Robin

 

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

0 Kudos

2,013 Views
BlackNight
NXP Employee
NXP Employee

The message basically indicates that the debug probe is not able to talk to the device.

It 'sees' a device, but that microcontroller does not respond. Check that your connection is really sound, and that you have not swapped pins or having any short circuit.

See as well Device is secure? | MCU on Eclipse .

I have collected a check list here: Debugging Failure: Check List and Hints | MCU on Eclipse 

I see that your Vcc is 1.8V. The Multilink should be able to deal with this, but I had a case of a failed unit which only worked down below 2.5V. Maybe it helps if you can increase the voltage to 3.3V at least to check?

I hope this helps,

Erich

0 Kudos

2,013 Views
moura_fmo
Contributor I

Hi Erich, tnx very much for your help.

I usually see your blog and posts, I´m very glad in have your attention.

I worked about 4 years with Kinets MCUs. This problem always happened. Since prototype stage or in pos-production. In pos-production, 5% of MCUS give me this error, but we always prefer put new and try (In my last job, money isn't problem =] ), usually solve the problem.

Today I´m working in other industry that no uses NXP, but I'm develop my personal projects with Kinetis yet.

My connections are ok because I could flash one time. Maybe I´m missing in pcb layout or other thing.

In this night, I will try use external power supply to give me 3.3 V and come here with news.

0 Kudos

2,013 Views
BlackNight
NXP Employee
NXP Employee

Maybe your first programming did indeed set the secure bits (see How (not) to Secure my Microcontroller | MCU on Eclipse ). It happend to me in the past a few times too with some bad connections or downloading the wrong image to the device.

In another case I had problems with the Vcc/supply of the device: while flashing it needed more energy, and somehow it dropped below a critical level somehow bricking the device. For such cases I provide an extra supply voltage/power through the debug connector (this is non-standard, as the Vcc pin on the connector is usually used as 'sense only').

Just some thoughts,

Erich

0 Kudos

2,013 Views
moura_fmo
Contributor I

Hi Erich!

I work for hours but without success.

I tried use external power supplier, check connections and... about turn my device secure... Only if MCUXpresso have a bug, because I only create a "hello word" using "MCUXpresso Quickstart".

But when I check my layout I see that I no connect pull up in my reset pin like in freedom kl26z.

pastedImage_1.png

I do wire-ups and check that my "RST_Pin" no comes to 3.3 V (or next it), It stay next to 1.3 V and when I try flash firmware the Voltage below to 0 V.

Maybe my MCU die.

What you think about?

0 Kudos

2,013 Views
BlackNight
NXP Employee
NXP Employee

Check the state of the reset line with a logic analzyer or scope: it seems to me that your device is constantly resetting? The reason for this could be that your code is constantly crashing.

0 Kudos