EmbeddedRelated.com
Forums
Memfault Beyond the Launch

Flash-cells can be used as downcounters - ?

Started by karthikbg November 11, 2006
"Darin Johnson" <darin@usa.net> wrote in message 
news:1163410232.975428.275430@h48g2000cwc.googlegroups.com...
> karthikbg wrote: >> The only way to change one byte in a block of Flash is To : >> 1) Copy the entire block to RAM (or other media) >> 2) Change the byte in the copy created in RAM. >> 3) Erase the Flash block and reprogram it with the entire image. > > This is untrue. Erasing a block turns all of its bits to ones. > You can then change any of the ones to zeros without > erasing again. Only when you need to turn a zero into a > one do you need to erase a block (or move to a different > block). The Flash that I've seen allow modifying a single > byte at a time. > > -- > Darin Johnson >
So you can think of programming a bit as: Write 0 - change bit to a 0 Write 1 - leave bit alone In fact, I believe in some cases, it is suggested that when writing bytes over in this manner, you should overwrite 1's on bits that are already 0. I think it is less wear and tear on the bit. e.g. Old Value: 0xFC New Value: 0xF0 Write Value: 0xF3 Rufus

Rufus V. Smith wrote:

> > > So you can think of programming a bit as: > > Write 0 - change bit to a 0 > Write 1 - leave bit alone > > In fact, I believe in some cases, it is suggested that when > writing bytes over in this manner, you should overwrite 1's > on bits that are already 0. I think it is less wear and tear > on the bit. >
The problem is only the flash manufacturer really knows what is going on inside the flash. The process is much more complicated then you may think and involves several steps. The guessing about tear and wear may be right or wrong depending on the particular device. BTW, many EEPROMs have the hidden ECC for every byte, so it does not matter how many bits in a byte you are changing - wear is the same. Also, many manufacturers do not allow burning a byte into the same address twice, even if the byte is 0xFF. There are the things like "over erasing" and "over programming" of every single cell or a cluster of the cells. Vladimir Vassilevsky DSP and Mixed Signal Design Consultant http://www.abvolt.com
"Rufus V. Smith" <nospam@nospam.com> wrote in message
news:45590b6a$0$31696$88260bb3@news.teranews.com...
> In fact, I believe in some cases, it is suggested that when > writing bytes over in this manner, you should overwrite 1's > on bits that are already 0. I think it is less wear and tear > on the bit.
The problem with that it that the write logic in the Flash will detect this as a write fault after a certain time-out. So writing this way would slow down things considerably. And as far as I know, only the erase action cause the wear. Meindert
"karthikbg" <karthik.balaguru@lntinfotech.com> wrote in message 
news:1163244156.141992.218900@f16g2000cwb.googlegroups.com...
Hi,

>I came across something as below while i was looking for downcounters. >And this is really interesting !! > >" Downwriting is possible in Flash Memory . >Flash-Cells are proberly usable as downcounters. >Start with bytewise "FF" and ure able to reprogram this flash-cell with >every value >that means not to bring a flash-data-BIT from "0" to "1". " > >How is it possible to make the Flash memory to act like downcounters ? > >I am using S29GL512N MirrorBitT Flash. (Spansion Flash). > >Share your views/ideas . > >Thx in advans, >Karthik Balaguru
You can sort of count down FF, 7F, 3F, 1F, 0F, 07, 03, 01, 00 Those particular Spansion Flashes can be reprogrammed on a word (not byte) basis. Some other Spansion series have significant limitations on the number of times you can reprogram bytes or words and indeed which combinations of bytes/words can be reprogrammed "Programming to the same word address multiple times without intervening erases (incremental bit programming) requires a modified programming method. For such application requirements, please contact your local Spansion representative." You must not even try to write a 0 bit back to a 1 bit, always rewrite the 0 to 0, otherwise you will get errors due to the illegal operation. These errors may cut the operation short before the programming of the desired 0 is fully complete. Remember Flash is an analog device. Cheers, Alf

Memfault Beyond the Launch