FatFS vs SPIFFS vs NVS

Piramma
Posts: 4
Joined: Mon Dec 20, 2021 5:15 pm

FatFS vs SPIFFS vs NVS

Postby Piramma » Thu Nov 16, 2023 10:08 am

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?

MicroController
Posts: 1706
Joined: Mon Oct 17, 2022 7:38 pm
Location: Europe, Germany

Re: FatFS vs SPIFFS vs NVS

Postby MicroController » Fri Nov 17, 2023 6:40 pm


Piramma
Posts: 4
Joined: Mon Dec 20, 2021 5:15 pm

Re: FatFS vs SPIFFS vs NVS

Postby Piramma » Sun Nov 19, 2023 5:43 am

As I see, encryption is not supported in spiffs. What is the max file size supported?

pacucha42
Posts: 31
Joined: Fri Mar 29, 2019 12:56 pm

Re: FatFS vs SPIFFS vs NVS

Postby pacucha42 » Mon Nov 20, 2023 11:36 am

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

Piramma
Posts: 4
Joined: Mon Dec 20, 2021 5:15 pm

Re: FatFS vs SPIFFS vs NVS

Postby Piramma » Mon Nov 20, 2023 11:41 am

Hi @pacucha42,
Thanks for the info. Do you know if ESP32 has the option to encrypt only FatFS partition, without enabling complete flash encryption?

ESP_adokitkat
Posts: 50
Joined: Thu Jun 22, 2023 12:50 pm

Re: FatFS vs SPIFFS vs NVS

Postby ESP_adokitkat » Tue Nov 28, 2023 4:43 pm

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

Who is online

Users browsing this forum: No registered users and 78 guests