Author Topic: How does flash memory data retention works?  (Read 799 times)

0 Members and 1 Guest are viewing this topic.

Offline DIPLover

  • Regular Contributor
  • *
  • Posts: 122
  • Country: ca
How does flash memory data retention works?
« on: April 18, 2018, 09:01:03 pm »
Let's say a specific flash memory chip has a data retention of exactly 20 years to the day, (let's consider a spherical cow, in a vacuum...).

Is that data retention characteristic :
[1] related to the chip manufacturing date ? (i.e. this flash memory will be good for exactly 20 years, then will no longer retain anything)
or
[2] is it related to it's programming date ? (i.e. when you program this chip, it will retain it's data for 20 years)

And if [2], does erasing and reprogramming the chip reset the metaphorical data retention counter?
 

Offline amyk

  • Super Contributor
  • ***
  • Posts: 5843
Re: How does flash memory data retention works?
« Reply #1 on: April 18, 2018, 09:05:50 pm »
Flash memory works by trapping charge on floating-gate transistors. The charge slowly leaks out over time, so it is counted from the programming date, but if you erase and reprogram then the leakage increases due to wear of the insulator, so if you theoretically wait until it erases itself and then reprogram it, then it will take slightly less time to erase itself again.

It's also highly temperature-dependent --- leakage increases at high temperatures.
 

Online blueskull

  • Supporter
  • ****
  • Posts: 10231
  • Country: cn
  • Power Electronics Guy
Re: How does flash memory data retention works?
« Reply #2 on: April 18, 2018, 09:14:43 pm »
1. It's related to programming date.
2. Yes, but the more you write to the chip, the lower the retention it has.
3. This is usually not a big deal. Retention data is usually rated at end of life (maximum R/E cycle). With light use, retention can be much longer. Brand new MLC SSDs can last for years powered off. NOR chips can last at least a decade when P/E count is low.
4. Retention is also rated based on temperature. The higher the temperature when the part is programmed (for flash), the longer the retention. On the opposite, the lower the temperature it stores, the longer the retention is has.

https://www.jedec.org/sites/default/files/Alvin_Cox%20%5BCompatibility%20Mode%5D_0.pdf
See page 27.
 

Offline Psi

  • Super Contributor
  • ***
  • Posts: 6433
  • Country: nz
Re: How does flash memory data retention works?
« Reply #3 on: April 18, 2018, 09:14:44 pm »
let's consider a spherical cow, in a vacuum.

How would the cow breath?
Greek letter 'Psi' (not Pounds per Square Inch)
 

Offline darrylp

  • Regular Contributor
  • *
  • Posts: 127
  • Country: gb
Re: How does flash memory data retention works?
« Reply #4 on: April 18, 2018, 09:20:32 pm »
It's trying to hold its breath as well as remembering what it put onto the flash chip !! Lol

Sent from my HTC One using Tapatalk 2

 

Offline Mechatrommer

  • Super Contributor
  • ***
  • Posts: 8283
  • Country: my
  • reassessing directives...
Re: How does flash memory data retention works?
« Reply #5 on: April 18, 2018, 10:01:31 pm »
let's consider a spherical cow, in a vacuum.
How would the cow breath?
before that, where can we find spherical cow? or can a normal cow even survived if being forced spherisized.
if something can select, how cant it be intelligent? if something is intelligent, how cant it exist?
 

Offline SiliconWizard

  • Super Contributor
  • ***
  • Posts: 1181
  • Country: fr
Re: How does flash memory data retention works?
« Reply #6 on: April 18, 2018, 11:45:52 pm »
let's consider a spherical cow, in a vacuum.

How would the cow breath?

Or maybe the cow isn't the only thing lying in a vacuum?  :-DD
 

Offline raptor1956

  • Frequent Contributor
  • **
  • Posts: 617
  • Country: us
Re: How does flash memory data retention works?
« Reply #7 on: April 19, 2018, 04:43:53 am »
Do any of the SSD's or similar flash memory/storage devices maintain a write date on the data so that it can rewrite the data before it losses the data?


Brian
 

Offline TomS_

  • Regular Contributor
  • *
  • Posts: 248
  • Country: gb
Re: How does flash memory data retention works?
« Reply #8 on: April 20, 2018, 06:20:09 pm »
Do any of the SSD's or similar flash memory/storage devices maintain a write date on the data so that it can rewrite the data before it losses the data?


Brian

I wouldnt think so. They would need a backup battery of some sort to maintain an RTC of sorts, and I dont think Ive ever seen/heard of anything like that on a flash drive/SSD. And theres no guarantee that the thing would be powered up at the time that it needs to refresh the data anyway.

This could potentially be a function of a higher level process, like a file system driver. Or the drive fails or is replaced/disposed of before it reaches the retention threshold.
 

Offline xani

  • Frequent Contributor
  • **
  • Posts: 348
Re: How does flash memory data retention works?
« Reply #9 on: April 20, 2018, 09:02:31 pm »
Do any of the SSD's or similar flash memory/storage devices maintain a write date on the data so that it can rewrite the data before it losses the data?


Brian

With retention dating in years, it wouldn't make much sense. If vendor wanted to do that, they would just rewrite every sector every X months in round-robin fashion.

That said, with flash block size dedicating few bytes for a timestamp wouldn't hurt the amount of space available.

But that is all if vendors actually gave a shit. If flash retention is 20 years and warranty is 5-10 years I'd wager they dont give a shit



 

Offline abyrvalg

  • Frequent Contributor
  • **
  • Posts: 344
  • Country: ru
Re: How does flash memory data retention works?
« Reply #10 on: April 20, 2018, 11:56:57 pm »
For SSDs (and the other kinds of managed flash like eMMC/SD/etc) the degradation should be detected at read, triggering sector reallocation. So reading all sectors once in X years should help ;D
 

Offline DIPLover

  • Regular Contributor
  • *
  • Posts: 122
  • Country: ca
Re: How does flash memory data retention works?
« Reply #11 on: April 21, 2018, 12:43:20 am »
My original question was more in the context of aging test equipment from the 80s and 90s.

I have occasionnaly performed firmware updates on old equipment and was wondering if that would prolong the readability of the data. (and thus the life of the instrument).

One of the first things I do with every new piece of old equipment is dump the contents of all the socketed flash and e(e)proms. If I can read them OK, I will now try to refresh them as well.
 

Offline SiliconWizard

  • Super Contributor
  • ***
  • Posts: 1181
  • Country: fr
Re: How does flash memory data retention works?
« Reply #12 on: April 21, 2018, 01:27:52 am »
I have occasionnaly performed firmware updates on old equipment and was wondering if that would prolong the readability of the data. (and thus the life of the instrument).

It's hard to tell IMO. Kind of a trade-off.
The more you'll rewrite to a flash chip, and the worse will become its retention. But on the other hand, when you rewrite it, you start "afresh". It will just be for less and less time, every time you rewrite.

That said, a flash chip in a lab equipment will probably see only a few rewrites in its lifetime (very far from the several tens of thousands that it's rated for), so each update will not wear it significantly.
You could also change the flash chip like every 10 or 20 years and thus keep your device working eternally (provided of course that nothing else fails). I have a Lecroy scope from 2000 and there is no sign of Flash retention failure as of yet.

As to SSDs, I have heard that Samsung does have some kind of data refresh scheme in some of their firmwares. Of course they are kinda secretive, so I don't know what it actually does.
« Last Edit: April 21, 2018, 01:32:44 am by SiliconWizard »
 

Offline David Hess

  • Super Contributor
  • ***
  • Posts: 7839
  • Country: us
  • DavidH
Re: How does flash memory data retention works?
« Reply #13 on: April 21, 2018, 01:42:57 am »
[1] related to the chip manufacturing date ? (i.e. this flash memory will be good for exactly 20 years, then will no longer retain anything)

No.

Quote
[2] is it related to it's programming date ? (i.e. when you program this chip, it will retain it's data for 20 years)

Yes, and storage and operating temperature and how it was programmed.

Quote
And if [2], does erasing and reprogramming the chip reset the metaphorical data retention counter?

Yes, and the same applies to EEPROM data storage which becomes a problem if calibration data is lost.

Do any of the SSD's or similar flash memory/storage devices maintain a write date on the data so that it can rewrite the data before it losses the data?

Good flash drives scrub on read and perform scrubbing during idle time.  Once the number of correctable errors in a sector passes some threshold, it is written to a new area, the translation table is updated, and the old sector placed back into the pool of sectors to be reused.

This is needed not only due to time since each sector was programmed but also because write *and read* operations disturb the state of other memory areas at least with NAND based flash memory.

I ran tests on various USB flash sticks I have collected and none of them performed idle time scrubbing; this makes sense given that they could lose power at any time interrupting a write operation.  Whether powered continuously or not, they become corrupted within a year.  I did not test them for read scrubbing.

My original question was more in the context of aging test equipment from the 80s and 90s.

I have occasionally performed firmware updates on old equipment and was wondering if that would prolong the readability of the data. (and thus the life of the instrument).

One of the first things I do with every new piece of old equipment is dump the contents of all the socketed flash and e(e)proms. If I can read them OK, I will now try to refresh them as well.

The 20 year retention specification for PROM and EPROM types of floating gate memory is very conservative; it takes into account a specified number of program cycles and temperature.  I have seen more mask and fuse based ROMs fail than floating gate PROMs and EPROMs lose memory.

Some modern devices store firmware in NAND flash which is not scrubbed and has a retention time of just a few years.  If their firmware is not reprogrammed on a regular schedule, then they will fail.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf