Software ECC on NOR Flash

Joshua Lamorie jpl at xiphos.com
Wed Apr 30 00:50:38 PDT 2014


Hello there,

I would like to request some recommendations for how best to implement software ECC for NOR flash devices presenting MTD or UBI interfaces.

Background

I am using Linux with MTD on a couple of LEO satellite applications. In the case of NOR flash, even when no write activity occurs the radiation environment (primarily energetic protons) can cause bit flips (often from 0 to 1).  Presently, I am presently using various FEC, EDAC and redundancy techniques on large sections (e.g. kernel and ramdisk images). This works well, but I would like the flexibility of a UBIFS or JFFS2 system so I can remotely modify individual files (albeit rarely).

Archive Search

I have gone through the linux-mtd archives and I have been unable to find any specific examples of this. The closest was a series of patches from June 2013, referring to a generic 'spinand' framework.

http://lists.infradead.org/pipermail/linux-mtd/2013-June/047339.html

This seems interesting because the implementation appears to target a NOR flash device (S25fl256s) which I don't think has OOB data, and there is a software ECC.  However, after following Sourav Poddar's related messages (Jul. and Aug.), it appears this was dropped (although mt29f_spinand lived on).

Layers

I have been looking into where I might place some type of ECC layer and I believe my options are:

1) UBI: Add 'extra' ECC data (and functions) to the UBI logical erase block.
2) MTD-MTD: Create an MTD middle layer that uses the current mtd interface to read/write/erase the memory device, add some ECC and then present a contrived mtd interface to higher layers.
3) m25p80: Use blunt-force-trauma to squeeze some hack into the driver's read/write functions.

I understand that this is a somewhat rare situation, but I'm sure there are plenty of cubesat developers who would jump all over a good solution to this.

Thanks in advance

Joshua Lamorie
Xiphos Systems Corp

p.s. I am presently lurking around the Embedded Linux Conference if anyone wants to talk about this in person.





More information about the linux-mtd mailing list