EEPROM write endurance - entire memory or 1 address? - Page 1
Forum section: electronics / projects

author: Atlantis
author_rank: Newbie
timestamp: May 19, 2014, 11:34:14 am
content: Hello, I am designed one project (battery data logging) as my school project and now I uncovered one question I don't know how to answer - if I use EEPROM memory which says in datasheet "Endurance: 1,000,000 write cycles" - is this number of writes in one address of the memory or for the entire chip?If you need to know why I am asking - the device writes values every 5seconds until the memory is full. If the 1M writes is only per address it is fine because new measurements (time between writes to the same memory address) will be over a day or so. But in case the 1M writes is common for entire memory, it will fail very soon (2months)I hope you can help me. Thanks

author: amyk
author_rank: Super Contributor
timestamp: May 19, 2014, 11:36:53 am
content: Per bit cell.

author: Atlantis
author_rank: Newbie
timestamp: May 19, 2014, 11:56:02 am
content: So it will last for 1M writes to every bit? Why dont they say is in datasheet?Do you please have some datasheet/document which says something about it? I need to cite some literature/document in my work. Thanks

author: digsys
author_rank: Unknown
timestamp: May 19, 2014, 12:12:36 pm
content: Unless you can keep track of each bit per byte, you simply count any write # to that byte as +1. Counts usually are on 1>0'sand an erase is 0>1 or 1>1 - not countedIf you have enough EEPROM, you can do your own "wear levelling" and extend the life a LOT. You simply run a RAM/EEPROM counterfor each of the most used bytes. Using 1,048,576 counts (4,096 x 256) = close enough to rated#, you could have you 1 byte RAM counter0-255 continuous, incrementing a 2 byte EEPROM (0-4096) **If you want to preserve EEPROM, use 2 bytes RAM / 1 byte EEPROMThen when you reach the limit, increment an EEPROM offset table to point to the new location.It's stuff we used to do when 2K EEPROM was $30-50 and only good for 10K writes.It doesn't matter if there is occasional power loss, and the RAM counter is reset, the 1M figure isn't exact, just guaranteed.

author: Kjelt
author_rank: Super Contributor
timestamp: May 19, 2014, 02:53:33 pm
content: What is the exact partnumber? Look in the datasheet of that partnumber this has to be mentioned somewhere.There are eeproms that use flash technology and there the rules are different. Writing one or more bytes in a flash page will erase the entire flash page and rewrite the entire flash page. Those eeproms are page addressed (SPI or I2C). So for those devices, you can write only one million times in that same flash page.

author: mariush
author_rank: Super Contributor
timestamp: May 19, 2014, 03:09:10 pm
content: For a school project, it won't matter, it will last more than a few days of testing and demonstration.But yes, Flash eeproms will be a bit worse, probably only having 50k-100k page writes guaranteed, while the older style eeproms will have 1 million bytes or bits guaranteed (but it may take more time and more current to actually write the data, to flip those bits)There's also FRAM chips that have 10^13 writes per byte, but they're more expensive and available in small sizes only ... for example 1 megabit - 128 KB x 8 bits - for 3$:http://www.digikey.com/product-detail/en/MB85RS1MTPNF-G-JNERE1/865-1255-2-ND/4022657The advantage is not only large number of writes but also that they're very fast so in theory if you really want to you could get a small 4k or 32k one and use it as a buffer, and as it gets full you could send whole 512 byte packets of data to flash eeproms or write the whole 4-32k data to regular eeprom and then put it to sleep.But of course, for that you could also use SRAM memory:http://www.digikey.com/product-detail/en/23K256-I%2FSN/23K256-I%2FSN-ND/2001113but sram uses more power if i remember correctly.

author: mimmus78
author_rank: Unknown
timestamp: May 19, 2014, 04:05:37 pm
content: It's nor entire chip or per "bit cell".It's based on the "erase block" ... read more here:http://en.wikipedia.org/wiki/Wear_leveling

author: theatrus
author_rank: Frequent Contributor
timestamp: May 19, 2014, 04:52:53 pm
content: And erases (the flip back to 1) are usually the more destructive. 1M is on par for EEPROMs. High density flash memory (such as used in SSD drives, etc) quickly drops to 1k-10k erase cycles per *page*.FRAM is very enticing for high durability - there are even MSP430s with it embedded.

author: Atlantis
author_rank: Newbie
timestamp: May 21, 2014, 01:11:32 am
content: Hi guys, thanks for answers. I discovered the writes are probably per page. In datasheet i found information""When doing a write of less than 128 bytes the data in the rest of the page is refreshed along with the data bytes being written. This will force the entire page to endure awrite cycle, for this reason endurance is specified per page."So If I understand this correctly, the effective endurance is 1000000/128 because if I write byte by byte, when writing the last one, all previous 127 are already 127 times re-written....I know FRAM is better but it is expensive...well maybe not the memory but I cant find suitable device in my local hardware shops and the postage just for one device is ridiculous.

author: digsys
author_rank: Unknown
timestamp: May 21, 2014, 04:04:02 am
content: Quote from: Atlantishmmm maybe. GENERALLY, you keep a RAM duplicate of the block and only do a "block write" when you either - 1/ have enough changes2/timer based 3/power loss detection. If you're updating firmware eg you ONLY do a write once a complete block is assembled.You CAN do it a byte at a time, but THEN it really does wear down your #cycles

author: Kjelt
author_rank: Super Contributor
timestamp: May 21, 2014, 07:47:25 am
content: In practice you will have to calculate the RAM Buffer.Example:a- 1 byte every 5 seconds need to be written.b- lifetime flash page 1000000 cyclesc- requirement lifetime product 10 years (315360000 seconds)Req. C devided by Req. A results in 63072000 writes of 1 byte which will not meet req. b.So to meet all requirements you need a buffer of 63072000/1000000 = +/- 64 bytesWhich means you need a RAM buffer of 64 bytes and when it is full you write it to the correct flash page.This will also give you another requirement: detect brown outs and mains power failure before it is too late and seperate the uC power supply with enough juice (capacitors) to survive for the time needed to write and check the 64 bytes to the eepromOR use an extra device like the mentioned FRAM to use as the 64 byte or 128 byte buffer till it is full and then write to the flash.enough options

author: Psi
author_rank: Super Contributor
timestamp: May 21, 2014, 07:50:09 am
content: Quote from: mimmus78 on May 19, 2014, 04:05:37 pmDunno about others but with AVR's the internal eeprom is erased 1 byte blocks.So each byte can be written/read and wont effect the lifespan of adjacent bytes.

author: lpc32
author_rank: Frequent Contributor
timestamp: May 21, 2014, 05:47:56 pm
content: BTW, not that it should matter usually, but in FRAM, reads affect the endurance the same as writes.