I am using a KL15 series MCU for my development.
But I am not sure on how to set the values of the FTFA_FSEC registers to secure my flash.
Since the FSEC register is loaded at reset, I'm guessing that I should populate proper values in the flash configuration field and load the firmware in my MCU. After reset, FTFA_FSEC register should be loaded with the intended security bits.
Or is it a better idea to use the "in application flash programming" to set the flash config field followed by a reset?
Would be helpful if there was some example on how to properly do this. I don't want to mess up and permanently lock my QFN device. Difficult to manual solder.
Would appreciate some working sample code on how to do this