2008-05-07 03:28 AM
2011-05-17 12:52 AM
Has someone worked on avoiding filesystem corruption?
What can be made? Please comment.2011-05-17 12:52 AM
Well, unless you have a backup battery (or a very early warning that the system is about to lose power, you are kinda SOL).
What you can do however, is call fs_flushFs(&efs) - that will write the FAT table, and at least get you your files up to that point.2011-05-17 12:52 AM
Yes i have a battery backup.
Maybe i can write the &efs to a own section and call fs_flushFs(&efs) after power up.2011-05-17 12:52 AM
made a try and cannot flush, must first efs_init() to initilaze the SD card and then i lose backed up data.
2011-05-17 12:52 AM
fs_flushFs will write the contents to the FAT table, but you can't do that after the powerup - you need to do that BEFORE the power down. (I am assuming you are trying to preserve whatever files you had opened you were writing to the moment that you lost data).