I have Kinetis K10s that need to be unsecured by a flasher. Our firmware image secures the chip but leaves the mass erase option available. The factory programming equipment does not have a data connection to the Flasher, just a button hooked up to the trigger input. I need the Flasher to unsecure, then mass erase every time it programs parts.
Other posts in this forum says the Flasher should automatically unsecure, but it doesn't. I've tried setting AutoPerformsUnsecure in the .jflash project but that doesn't unsecure the parts, either. The Freescale docs just say to set the Mass Erase bit in the MDM-AP control register. I can do this via wjc and wjd commands in the J-Link Commander, but that alone doesn't do the job. The only method that seems to unlock the K10 is to execute 'unlock kinetis' three times in the J-Link Commander. (DLL 4.70A, J-Trace HW 3.10, FW 6/27/13)
It looks like I need to duplicate what "unlock kinetis' does as a series of init steps (e.g, WriteIR, WriteDR) that I can put into the .jflash project, so I'm down to grabbing USB commands to the JLink while it executes "unlock kinetis" to suss out how this command unlocks the K10. If that doesn't work, I'm down to logic analyzer traces on the JTAG lines.
Ideally, if Segger has an unsecure kinetis .jflashscript, or can publish what "unsecure Kinetis" actually sends, that would get me a lot further down the road.
Other posts in this forum says the Flasher should automatically unsecure, but it doesn't. I've tried setting AutoPerformsUnsecure in the .jflash project but that doesn't unsecure the parts, either. The Freescale docs just say to set the Mass Erase bit in the MDM-AP control register. I can do this via wjc and wjd commands in the J-Link Commander, but that alone doesn't do the job. The only method that seems to unlock the K10 is to execute 'unlock kinetis' three times in the J-Link Commander. (DLL 4.70A, J-Trace HW 3.10, FW 6/27/13)
It looks like I need to duplicate what "unlock kinetis' does as a series of init steps (e.g, WriteIR, WriteDR) that I can put into the .jflash project, so I'm down to grabbing USB commands to the JLink while it executes "unlock kinetis" to suss out how this command unlocks the K10. If that doesn't work, I'm down to logic analyzer traces on the JTAG lines.
Ideally, if Segger has an unsecure kinetis .jflashscript, or can publish what "unsecure Kinetis" actually sends, that would get me a lot further down the road.