Hi, I am working on MKE04Z128 freescale micro-controller. Once I load my code into it using j-link, j-link shows me that chip becomes secured and hence you have to do entire chip erase for unsecure. Is there any particular reason why my chip is becoming secured. I am not able to debug the code due to this secure problem.
Hi, you need to verify the data being programmed into the security bytes of the Flash memory. The bytes (FPROT) are at addresses 0x400-0x40f. These bytes are read before the MCU starts running your code. The MCU applies the security specified by these bytes on startup. You need to change these bytes to allow debugger access. Please be careful modifying this data. It is possible to permanently secure the chip with no way to recover. Do a search for FPROT in the reference manual.
Norm Davies
Hi Gagan gupta,
When programming the target MCU, the debugger interface will first mass erase the chip and then program the security to make sure the chip is on unsecured statue.
this process is automatic done by the script of debugger interface like J-link.
if there is a problem causing to disturb this process and cause the failure of programming of secure byte, then, the chip will be secured.
that is the general reason causing the secure of Kinetis chip!
hope it helps!