Is this a problem with CodeWarrior and its operation with the K70?
I use the Flash utility to program a binary file to the K70F120 on the TWR-K70F120M, which works and allows the program to operate. However when I want to program another code or debug with any debugger I get the message that the device is secured and a mass erase is executed in order to be able to continue.
Thinking that I must have an error in the Flash configuration I checked in the binary and it is like this:
The FSEC setting is 0xbe, which is
KEYEN 10 (backdoor key access enabled)
MEEN 11 (mass erase enabled)
FSLACC11 (Freescale factory access granted)
SEC 10 (MCU security is unsecure)
Therefore this is not securing the device based on the value.
So I checked the state of Flash that had been programmed to the chip by using the memory debugger that is built into the program that was loaded. It gives:
|0x00000400||00 00 00 00 00 00 00 00 ff ff ff ff bf 07 ff ff|
and shows that teh device is indeed secured since the value 0xbf has been programmed rather than the value 0xbe that is in the binary file.
I only have a problem with K70 programming so my question is: does the programmer for the K70 do this on purpose and / or make an error in setting this byte??