How to deal with MDM-AP Status System Security bit set on new MKL26Z

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

How to deal with MDM-AP Status System Security bit set on new MKL26Z

3,516件の閲覧回数
neilhancock
Contributor IV

Hi, I’m bring up a new revision of a MKL26Z128VFT4 board.

I have one board working previously and the numbers on the MKL26Z are all the same indicating same batch, but the devices where purchased at separate times from Digikey

However this new PCB revision has the reset pulse every 3us – 2us in reset and then 1us released – pulled up with a 10K. Generated internal in the MK26Z

The Reset, NMI pin, SWD_DIO pin are pulled up through 10K, and SWD_CLKI pulled to 0V  through 10K. All worked on the previous revision of the board.

I’m using a KDS3 with J-Link with (sw latest v5.0l) to program – and it keeps getting “Timeout while unlocking device” “Timeout while unsecuring device”

I did initially have the bad update for KDS3, that had a problem with a plugin - but I've udpated the plugin - and dropped to looking a the MDM-AP register directly

On doing a lot of reading here and elsewhere (thanks for the community discussions ),

using J-Link Commander I read the devices MDM-AP register

and it appears bit 2 “system Security” is set.

I have read AN485, tried suggestions for running a unlock script from mcuOnEclipse.com,

but nothing has worked, and I can't program the Flash to get it out of its reseting.

Any insights/suggestions for next steps appreciated.

J-Link>device ?

Info: Device "MKL26Z128XXX4 (ALLOW SECURITY)" selected.

Reconnecting to target...

Info: Found SWD-DP with ID 0x0BC11477

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

Kinetis (connect): Failed to unsecure Kinetis device.

J-Link>unlock kinetis

Unlocking device...Timeout while unlocking device.

J-Link>SWDreadAP 0x1000000

Read AP register 16777216 = 0x00000036

J-Link>SWDreadAP 0x1000000

Read AP register 16777216 = 0x00000034

J-Link>SWDreadAP 0x1000000

Read AP register 16777216 = 0x00000034

  J-Link>

ラベル(1)
タグ(1)
0 件の賞賛
返信
3 返答(返信)

2,459件の閲覧回数
Jorge_Gonzalez
NXP Employee
NXP Employee

Hello Neil Hancock:

It is recommended to have a 0.1 uF capacitor to ground in the Reset_b pin close to the MCU.

When security is set but Mass Erase is enabled then it is still possible to connect and unsecure the MCU with the unlock kinetis command, then this is most probably a hardware issue.

Since the MCU is constantly resetting, a common trick is to hold down the Reset_b pin with a switch and release it when launching the connection command. This requires several attempts to synchronize the button press-depress with the connection.

If you had a P&E Micro tool (e.g. Universal Multilink) they have a utility to recover stubborn boards called "Kinetis Recovery Utility". You can find it in the next link:

P&E Microcomputer Systems

I hope this helps. Let us know of further results.

Regards!

Jorge Gonzalez

2,459件の閲覧回数
neilhancock
Contributor IV

Hello, just a follow up - the J-Link for some reason really locked my prototype boards, and segger didn't respond to a posting about it.

I did get the P&E Multilink, and tried it on the boards.

P&E was fantastic in their fast support and help - however unfortunately it wasn't able to unlock it.

For the KL27Z board I was able to connect over USB

blhostwin –u get-property 17

and it responded

KL27Z256 Flash Security State = SECURE

So I conclude somehow the J-Link locked it and since I used up the prototypes I had I've ordered some more boards.

I'm a big fan of KBOOT now. :smileyhappy:

0 件の賞賛
返信

2,459件の閲覧回数
neilhancock
Contributor IV

Hi Jorge, appreciate the response, though ~~help~~ I don't like the answer :smileysad:.

I'm being forced back to board bringup square 1 with this analysis. As an alternative I've built a  KL27Z on the third and last PCB I had - however it had a similar problem - so possibly toolchain hell from an incompatible Segger interface.

Since then I've attempted to rebuild the KDS300 and see if that helps

However the KL27Z kboot on the USB is responding - yeah - or at least registering on my Win8.1 workstation.

Due to KL27Z only recently supported on KSDK1.2 and KSDK1.2 makes earlier visual PE components incompatibilities, its forcing me go back to square 1 with board support software by building a simple LED flasher to download.

So following the instructions to go down the laborous route of hand crafting KSDK1.2 APIs - checking it works on a FRDM-KL27Z board first.

I guess it feels like having the ProcessorExpert visual candy taken away and back to manual  old fashioned include file links - so see if I can try that route - and will also try your suggestions to see if I can program the board through the J-Link interface OR  KBOOT interface 

0 件の賞賛
返信