How does flash memory data retention works? - Page 1
Forum section: electronics / projects

author: DIPLover
author_rank: Regular Contributor
timestamp: April 18, 2018, 11:01:03 am
content: 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 : 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 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 , does erasing and reprogramming the chip reset the metaphorical data retention counter?

author: amyk
author_rank: Super Contributor
timestamp: April 18, 2018, 11:05:50 am
content: 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.

author: Psi
author_rank: Super Contributor
timestamp: April 18, 2018, 11:14:44 am
content: Quote from: DIPLover on April 18, 2018, 11:01:03 amHow would the cow breath?

author: darrylp
author_rank: Regular Contributor
timestamp: April 18, 2018, 11:20:32 am
content: It's trying to hold its breath as well as remembering what it put onto the flash chip !! LolSent from my HTC One using Tapatalk 2

author: Mechatrommer
author_rank: Super Contributor
timestamp: April 18, 2018, 12:01:31 pm
content: Quote from: Psi on April 18, 2018, 11:14:44 ambefore that, where can we find spherical cow? or can a normal cow even survived if being forced spherisized.

author: SiliconWizard
author_rank: Super Contributor
timestamp: April 18, 2018, 01:45:52 pm
content: Quote from: Psi on April 18, 2018, 11:14:44 amOr maybe the cow isn't the only thing lying in a vacuum?

author: raptor1956
author_rank: Frequent Contributor
timestamp: April 18, 2018, 06:43:53 pm
content: 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

author: TomS_
author_rank: Frequent Contributor
timestamp: April 20, 2018, 08:20:09 am
content: Quote from: raptor1956 on April 18, 2018, 06:43:53 pmI 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.

author: xani
author_rank: Frequent Contributor
timestamp: April 20, 2018, 11:02:31 am
content: Quote from: raptor1956 on April 18, 2018, 06:43:53 pmWith 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

author: abyrvalg
author_rank: Frequent Contributor
timestamp: April 20, 2018, 01:56:57 pm
content: 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

author: DIPLover
author_rank: Regular Contributor
timestamp: April 20, 2018, 02:43:20 pm
content: 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.

author: SiliconWizard
author_rank: Super Contributor
timestamp: April 20, 2018, 03:27:52 pm
content: Quote from: DIPLover on April 20, 2018, 02:43:20 pmIt'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.

author: David Hess
author_rank: Super Contributor
timestamp: April 20, 2018, 03:42:57 pm
content: Quote from: DIPLover on April 18, 2018, 11:01:03 amNo.QuoteYes, and storage and operating temperature and how it was programmed.QuoteYes, and the same applies to EEPROM data storage which becomes a problem if calibration data is lost.Quote from: raptor1956 on April 18, 2018, 06:43:53 pmGood 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.Quote from: DIPLover on April 20, 2018, 02:43:20 pmThe 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.