I want to know is there a way to the corruption of file system in stm32 with fatfs. I tried using (_FS_NOFSINFO = 1) and f_getfree but this function takes a lot of time to execute and doesn't tell if anything is wrong or not.
Asked
Active
Viewed 143 times
2
-
1Presumably you are specifically talking about the [ELM FatFs library](http://elm-chan.org/fsw/ff/00index_e.html) rather then FAT file system generically? ELM FatFs is included with STM32Cube for example. It has no journaling, is not power-fail safe and has no error check or repair function (`chkdsk`). For removable storage, you can of course run such a tool on a PC, for non removable storage, it is hardly fit for purpose. The ELM site includes details of the FAT file-system that you might use to create your own integrity check and repair, but it is no simple undertaking. – Clifford Nov 27 '22 at 14:09
-
Thanks for your replay. I am trying to know is there any reference to check for integrity and how to do it. I don't want to repair usb drives like chkdsk I just want to know if anything is wrong with file system. – Nima Aghayan Nov 28 '22 at 04:38