How can the MKE02Z64's flash security be set when using the MCUXpresso IDE? MCUXpresso says the Tee security tool is not available for the MKE02Z64 micro controller. The programming language is C.
I have tried below which does not work. Which makes sense because the flash security is not part of the running program.
FTMRH->FSEC = 0x01;
P&E generated code within Kinetis Design Studio made the below code:
/* Flash configuration field */
__attribute__ ((section (".cfmconfig"))) const uint8_t _cfm[0x10] = {
/* NV_BACKKEY0: KEY=0x13 */
0xD3U,
/* NV_BACKKEY1: KEY=0x86 */
0x2BU,
/* NV_BACKKEY2: KEY=0x77 */
0x49U,
/* NV_BACKKEY3: KEY=0x22 */
0xD5U,
/* NV_BACKKEY4: KEY=0x45 */
0xF4U,
/* NV_BACKKEY5: KEY=0xAC */
0xA2U,
/* NV_BACKKEY6: KEY=0x76 */
0x99U,
/* NV_BACKKEY7: KEY=0x67 */
0x50U,
0xFFU,
0xFFU,
0xFFU,
0xFFU,
/* NV_EEPROT: DPOPEN=1,??=0,??=0,??=0,??=0,DPS=7 */
0x87U,
/* NV_FPROT: FPOPEN=1,??=1,FPHDIS=1,FPHS=3,FPLDIS=0,FPLS=3 */
0xFBU,
/* NV_FSEC: KEYEN=0,??=1,??=1,??=1,??=1,SEC=1 */
0x3DU,
/* NV_FOPT: ??=1,??=1,??=1,??=1,??=1,??=1,??=1,??=1 */
0xFFU
};