5
\$\begingroup\$

What would be the most reliable Flash memory hardware to use for an embedded Linux system? I.e. one that has the least chance of losing data or getting corrupt when the power goes down? The Flash would be for a Linux system so it would need to be at least 2GB in size. Speed is not super important. Cost is somewhat important, but not as important as reliability. Candidate parts would be Compact Flash, raw NAND Flash, eMMC or some other type I'm not aware of.

We currently use micro SD cards but I don't like them, they seem too unreliable and I've had several either become corrupted or just completely die. Another aspect I don't like is you don't get any visibility into what the card is doing at the lower levels, e.g. how many ECC errors are occurring, how many spare blocks are left etc.

We have a design re-fresh coming up so I wanted to see what the best hardware options would be.

\$\endgroup\$
  • 2
    \$\begingroup\$ Any speed or size limitations to narrow it down? Do a search for "rad hard flash". You might not need the radiation protection but some brands have power latch-up protection and other cool stuff. \$\endgroup\$ – Dejvid_no1 Jun 3 '14 at 19:14
  • \$\begingroup\$ It's for a Linux system so needs to be pretty big, e.g. at least 2GB. No real speed requirements. \$\endgroup\$ – fred basset Jun 3 '14 at 19:24
  • 5
    \$\begingroup\$ The problem with your question is that it is based on a false premise: that the reliability is inherent in the device. It isn't -- the reliability comes from the proper design of the system in which the device is used. The system must either be able to recover from partial/aborted write and/or erase operations, or it must store enough energy to guarantee the completion of any operation it starts. As long as you meet the datasheet requirements for the device in question at all times, all of the technologies are about equally reliable. \$\endgroup\$ – Dave Tweed Jun 4 '14 at 1:29
  • 2
    \$\begingroup\$ Embedded Linux systems do not necessarily require 2GB flashes (anywhere near). It depends on what packages you select, and other considerations, like do you need unstripped binaries with debug symbols for all the packages. \$\endgroup\$ – Kaz Jun 4 '14 at 1:34
  • 1
    \$\begingroup\$ I would like to suggest to potential answer authors to keep in mind the errors seem to occur on power-down file corruption. Perhaps a different file system or battery backup may be suggested. The parts I linked to are for space applications and are therefore at a minimum rad-hard. \$\endgroup\$ – HL-SDK Jun 4 '14 at 1:45
10
\$\begingroup\$

If you want to see what is done inside, you have already answered your question : you can't use managed flash, your only solution is raw NAND flash.

As you want reliability, you can't have 2 pages corrupted when a write fails, this excludes MLC and TLC flash. Go for 2GB SLC NAND flash (BeNAND doesn't fit your requirements). It's expensive, but it's your requirement.

But let's be a little more pragmatic, you need your system to boot and to avoid to be fully corrupted by a sudden power loss. This excludes SD cards, but it allows eMMC : eMMC were specified for embedded environments. Manufacturers like Micron and Toshiba offer eMMC that you can partially use as pseudo SLC to increase reliability for your boot partition, that use buffering to reduce data loss and prevent filesystem corruption, without handling all the ECC correction/page relocation/Bad block handling/wear-leveling stuff by yourself, and, with JEDEC eMMC standard, you can learn about the number of available blocks, the mean/max age of your blocks, and you have dedicated commands to stop background operations, which allow you to perform a clean shutdown in about 20ms, instead of an indeterminate time with SD card. And this does not require a NAND controller with heavy ECC capabilities.

\$\endgroup\$
  • \$\begingroup\$ Thank you an excellent well informed answer. I'll check out those eMMC parts further. \$\endgroup\$ – fred basset Aug 30 '14 at 17:42

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.