Skip to main content
Visitor II
May 7, 2008
Question

EFSL and battery backup SRAM?

  • May 7, 2008
  • 5 replies
  • 948 views
Posted on May 07, 2008 at 12:28

EFSL and battery backup SRAM?

    This topic has been closed for replies.

    5 replies

    pm9341Author
    Visitor II
    May 17, 2011
    Posted on May 17, 2011 at 09:52

    Has someone worked on avoiding filesystem corruption?

    What can be made?

    Please comment.

    Visitor II
    May 17, 2011
    Posted on May 17, 2011 at 09:52

    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.

    pm9341Author
    Visitor II
    May 17, 2011
    Posted on May 17, 2011 at 09:52

    Yes i have a battery backup.

    Maybe i can write the &efs to a own section and call fs_flushFs(&efs) after power up.

    pm9341Author
    Visitor II
    May 17, 2011
    Posted on May 17, 2011 at 09:52

    made a try and cannot flush, must first efs_init() to initilaze the SD card and then i lose backed up data.

    Visitor II
    May 17, 2011
    Posted on May 17, 2011 at 09:52

    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).