MMC msdos fs corrupt when files copied in shell
Gene Smith
gds at chartertn.net
Tue Jan 6 04:48:59 UTC 2009
Starting with a cleanly formatted fat16 MMC containing some random txt
files, if I try to copy them to new files using the shell cp command,
they seem to work but when put on a pc (linux or windows) the new files
are always corrupted and there are additional files present with random
names that were never copied.
Also, when I first mount the cleanly formatted fat16 MMC (or fat32) and
do ls in the shell I see a couple of random spurious files listed. This
is before I do any copies. If I try to ls those files, the shell says
they don't exist.
Also if I unmount and re-mount the MMC with the shell I see the copied
new files corrupted when cat'ing in the shell. I have varied my MMC
clock speed from 400Khz to 25Mhz with the same result (just copies
faster at higher clock rate). I intend to run at 12.5Mhz (below the max
20Mhz MMC speed).
I see no errors occurring with SYSLOG (DEBUG is defined in
spi-sd-card.c). So not sure what the problem is. Can others copy files
around on a SD/MMC with the shell and obtain good results?
I still need to try the mount and copies with c library calls in some
test code independent of the shell.
-gene
More information about the users
mailing list