On Tue, Jul 27, 2010 at 05:25:23PM +0200, Peter Stuge wrote: > Matthew Dharm wrote: > > What happens if you mount, write, umount, walk away for 5 min, mount, > > readback, and compare -- all without actually detaching the device and > > re-booting it > > I usually reset the device without detaching it. There's a proper > reset switch on the microcontroller RESET# signal. I just tried this, > and the file read back has correct contents. If I reset and remount, > I get the bad contents. Now it's 1024 0xff (erased flash) instead of > 0x00. This is likely an incompatibility between the linux vfat and the device firmware. The "filesystem" is likely a ram-cache of the firmware. BUT, it probably doesn't copy the cache back to the flash until after you reset the device. When you reset, the firmware walks through the filesystem, reads the file, and tries to copy it to flash. Yes, there is programming firmware in this mode; it is likely burned into the device at the factory. Thus, without the reset, you can see the ram-cache perfectly. The programming code is mis-interpreting what linux puts into the filesystem. What that incompatibility is I don't know; however, I have seen many many bad vfat implementations with all sorts of goofy behavior. > 1483 lines of debug output is at http://stuge.se/lpc1343_isp.txt > (Is it OK to send the 115kb log to the list?) No. Matt -- Matthew Dharm Home: mdharm-usb@xxxxxxxxxxxxxxxxxx Maintainer, Linux USB Mass Storage Driver Now payink attention, please. This is mouse. Click-click. Easy to use, da? Now you try... -- Pitr to Miranda User Friendly, 10/11/1998
Attachment:
pgpJ6QoqwkB6Z.pgp
Description: PGP signature