Writing to emulated EPROM flash more than once

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

Writing to emulated EPROM flash more than once

1,119 Views
Pyretta
Contributor I

The Application note says not to do it unless we first erase the whole page and then I would assume rewrite all 511 locations and change just the one that I want however, the application note test software first reads the location for a 0xFF and if it sees the 0xFF, it writes data to that location.

 

My Question is, how do I know the difference between a 0xFF that was written because of a page erase and a 0xFF that was written because I wrote 0xFF to that location? Can't I just write 0XFF to the location before I write my new value? What is the significance of erasing the whole page versus just putting a 0xFF into a specific address before writing my new value?

 

Thanks for your help!! 

 

"NOTE
Do not program any byte in the FLASH more than once after a successful
erase operation. Reprogramming bits to a byte that is already programmed
is not allowed without first erasing the page in which the byte resides or
mass erasing the entire FLASH memory. Programming without first erasing

may disturb data stored in the FLASH."

Labels (1)
Tags (1)
0 Kudos
3 Replies

420 Views
peg
Senior Contributor IV

Hello,

 

Looking at this from a bitwise perspective...

You can only programme 1's to 0's

The only way to make a 0 a 1 is to erase it.

 

You CANNOT programme a 1!

 

You can erase a page and then programme it 1 byte a day (for example).

0 Kudos

420 Views
bigmac
Specialist III

Hello,

 

Expressing the same thing in a different way - if the value read from a flash address contains 0xFF, it is considered to be "unprogrammed".  Any other value, and it is "programmed".

 

Regards,

Mac

 

0 Kudos

420 Views
Pyretta
Contributor I

Ok thank you for your responses. I think that I would be better off to assume that the location is written to in my software and just copy the whole page to a different page with my new modified value, wipe out my first page, and write my 'secondary' page back to the main page.

 

I thought that we could do it in RAM but if for whatever reason there was a power outage right after the page erase was issued, the data would be lost. So probably better to use 2 pages and play it safe.

0 Kudos