J.C. Wren wrote:
Be aware that FAT is an extremely poor format for MMC if you plan to do
much writing. Compact flash cards have automagic wear leveling
yes, its sure not the best. but (e.g. FAT16) its the only FS which you
can read on almost all platform and especialy on the most popular one...
...
And if I recall correctly, unlike compact flash cards, MMC cards don't
report write errors, so the only way you'll know you've failed to do a
hm... "MultiMediaCards contain a sophisticated defect and error
management system." and "In the rare case that a bit is found to be
defective, MultiMediaCards replace this bad bit with a spare bit
within the sector header. If necessary, MultiMediaCards will even
replace the entire sector with a spare sector. This
is completely transparent to the host and does not consume any user data
space."
i dont quote the rest, see yourself:
http://www.sandisk.com/pdf/oem/ProdManualMMCv5.2.pdf Page 10
FAT works great (for small and fully qualified values of great) for R/O
file systems. It's certainly easier to manage than ext2, reiser, or any
other number of systems. And it can be written and read easily by any
MMC equipped PC. But for devices that have finite lifetimes, such as
flash and EEPROM, it's a poor choice, unless you implement the wear
leveling algorithms yourself.
i think its actualy not that worse. if you log to a large file, you can
write block after block, each datablock is only written once. of course
the fat table and the directory entry has to be written more often. but
you can keep the write rate there down too, by caching the FAT table or
at least one block.
there are only two small disadvantages:
1. if the user unplugs the card, you loose a couple of datablocks. maybe
a card slot with flap and a switch can solve that. and a "busy" LED is
useful anyway...
2. if the power is lost you can loose the same as in 1. altough that
should be relatively easy to secure it with a big cap and power supervision.
yes, i think that implementable with 2k RAM on an MSP. you need 512Bytes
to cache the FAT block, a couple of bytes for the directory entry
position and the file size. as i understand, the data can be contiuosly
written at slow rates and the MMC card will write the block after 512
bytes (no cache for the datablock needed :-). in the worst case you need
two 512B blocks what leaves almost 1kB RAM for the application.
chris