I have developed a datalogger based on the Cerbuine, the application logs data and events to the sd card regularly.
Files are continuously opened but flushed every 5 seconds.
The logger operates perfectly weeks or months in case no writes are issued during a power down or reset…as.it seems…But sometimes the sd card seems to be corrupted
Question: is there a documented way to shut down without corrupting the file system, or the sd card?
Thanks for the suggestions. It covers part of the risks. What about asynchronous removal of the sd? When you read on the web on this issue you open Pandora’s box
that is is exactly what I already do, and still there are some problems…After a reset I reopen the last hour-file, (which could be corrupted) and start to write in this file again.
Then the trouble starts it seems. I think the best option now is to follwow the suggestion to add a battery and clean- shutdown button…as NETMF has no TFAT available.
GHI FAT implementation on Premium offer is extremely unreliable for industrial applications. I’ve wasted lots of time on it and eventually gave up. The biggest problem is that once the filesystem gets corrupted, it cannot be recovered in at embedded level, and the whole SD card becomes useless. The only way to recover is to plug the card into a PC and fix the problems. It always helps, and I never lost any data this way. So apparently whatever goes wrong, it’s not actually corrupting data, it only makes SD card unusable.
Thanks for the input , saves me a lot trial and error research.
But in case the embedded system must operate in the field, recovering via a PC is not an option.
Do you see any alternatives?
1: other storage medium
2: formatting the medium, and yes losing data?
3: other OS
4: …