AnsweredAssumed Answered

K20 locked, mass erase failed as well

Question asked by Kai Liu on Sep 29, 2014
Latest reply on Jul 27, 2016 by nishant Pashine

I am developing a K20 board with Keil and IAR. In this morning, I have programmed three chips, except one for being locked.

 

First of all, I can try to access target K20 with CMSIS-DAP for communication, all of them can be detected in Keil MDK.

The SWDIO is: 0x2BA01477,

If I remove the target, this SWDIO will be "SWD/JTAG Communication Failure".

If I connect it to KL25Z on board, the SWDIO will be "0x0BC11477".

 

By this setup dialog, I know the K20 is hooked up.

K20DetectedInKeilMDK.PNG.png

 

Then I tried "Erase" command from pull down menu.

 

KinetisDeviceLocked.PNG.png

The system warns me: Kinetis Device is locked and it will execute Mass Erase command. So I click OK.

KinetisCannotAccessMemory.PNG.png

Another warning, can not access memory.

KinetisFlashErasefailed.PNG.png

Finally, it warns me Flash Erase failed.

IAR_ReadingCPUstatusFailed.PNG.png

Then I tried it in IAR EWW 6.7. Same result for Erase all command. With different warning message: Reading CPU status failed.

IAR_ErrorLog.PNG.png

 

Here is the full log message, it shows DAP access for reset is failed.

 

Hardware

 

I have checked PTA4(NMI_b/EZP_CS_b), it has 10K pull up, so it is 3V3. And crystal, USB and power supply are good.

 

Any idea why it is locked? The K20 is a brand new one from FSL sample service. Should I use JLINK? Or USBDM for K to unlock it?

 

I am wondering how often locking issue happens? Why can I detect it via DAP in MDK, but failed in IAR?

Outcomes