0
\$\begingroup\$

NAND-based digital flash data storage devices such as SD,SSD,USBstick,eMMC,UFS,etc. do have transistors, where the small amount of electrical charge does slowly leak over time, resulting into data loss when inactive for excessive time spans. Heat does accelerate that process.

In order to recharge the transistors, do I need to actually read the data like on HDDs, or does the storage just need electrical power supply?

And if the latter one is true, how many seconds or minutes does the NAND storage need power supply? Does 5.3V instead of 4.9V make any difference?

\$\endgroup\$
5
  • 2
    \$\begingroup\$ where are you getting that info? \$\endgroup\$
    – dandavis
    Commented Feb 14, 2018 at 21:15
  • \$\begingroup\$ @DanDavis Internet article. Additionally, one old USB stick randomly had damaged data, so I researched. \$\endgroup\$
    – neverMind9
    Commented Feb 14, 2018 at 21:16
  • \$\begingroup\$ that charge is set on write, so simply powering up the controller would not affect it, you would have to rewrite the full data. I don't think that's a reasonable expectation, it should hold up just fine on the shelf, which is what makes it NVRAM. \$\endgroup\$
    – dandavis
    Commented Feb 14, 2018 at 21:21
  • 3
    \$\begingroup\$ -1 for not doing proper research on how Flash memory actually works. Assuming a certain effect is an issue while in general it isn't. If the data stored on flash drives did "leak away" when in storage, it would be a well known issue. It isn't and flash drives have been around for years. Also assuming that applying a supply voltage will fix it is simply wrong. Flash memory doesn't work like that. \$\endgroup\$ Commented Feb 14, 2018 at 21:57
  • 1
    \$\begingroup\$ +1 for your attention, @Bimpelrekkie. I have done a lot of research. Yes, the data does leak away, but very very slowly. And mostly, error correction is able to tell the controller how to recover. \$\endgroup\$
    – neverMind9
    Commented Feb 15, 2018 at 15:55

2 Answers 2

3
\$\begingroup\$

Flash does lose charge over time.

In order to recharge the transistors, do I need to actually read the data like on HDDs, or does the storage just need electrical power supply?

Nope, you would need to read all the data and rewrite it to refresh the charge inside the gates of the flash transistors. Bits are stored as electrons (ie, charge) injected inside a microscopic insulated bit of metal. The bits stay there because the electrons are trapped inside a tiny piece of metal which is insulated from everything, so the electrons can't escape. You suggest twiddling with the power supply voltage, but this has no influence on the bits, by design.

Flash storage data retention time is determined by stored electrons leaking out, which depends on heat and radiation. It also depends on how many electrons were in there to begin with (ie, storage density) and flash architecture (multi level cell vs single level, NOR vs NAND, etc).

Where data retention is crucial (ie, in a microcontroller for example, if it forgets its code it is dead) you get low density NOR flash. TI provides some data retention info on page 5 of this appnote which is informative. NOR flash allows random access, so it can't use nifty cheats like block error correction codes.

As for USB keys, SD cards, etc, there is an arms race towards more density at cheaper price, and the fact these are accessed per block and not in a random fashion enables useful things like error correction codes, bad block remapping, etc. This is handled by a microcontroller inside the SD card or USB key.

I've found some data retention info online, it should be between 1 and 10 years for a SD card depending on the number of writes. Writing a flash cell is a bit of a traumatic process for the oxide layer, so a high number of writes makes the cell more leaky.

So, there is actually no reason (besides power saving) why the microcontroller wouldn't be able to periodically read the data and rewrite the sectors that begin to rot. There does seem to be a SD card which refreshes itself and rewrites the data to increase data retention when needed. A bit expensive though.

You can do it manually, but I'm not sure it would be a good idea. Perhaps copy the data from one storage media onto another... like... you know... a backup!

The most probable cause of data loss for a USB key isn't flash death anyway, rather:

  • misplaced or lost somewhere
  • FAT32 filesystem issues
  • ripped connectors and the like

So... RAID array + backups!

\$\endgroup\$
7
  • \$\begingroup\$ I do backups, especially onto optical media. But I am just interested into the science behind it. Yet thank you for your answer. +1. \$\endgroup\$
    – neverMind9
    Commented Feb 15, 2018 at 15:52
  • \$\begingroup\$ I think that the timespan is much shorter than 20 years for MicroSD cards with high capacity. \$\endgroup\$
    – neverMind9
    Commented Feb 15, 2018 at 15:58
  • 1
    \$\begingroup\$ Thanks. I've updated the post, there is actually a SD card which refreshes itself (link added). \$\endgroup\$
    – bobflux
    Commented Feb 15, 2018 at 18:03
  • \$\begingroup\$ Do you have any more information on FAT32/exFAT disasters? \$\endgroup\$
    – neverMind9
    Commented Feb 15, 2018 at 21:06
  • 1
    \$\begingroup\$ These filesystems do not use journaling, so ejecting the card or losing power during a write can corrupt it. Even with journaling, power loss during writes on flash is a touchy issue... you might lose more than the data that is being written, and it can spread to adjacent blocks too. A simple write may cause the controller to decide to move data around, etc... cseweb.ucsd.edu/~swanson/papers/DAC2011PowerCut.pdf embeddedarm.com/about/resource/… \$\endgroup\$
    – bobflux
    Commented Feb 16, 2018 at 12:43
1
\$\begingroup\$

Flash data is stored on floating gate transistors like this one: floating gate transistor

Initially, the transistor has no charge on its floating gate, so when we apply a positive voltage to the control gate, the transistor conducts, and we call this state 1. When we want to write a 0 to the transistor, control gate will apply a strongly negative voltage so electrons will tunnel across the thin insulator and stay on the floating gate. Now when we apply a positive voltage to the control gate, the transistor can't see it behind the electric field from the negative charge on the floating gate and doesn't conduct.

Because the floating gate is surrounded by insulators, the electrons on it can't leak out and are stuck there until they are forced off by applying a strong positive voltage to the control gate. They will remain there, even if the power is off, for 10 years or more. Additionally, their presence is not changed by reading from the transistor, as none of the voltages used for reading are high enough to cause the electrons to tunnel through the insulator.

\$\endgroup\$
2
  • 5
    \$\begingroup\$ 1. Flash memory retention time is environmentally dependent. Under certain nonideal operating conditions, it can be as little as a few weeks. 2. Read disturb errors are a thing. Reading from a flash memory cell is not a lossless operation; most modern flash controllers will reprogram pages periodically to avoid this. \$\endgroup\$
    – user39382
    Commented Feb 14, 2018 at 21:53
  • 2
    \$\begingroup\$ There is most definitely leakage from the floating gate (and it is highly thermally dependent) and charge dissipates the same way as we programme it; by quantum tunneling. The insulator between the control and floating gate is actually called the 'tunnel oxide'. \$\endgroup\$ Commented Feb 18, 2018 at 17:59

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.