AnsweredAssumed Answered

Cannot program New MKL25Z128

Question asked by Oskar Lopez de Gamboa on Dec 9, 2014
Latest reply on Feb 9, 2015 by Oskar Lopez de Gamboa

Hello everybody,


This is my first time writting at the forum.I have been reading a lot but now I am in a problem no one seems to have been in. Here is my problem :


I bought two FRDM-KL25 boards and after testing several things i have made up a custom board. The idea was to use one of the boards as a USBDM-FRDM programmer.

I can program one board with another without problem, but I cannot program my board .


At the begginning I thought about hw problems (because of the different HW) and try several solutions:


  • Adding a serial resistor in the SWD_CLK line
  • Adding 100pF capacitor to the SWD_CLKand SWD_DIO lines
  • Powering the microcontroller with the reset signal low
  • Combinations of the above.


The results are always the same:

When programming-->> unable to read/confirm CHIP_ID,

When trying to Detect the CHIP_ID->> Device appears to be secured.... Unsecure and enterely erase?

When unsecuring-->>Failed to probe the target reason Target is secured


Finally I decided for the Hw solution ( yes i am a HW guy coming into SW) I desoldered the new chip and the one in the FRDM board and change them, soldering down the new chip into the FRDM board and the "old" into my custom board.So now i have now problem programming my board  .no new problems the connections were ok so the problem was with the new chip. Tried again in another exactly equal custom board  with another new chip, same results.


Not only that but when I try to program my FRDM board with the new chip in, I am in the same situation.So it seems again that the problem appears with the new chips.


As I have read here in this forum( )

I have tried to use the TCL interpreter to found a solution, when i source the following script


settarget arm 

source devicedata/arm/Kinetis-KLxx-flash-scripts.tcl 

catch { connect }

rcreg  $::MDM_AP_Status


I get the following:



So it seems it is secured??? But it can be mass  erased...

When I try the massEraseTarget  I get: no luck.

I'm using the last USBDM version and I am lost ,no further ideas. What else can I try?

Its normal for a new device to be secured?


Thanks for your feedbacks,


Best Regards,