Esp32S3 : Virtual FileSystem component - CRC mechanism provided with the driver ?

ThomasESP32
Posts: 229
Joined: Thu Jul 14, 2022 5:15 am

Esp32S3 : Virtual FileSystem component - CRC mechanism provided with the driver ?

Postby ThomasESP32 » Tue Jul 04, 2023 9:11 am

Good morning,

working on an Esp32S3 microcontroller, I am using the Virtual FileSystem component in order
to mount different filesystems on the Embedded Flash, on an external SD card.

This enables me to access the files on these filesystems using standard functions f_open, f_read, f_write, f_close.

I would like to know if the driver provides a mechanism that can be used in order to know if a file that has been written
on a filesystem is corrupted or not ?
For example, is there any CRC check mechanism embedded with the driver or something like that ?

The goal would be to write files on the different filesystems and to have the possibility to check periodically if these files (Or memory) have been corrupted or not.

Thank you for your help,
Best regards,

Thomas TRUILHE

ESP_igrr
Posts: 2071
Joined: Tue Dec 01, 2015 8:37 am

Re: Esp32S3 : Virtual FileSystem component - CRC mechanism provided with the driver ?

Postby ESP_igrr » Fri Jul 07, 2023 7:22 pm

Hi Thomas,

No filesystem supported in IDF (FAT, SPIFFS, littlefs) has such a feature. You can probably implement it at application layer by storing the file checksum separately from the file itself.

(NVS library in IDF does automatically check CRC for key-value pairs. However NVS is not accessible via the VFS interface.)

Who is online

Users browsing this forum: bfredo123, Google [Bot] and 78 guests