Unable to program flash in K60 TWR

Showing results for 
Search instead for 
Did you mean: 

Unable to program flash in K60 TWR

Contributor II


I am working with the TWR-K60D100M tower system and CodeWarrior IDE. When I build my project in CW, an executable is generated with the .elf extension. I was able to debug the project on the tower system. Also, I was able to program the flash of MCU with the .elf file and the program would run fine on the MCU. Everything was good so far.

Then, I programmed the flash with a different file by mistake. This was a binary file with '.project' extension. No error was shown in the CW console when this was done. However, after this I am unable to either debug on the tower or write any other file to the MCU's flash.

  1. When I try to debug, the process is stuck while initializing the .arp file. CW has to be restarted to debug again.



     2. If I try to write the program to the MCU's flash using the 'Flash file to target' option, the process stops with the following error:


This happens for both the 'Erase whole device' and 'Erase and Program' options.

What is this flash ID? Where is it trying to read it from?

     3. The earlier error was while programming using the JTAG connection. If I use the P&E Universal multilink connection, it fails with this error:


My work is completely halted right now as I unable to test any code I write. Please give any inputs that might be helpful.

Thanks and regards,


0 Kudos
1 Reply

NXP TechSupport
NXP TechSupport

I would recommend customer to use J-Link tool and use Segger provided J-Link Commander tool and use "unlock Kinetis" command to unlock the Kinetis.

I am worry about the Flash configuration address 0x40C was written incorrect value, which cause Kinetis chip was secured and with mass erase disabled (That means the chip is permenently locked).

Segger provided J-Link Commander tool could be downloaded from below link:

SEGGER - The Embedded Experts - J-Link Beta software version

Wish it help.

best regards,
Ma Hui

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

0 Kudos