While working on some flash commands to erase and write, I have bricked two k24's.
I am not sure how this is possible, but both no longer function. J-Link unlock kinetis seems to work, yet nothing else, no other command via J-Link works.
What might cause this ?
I am not working with any flash security features.
How do I "un-secure it"? Because "J-Link>unlock kinetis" does not work.
Leif
>>J-Link unlock kinetis seems to work
I understood that you could do this.
Try KDS - it will tell you that the chip is secured when you try to connect and ask whether it should unlock it for you.
Same for IAR.
Regards
Mark
Yes, it has worked in the past for me when other unfortunate events have occurred, but will not work for this.
I might have an older version of KDS, because mine does not provide an unlock option.
HI Leif Zars,
After you unlock the kinetis in the JLINK Commander.
Input: mem 0x40c, 1
To check the address 0x40c data, if it is 0xfe, it means the kinetis chip is unsecured.
Please check it on your side at first.
Wish it helps you!
If you still have question, please let me know!
Have a great day,
Kerry
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------
Seems to happen after FlashEraseAllBlock command is issued. I do this because the device had swap enabled, and I want to remove it for a different firmware. And the only way to remove it is view the FlashEraseAllBlock command.
So why is this happeing???
Leif
A kinetis device is delivered with the Flash address 0x40c (flash security configuration byte) set to 0xfe, which means that it is unsecured.
If you perform a mass erase you will set set this address (as well as all others) to 0xff and then, after the next reset, the chip is in secure mode. You subsequently need to use a debugger to un-secure it.
If you want to do a mass erase without securing the chip you need to add a write of this value to this address afterwards and before the next reset (which is what the debugger does if it is not immediately loading new code).
Regards
Mark