oibaf - 2007-09-25

Certainly I could try do it, but I prefer also ask to others...
I have read in other thread that it is important to sense the power source (with a voltage divider) on the analog comparator. If a power-fall-down is received an interrupt runs fclose and fs_umount, is the best solution.

But what happens if power supply fall down during a writing, for example?

The all card became unreadable and I have to reformat it?
Or I lose the file?
Or I lose only the last data of the file and then I can append to it others data?

I have to write on sd-card some logs, a text file, so if I lose some data it isn't so important. The problem there is only if I lose the previous data in file or obviously I damage the file-system and I have to reformat the all card.

best regards
Fabio