AnsweredAssumed Answered

Can't enable security on MKL17Z256VLH4.

Question asked by Nikolay Kuzev on Aug 28, 2017
Latest reply on Aug 30, 2017 by Nikolay Kuzev

Hi!

 

I am using Kinetis Design Studio, with KSDK_1.3.0, debugger - Segger Base. Project uses only basic HAL - i.e. register references only, no Processor Expert and no other drivers. Finally, when firmware was ready, I wanted to secure it, but get

in a trouble.

So I modified startup_MKL17Z4.S flash configuration:

Ending was default: FE - 0xFE (Backdoor key access disabled, Mass erase is enabled, NXP factory access granted, MCU security status is unsecure). So just want to set SEC b00 - MCU security status is secure.

So got this:

 

I loocked over here and found about two similar posts, and answer seems to be clear.

We are developing code for about a year, and through all this time I used to upload firmware through debug mode,

so simply catched my own tail: I wanted to lock MCU and start debug.

 

So I opened Flash from File and ....confused, this is the same as debug template, and certainly, result is the same.

I tried different combinations of FSLACC-SEC then: in some combination(don't remember exact) alert disappeared.

 

Then I added some code to check FTFA_FSEC register, just print it to PC terminal over RS-232 (wires connection available on our device housing), certainly, no security state again. FTFA_FSEC [1:0] is always b10.

 

I am new at Kinetis MCU-s, so really sorry... please explain me step by step how to upload secure firmware.

What is exactly to be done: .... crate new target.... etc.

Outcomes