K60 Flash Problem

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

K60 Flash Problem

1,137 Views
mohwaqas12
Contributor III

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.

 

Thanks

Waqas

 

2 Replies

360 Views
apanecatl
Senior Contributor II

Hi Muhammad,

which software are you using? CodeWarrior, IAR?

I'd like to take a look at your screenshots however I could not find the attachments

0 Kudos

360 Views
mohwaqas12
Contributor III

Hello Pedra,

I am using IAR 6.3. Attached are the screen shots for the problem.

1.JPG

2.JPG3.JPG

0 Kudos