We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
Hi,
We are using the RL-ARM and FlashFS, but we having some problems. In some cases, the files are corrupted, and some cases the FAT system are physically damaged. We are using the SD card read-only. Our application reads periodically the SD card for print in a TFT display of BMP files and play WAV files. As we not use the SD card for write, we do not care in close files when a power outage happens. We would like to know ASAP which may be causing the problem. Can be a power outage with file open, even being read-only?
Note that a file attribute within a FAT system can be modified regardless of if the read-only bit is set.
www.pcguide.com/.../fatAttributes-c.html
That said, I have seen corruption without first unmounting an SD card. I have not yet investigated further.
You could always fclose() the file if you support a BOD interrupt (LPC devices) or PVD interrupt (ST devices).