8
\$\begingroup\$

I'd like to buy one of those after market Android car head/infotainment units. But I don't think there's a way to reinstall the system software if it gets corrupted, so I'm concerned about how long the data will last on the Flash memory.

I've found old figures like 10 or 20 years, but that's for large, single level cells found in 8-bit microcontrollers, not like the MLC we have today.

According to SanDisk,

MLC flash data retention is orders of magnitude lower than SLC flash.

According to the JEDEC JESD218A standard, data retention at 25C should be 101 weeks. Another source says, "Flash memory retains the data best if the controller is powered up once in a while to scan and correct any bit errors that creep in."

That means they scrub/refresh just like for DRAM, like proposed here.

46x longer data retention! Incredible, but is this implemented on all Flash memory devices today?

But what is the raw, data retention time without refreshing/scrubbing or ECC for a single cell? 101 weeks * 46 = 89 years sounds too good to be true.

Also, how much improvement comes from error correction?

Obviously, the time to the first error without correction would be very low (following a geometric distribution?) for a gigabyte device and not anywhere near the average time for an individual cell. Does error correction raise the retention time for the collective bits to about the same time as for a single, uncorrected cell? Or does it improve beyond that?

\$\endgroup\$
  • \$\begingroup\$ Very interesting question. \$\endgroup\$ – neverMind9 Feb 22 '18 at 18:30
  • \$\begingroup\$ Longevity of data is heavily dependent on how used the cell is. In a car situation it should not be cycled that often. That is aside from error correction, and in an unpowered state. \$\endgroup\$ – Zekhariah Oct 17 '18 at 6:30
1
\$\begingroup\$

But I don't think there's a way to reinstall the system software if it gets corrupted

Of course there is. How do you think they loaded the software onto the device in the first place?

Every android device has two fail safes built in. First, there is a copy of the entire operating system stashed on a recovery partition. This is what lets you do a 'restore' of an android device. What it is actually doing is reinstalling the system software from a protected area in the NAND flash address space. This recovery partition, under normal conditions, should only be written to once, when the device was originally flashed by the manufacturer. Occasionally if you install an update, it may update the recovery partition, but there should be single-digit P/E cycles on this part of NAND flash.

And if that somehow gets corrupted, which it won't unless you're rooting/flashing custom recovery images or other 'unsupported' things, then you still have the option of using the same means that was used to flash the device originally. Every android device has a boot loader. This is stored on the special bootloader section of a NAND device, it is usually write protected will have been written to exactly once, and is located on an area of flash that will have certain minimum specs, including no bad sectors, that sort of thing. Excepting Samsung (which I don't think even makes car infotainment systems), an android device is going to have the fastboot bootloader installed as its bootloader. fastboot will let you write directly to the NAND flash (except for the write protected bootloader sector) and reinstall everything. Though, it usually will only let you install signed firmware that is the 'official' software from that manufacturer. And there are rom dumps for pretty much all of these infotainment units available on XDA.

As for the actual data retention of MLC NAND flash, you seem to be confusing two different things. SanDisk, JEDEC JESD218A, that paper you linked, and the 101 week figure, none of them are relevant here. Those are talking about life time of active use. As in, undergoing a certain enterprise or client daily rate of program-erase cycles. A heavily P/E cycled drive is expected to retain data for that long, but this is totally irrelevant to what you're talking about.

That entire paper is talking about extending the life of something in the context of extending how many P/E cycles it can endure before the bit error rate becomes too high. This is irrelevant to your infotainment unit's recovery and bootloader sections because they aren't experiencing any P/E cycles. Theoretically, they will probably only ever be written to once, when they were flashed by the manufacturer. And this isn't by accident, engineers are aware of the limitations of flash, and have designed devices to account for these limitations accordingly. Hence the partitioned recovery section and protected bootloader section.

When talking about sheer data retention for flash memory at low P/E cycles, it doesn't matter what kind, it still uses tunnel injection whether floating gate or MLC, and at low P/E cycles, will have the same retention times. No defects will have accumulated yet allowing charge to leak out vs. the base rate yet, so being MLC doesn't matter at this point.

According to Cypress Semiconductor, for example, a 2bpc (2 bit per cell) MLC flash, at < 50 P/E cycles, has the same data retention as any other type of flash: 20 years at 55 degrees C. Actually, it has 10 year life after 1000 P/E cycles at 55 degrees C, so an erasure every 3.7 days. But there will be almost no erasures, if not actually 0 erasures, on the recovery and bootloader sections of your infotainment unit.

And this time gets much longer at lower temperatures.

If your car is parked directly in the sun all day on a hot, 32-33 degree C (90 F) day, it may reach as hot as 55 C (131 F) inside for several hours.

At temperatures less than 55 degree C, the retention time quickly extends to 50 and even 100 years at room temperature. Which is good since, on this planet, your car will experience night time, and spend a good portion of each day with an interior below 55 degrees C. Most places, it will spend a very small amount of time with its interior as hot as 55 degrees C.

Long story short, the issue you're describing...isn't. Of all the life-time limited parts in your car, the software (which can be reflashed) or bootloader getting corrupted due to data retention loss is one of the last things that will fail. There is no point in concerning yourself with it, as even if it did happen (which it won't, even after 200,000 miles), it can easily be fixed.

\$\endgroup\$
  • \$\begingroup\$ The Android claims here are mostly incorrect. The "recovery" partition does not contain a full system or restore capability, only a minimal system able to operate the upgrade patching functionality. A "restore" does not put things back to original firmware, it merely removes user customizations on top of the most recently installed system upgrade. But most critically of all, neither the recovery partitions, nor key later stage bootloaders exposed via USB, are really any safer from cell data loss than any other part of the flash. Unless there's a USB bootloader in actual ROM, it can die. \$\endgroup\$ – Chris Stratton Jul 27 '18 at 13:58

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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