[ECOS] FAT32 over NAND

Paul D. DeRocco pderocco@ix.netcom.com
Wed Jan 21 04:26:00 GMT 2009


> From: Jonathan Larmour
>
> That implementation doesn't sound like an FTL, but then without things
> like wear-levelling or dealing with the inevitable bad blocks, it doesn't
> sound terribly useful either! I doubt that that conflicts with
> the patent.
> You could write a (non-standard) FTL that worked on top of it of course,
> but that's presumably not what you're talking about.

It is an FTL, if I understand the term correctly. To the higher levels, the
device looks like a regular disk capable of supporting a FAT16 file system,
the only restriction being that the "disk" has to be formatted so that the
cluster size matches the erasable block size, and their boundaries have to
line up.

Underneath, it uses a RAM-based lookup table to map clusters to blocks, but
since FAT16 can't have any more than 64K clusters, the table can never
exceed 128KBytes. The mapping info is stored in the extra 16 bytes that
accompany every 512 byte page or "sector", along with a Hamming code that
can correct any single-bit error and detect most higher errors.

It deals with bad blocks by only allocating 1000 out of every 1024 blocks,
leaving the remaining 24 as spares, and it has a way of marking blocks free
(unused), dirty (needs erasure), bad (never to be used again), or allocated
to a particular location. If the software always searches for a free block
just past the last block that it found, then wear tends to be leveled
statistically, as long as the power stays on, but there is no usage count
recorded in the flash that forces precise leveling. But nowadays, flash
memories are so damn good that such a system works just fine for any but the
busiest applications. For instance, in a camera, it's doubtful that any
particular block will get erased and rewritten 100,000 times.

The SmartMedia spec was developed and owned by Toshiba, and launched in 1995
according to Wikipedia. It's now completely obsolete, but since it consisted
of a single NAND flash chip with no controller, the software needed to talk
to a SmartMedia card is still useful if you want to solder a single NAND
flash chip to a board, and run a FAT16 file system on it.

It's possible that SmartMedia does use M-Systems' patent, and that Toshiba
licensed it, because in order to obtain the SmartMedia spec, you had to buy
it, and I recall it wasn't particularly cheap. But if that's true, then
merely knowing how to write the necessary translation layer (which I know
because I wrote one years ago for a company that bought the spec) wouldn't
give you the right to put it into a product. That's what I'm curious about.

--

Ciao,               Paul D. DeRocco
Paul                mailto:pderocco@ix.netcom.com


-- 
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss



More information about the Ecos-discuss mailing list