Relative Content

Tag Archive for securitynxp-microcontrollerkinetis

How to secure the Flash memory of a Kinetis MCU,so it can’t be read later by a programmer set to preserve that area?

I want the flash memory to be inaccessible for reading, at least in a specific area were confidential data reside.
In order to achieve this, I write 0xFF (or 0xFD or 0xFC) in the least significant byte of the FTFA_SEC register, all these values, different from 0xFE, should configure in secure mode, as explained in section 27.3.1 Flash Configuration Field Description in RM of KL03.
One method I use is acting on startup_MKL03Z4.s file ,changing last word ,as showed below
/* Flash Configuration */
.section .FlashConfig, “a”
.long 0xFFFFFFFF
.long 0xFFFFFFFF
.long 0xFFFFFFFF
.long 0xFFFF3DFE //will be 0xFFFF3DFF