Flashed the wrong code onto my PCB

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

Flashed the wrong code onto my PCB

Jump to solution
933 Views
Bouras
Contributor II

Hi all,

I am using a cyclone FX to flash and debug the PCB project that I am working on. The PCB is using a mk64fn1m0vll12 processor. 

I accidentally hit the 'upload image'/'start' button on the Cyclone. The image that was loaded on the cyclone was for the old ColdFire processor. The PCB is now unresponsive and I cannot flash or reconnect to it at all. I have checked the watchdog/reset pins and they are set to active.

Is there a solution to this issue or should I just replace the microprocessor?

Tags (5)
0 Kudos
1 Solution
929 Views
ErichStyger
Senior Contributor V

It depends. You need to check what you wrote with your ColdFire image to the flash protection area (around 0x410), see https://mcuoneclipse.com/2012/11/04/how-not-to-secure-my-microcontroller/ .

If you still have flash mass erase enabled, you are ok. Otherwise you need to replace the device.

If are still able to erase, it could be that the device is constantly resetting. PEMicro has a Kinetis Recovery tool which you can use in this case. I believe you can find it on their web site, and this tool recovered many Kinetis devices for me. It constantly tries to connect to the device, and usually after several seconds I'm able to get control over it.

I hope this helps,

Erich

View solution in original post

3 Replies
930 Views
ErichStyger
Senior Contributor V

It depends. You need to check what you wrote with your ColdFire image to the flash protection area (around 0x410), see https://mcuoneclipse.com/2012/11/04/how-not-to-secure-my-microcontroller/ .

If you still have flash mass erase enabled, you are ok. Otherwise you need to replace the device.

If are still able to erase, it could be that the device is constantly resetting. PEMicro has a Kinetis Recovery tool which you can use in this case. I believe you can find it on their web site, and this tool recovered many Kinetis devices for me. It constantly tries to connect to the device, and usually after several seconds I'm able to get control over it.

I hope this helps,

Erich

906 Views
Bouras
Contributor II

Thanks for the suggestion mate. Flashing a blank sketch allowed me to clear it and then I was able to reflash the right code onto it.

0 Kudos
912 Views
ErichStyger
Senior Contributor V

Hi @Bouras ,

just in case with the hope this is helpful for your case too: https://mcuoneclipse.com/2021/05/20/recovering-cortex-m-microcontroller-with-a-power-glitch/

 

Erich

0 Kudos