AnsweredAssumed Answered

Write word to Flash/EE ADuC7060

Question asked by Anton1000 on Jun 10, 2011
Latest reply on Jun 16, 2011 by Empedocles

I want write to flash/ee memory two words in different adresses, but i can't to do this. Before write operatin I should erase 512 byte of flash and after that I can write first and second word. If I want write first word I should erase 512 byte with second word too. Can I write down one word without deleting of the second?

FEEADR = 0x7600;                      // Write  ADRESS
FEEDAT = 0xAAAA;                    // Data to Write
FEEMOD = BIT3;                             // Enable WRITE / ERASE
FEECON = 0x03;
while ( (FEESTA & BIT2) ) {};

 

FEEADR = 0x7602;                      // Write  ADRESS
FEEDAT = 0xBBBB;                    // Data to Write
FEEMOD = BIT3;                             // Enable WRITE / ERASE
FEECON = 0x03;
while ( (FEESTA & BIT2) ) {};

 

Command  FEECON = 0x02; doesn't work without erase operation.

Outcomes