I'm looking specifically at a K66F.
When you use the MDM-AP to mass erase the chip. It erases flash to all 1s, except for the security bit in the flash config field. This is what I see in practice, and what I read in the Production Flash Programming Best Practices for Kinetis K- and L-series MCUs PDF here: http://cache.nxp.com/assets/documents/data/en/application-notes/AN4835.pdf
However in the K66 reference manual in 220.127.116.11 "Program Section command", it states:
A flash memory location must be in the erased state before
being programmed. Cumulative programming of bits (back-to-
back program operations without an intervening erase) within a
flash memory location is not allowed. Re-programming of
existing 0s to 0 is not allowed as this overstresses the device.
So how does this work for the flash config field where the security bit is set to 0 during a mass erase.
Do I just ignore this caution for this bit, and issue a program section command as normal? Or is it better to run a sector erase first to actually erase that bit?
When it says reprogramming of existing 0s to 0 is not allowed. Does that mean the program section command will fail (it doesn't in the FCF case, and I haven't tried it in any other cases).