write flash memory without erase

Thread Starter

darsie

Joined Feb 19, 2010
15
Hi!

I asked Atmel if it was reliable to just write a page of AVR microcontroller program flash memory (NOR flash, I guess) to all 0 instead of first erasing it to 0xFF and then writing it to 0.

They said, it is not recommended and recommended the erase/write cycle mentioned in the datasheet.

Can someone explain that? I fail to see how setting a page to all 0 could fail without first erasing it to all 0xFF. Or might several subsequent writes accumulate too much charge on the floating gates (FG) such that a following erase might not fully discharge a FG?

Is there any reason not to set any number of bits from 1 to 0 by writing to the page without erasing it first? That would save the other bits an erase/write cycle, I would guess, although I had a different reason for setting a page to all 0.

Thanks
 
Last edited:

Thread Starter

darsie

Joined Feb 19, 2010
15
Here is the Reference Manual for Freescale HC11 MCU.
Chapter 4 has a detailed explanation of failures when the EEPROM is not fully erased.

http://www.freescale.com/files/microcontrollers/doc/ref_manual/M68HC11RM.pdf
Very interesting. They favor different methods:

TI:
allows limited 'selective writing' including "A 0 must not be written more than two times to a single bit."

Freescale:
"preliminary data supports the suggestion that the extra programming time on some bits has no detrimental effects."

"The program-more-zeros method appears to have no risks, and some experimental evidence shows that data retention and program integrity are not compromised. The selective-write method appears to have some theoretical problems, but experimental data has not confirmed any practical problem. Due to the theoretical risks of the selective-write method, that method should probably not be used without a complete understanding of the risks."

There are some confusing aspects in the Freescale document, but I will have to address them later.

Thanks for picking up the discussion.
 
Top