Page 1 of 1

FatFS vs SPIFFS vs NVS

Posted: Thu Nov 16, 2023 10:08 am
by Piramma
Hello, I am trying to have a partition to store large files (upto 600K) and overall partition size allocated can be 1.5-2MB.
So, number of files is less, size will be few 100 KBs.

While NVS has encryption support, the max size of blob that can be stored is limited to 500K as per link https://docs.espressif.com/projects/esp ... and-values

What will be the max file size supported by Spiffs and does any sort of in-built encryption supported for Spiffs by ESP-IDF?

What will be the max file size supported by FatFS and does any sort of in-built encryption supported for FatFS by ESP-IDF?

Re: FatFS vs SPIFFS vs NVS

Posted: Fri Nov 17, 2023 6:40 pm
by MicroController

Re: FatFS vs SPIFFS vs NVS

Posted: Sun Nov 19, 2023 5:43 am
by Piramma
As I see, encryption is not supported in spiffs. What is the max file size supported?

Re: FatFS vs SPIFFS vs NVS

Posted: Mon Nov 20, 2023 11:36 am
by pacucha42
Hi @Piramma,
please, use FatFS for storing large files. The theoretical file size maximum would be 4GB (see http://elm-chan.org/fsw/ff/doc/appnote.html, section Limits), ie you can use whole partition space for one file.
FatFS also works over encrypted partitions

Re: FatFS vs SPIFFS vs NVS

Posted: Mon Nov 20, 2023 11:41 am
by Piramma
Hi @pacucha42,
Thanks for the info. Do you know if ESP32 has the option to encrypt only FatFS partition, without enabling complete flash encryption?

Re: FatFS vs SPIFFS vs NVS

Posted: Tue Nov 28, 2023 4:43 pm
by ESP_adokitkat
Hi @Piramma,

you have to enable flash encryption and then add "encrypted" flag to the desired partition in the partition table csv file. However when flash encryption is enabled, app type partition (e.g. factory) will be automatically encrypted as well. See https://docs.espressif.com/projects/esp ... ption.html