We are occasionally getting issues with data and directories on an SD Card becoming corrupted with WinCE7 on a Colibri T30. We haven’t found a way to reproduce the issue yet.
One thing I am speculating is that maybe sometimes we could be powering down without writes to the card having been finalised yet.
We power down from within a mixed C/C# application by toggling a discrete line (but enough time should have elapsed to allow all writes to the card to have been completed).
A couple of questions:
We have closed files e.g. via fclose(), but is there any way to make sure that any operating system cache in RAM has all been written to the SD Card, prior to powering down … i.e. a “flush everything” command?
Is there a more graceful way to control a discrete to power down - could we do this as part of the post amble if we exit our program?