podonoghue / usbdm-eclipse-makefiles-build

Current USBDM builds
GNU General Public License v2.0
15 stars 15 forks source link

Unable to Unlock previously secured KL17 #28

Open RomanGassmann opened 8 months ago

RomanGassmann commented 8 months ago

Hi Peter,

I just wanted to let you know about a problem I recently had with the latest version of the UsbdmFlashProgrammer. I had to build the UsbdmFlashProgrammer myself due to a system change (to Debian 12) on my end. So I pulled the latest version (14.12.2023) and updated the dependencies. Everything went well and I was happy to have the latest version built and running in no time (including flashing devices). But yesterday my luck ran out when I tried to flash a device that was previously flashed with the secure option. The UsbdmFlashProgrammer stucks and always reports "TCL error", which is ok when programming a device, but not with Masserase. Unfortunately, I haven't had time (yet) to investigate this further, but looking at the repository history I saw a commit message "Changes to the rest sequence for the MK series (with TCL)". So I wonder if this could be related?

I was able to unlock my device by running KinetisUnlock and this proves (at least I think so) that the system should work. Over the next few days I will investigate this further and keep you posted. If you already have an idea where the problem lies, I would very much appreciate any information from you and would also carry out appropriate tests on my part.

Best regards, Roman

podonoghue commented 8 months ago

Hi Roman,

I'm sorry I am experimenting with the Kinetis flash programmer to allow the reset and connection to be more customised in the TCL scripts. This has only be done for the MKxx devices and only a small amount of testing on a MK22F device using a particular version of the BDM (one with target power control).

This was to cope with some problems with connecting to devices that have the reset line pulsing due to watch-dog or illegal-instruction traps. Basically programming may be broken on other devices or with a different programmer version.

I suggest you revert to a version before that commit. It is not worth your time testing as it is a work in progress.

bye

podonoghue commented 7 months ago

Hi Roman, Updated TCL scripts so they should now work on KL devices when using a BDM without target Vdd control. If there is still a problem please reply with details of the BDM and target.

There is no urgency in this.

bye