Memory wearing question

Hello, I would like to ask about the cycle lifetime of memories.

It is based on write cycles or erase?

For example. If i have 1GBit Nor Flash (8 *128MBit) if i write for first time first Byte[0] will consume one cycle off lifetime? or I will have to erase/overwite Byte[0] in order to consume one cycle from its lifetime?

If i transfer 128MBit to the first module ( name? for the 1 of 8 128Mbit) one way: same session 128MBit will consume 1 cycle of lifetime? other way: 1M sessions , 16 Byte each session will consume 1 cycle of lifetime or 1M ?

(asking for data logging. it's better to save many samples in RAM and after a certain number transfer them to the flash memory or can directly save each data on flash memory )

The endurance is for each memory cell. Each cell fails separately - when you have one exhausted you can still write to all other until you ruin them too.

Some (most?) memories are organized into larger pages and you must write or erase the page as a whole. (Some memories with pages can still write single bytes.) You need to look to the datasheet.

Look ftp://ftp.microchip.com/tools/memory/total50/tutorial.html for some info.

EDIT: fixed link EDIT 2: cannot get the clickabe link to work, hope it will work this way. Otherwise search "EEPROM endurance tutorial"

so if i write each batch of 20 Bytes which are produced at 20Hz rate (data log)

(with a nor flash ~100.000 cycles) i will kill the memory in 1 hour ? :) ( 100.000 /20 per seconds = 5.000 /3600 per hour = 1.3 hours)

if i save on ram for 1 minute ( i will need 20*20*60 =24.000 Bytes SRam) and then write on flash then i will have 100.000 /60 mins per hour - > 1666 hours (~70 days)

immunity: so if i write each batch of 20 Bytes which are produced at 20Hz rate (data log)

(with a nor flash ~100.000 cycles) i will kill the memory in 1 hour ? :) ( 100.000 /20 per seconds = 5.000 /3600 per hour = 1.3 hours)

if i save on ram for 1 minute ( i will need 20*20*60 =24.000 Bytes SRam) and then write on flash then i will have 100.000 /60 mins per hour - > 1666 hours (~70 days)

Are you 'Writing' all 24,000 bytes to the same single memory cell? Or are you storing 24,000 bytes per minute to the 128MB flash? if you are writing 24k bytes per minute you will fill the 128MB in (128*1024k)/24k=16384/3 minutes or about 91 hours. If you erase and rewrite it 100k times you would be reaching the life expectancy. but it would take you 379,259 days. Or a little over 1,039 Years.

If you use the whole array you will never wear it out. If you only use 20 bytes, and overwrite those 20 bytes 20 times a second, you will wear out those 20 bytes in 100k/(20sec*60min*60hr) or 1 hour 23 minutes 20 seconds.

The other (134217728 - 20) or 134217708 bytes are unused and capable of being used.

I would recommend you use the entire array, not just the first 20 bytes.

Chuck.

Thank for the answer Chuck, i will write 20 byte per time (and ofcourse always write to the next 20 bytes). i though each time i access the memory (invrease voltage) to write the bytes it counts as wear for the whole array/cell

Array/cell 100.000 Bytes

I thought : write 20 bytes per time -> 5000 times till array get full(and go write to next array) these 5000 times will wear the whole array/cell but they counts as 1 wear time for the specific array/cell.

But what really happends is that the wear is on single byte level ?

Thanks very much again :)