Hi,

I think that FAT32 is not a fail-safe file system by its nature. There may
be data losses (file table corruption) in case of power loss during file
write (file table update) or maybe in some other cases when file system
access is interrupted.
I think HCC had some product called SafeFAT that was basically building a
kind of fail safe operation by creating shadow files and implementing a
kind of "commit" swap between shadow and real file, so the file table is
not destroyed if operation is interrupted. I used that a long time ago and
do not recall all the implementation details, but know the basic idea
behind that.

I'm not sure what is the best option for FS on top of SD card to get fail
safe operation and especially is any of those options available in nuttx.

Best regards,
Petro

ср, 20 вер. 2023 р. о 19:36 Alan C. Assis <acas...@gmail.com> пише:

> Hi Simon,
>
> I tested it recently (not extensive test) and it was working fine
> (stm32f777 meadow board).
>
> Did you try to run apps/testing/fstest to push its hard(ware) limits? :-)
>
> Also a simple way to verify if FAT is working is creating a RAMDISK
> (formatted as FAT) and run your application using it.
>
> If some issue was introduced if the kernel itself (instead of in your
> MCU) it could be detected using RAMDISK even in the SIMulator (you can
> copy the /dev/ramX content to a file and then check it on your host
> computer using the dos check tool).
>
> BR,
>
> Alan
>
> On 9/20/23, Simon Filgis <si...@ingenieurbuero-filgis.de> wrote:
> > Dear all,
> >
> > Once in a while nuttx breaks the fat32 filesystem of my sd-card.
> >
> > Custom fork, around 1 year old. samv7, DMA enabled.
> >
> > I have syslog to sd-card enabled. Also a FTP server accepts files to
> > sd-card.
> >
> > Has anybody observed something similar? How to start debugging such an
> > issue?
> >
> > Simon
> >
> > --
> > Hard- and Softwaredevelopment Consultant
> > Ingenieurbüro-Filgis
> > USt-IdNr.: DE305343278
> >
>

Reply via email to