Hey all , i have been using k60N512 for my project until recently i started getting this error while programming flash.
Failed to program flash loader .
Attached are the screen shots showing this error.
I have searched for this on forum and many posts suggests that this is due to flash being secured however this is not the case.I managed to go through k60 reference manual and read contents of flash registers using Flash Driver API . Flash security register (FSEC) was 0xFE (this means that device is in unsecured state) . Flash protection registers (FPROTOn) suggested that some areas of flash are being protected and accourding to K60 reference manual with flash protection ON, we cannot erase and program those memory locations. So my question is , Is it flash protection that is causing this problem? . How can i turn off flash protection?. Refernce manual says that we can only program these registers with NVM Special Mode, but i cannot find any information on switching to NVM Special Mode in order to write 0xFFFFFFFF to unprotect all memory locations.
If my device is in unsecured mode , why cannot i program flash?. Could anyone please guide what might be wrong and how to find its solution.