Espressif Systems ESP Faq page 127

Table of Contents

Advertisement

Chapter 4. Software framework
Note: The address to be flashed in step 2 must be the corresponding partition address in the partition table where
FatFs is mounted, and the image created must be the same size as the one set in the partition table. Please remember to
go to menuconfig and set Component config -> Wear Levelling -> Wear Levelling library
sector size to 512, or the mounting would fail.
What are the differences between the two file systems, FatFs and SPIFFS, and how do we choose?
Please
refer
solution/blob/master/docs/en/storage/file_system.rst>.
What is the maximum size supported by FatFs?
Due to the limitations of the Windows system, FatFs is currently generally only available on storage
devices up to 32 GB. Storage devices larger than 32 GB use other file systems, such as exFAT.
I cannot open the files with long names when I use the FAT file system. How can I fix this issue?
You can change the configuration in menuconfig > Component config > FAT Filesystem
support > Long filename support by selecting the option Long filename buffer in
heap or Long filename buffer on stack. Then you can update the maximum lengh in
Component config > FAT Filesystem support > Max long filename length.
When I used the ext_flash_fatfs example to test, I encountered an error vfs_fat_spiflash :f_mks
failed(14),config:Failed to mount FATFS(ESP_FAIL) if I set the fatffs partition to less than
512 KB. How can I solve it?
• A FAT partition has 128 sectors at the minimum, so the minimum size of the file system should be
128*4+4*4=528 KB. The extra four sectors are used for wear leveling information. As a result, the size
of the fatffs partition must not be less than 528 KB.
4.8.2 Non-Volatile Storage (NVS)
If data needs to be stored or updated to flash every minute, can ESP32 NVS meet this requirement?
According to
NVS
Specifications, NVS uses two main entities in its operation: pages and entries. Log-
ical page corresponds to one physical sector of flash memory. For now, we assume that flash sector
is 4096 bytes and each page can contain 126 entries (32 bytes for one entry), with the left spaces for
page header (32 bytes) and entry state bitmap (32 bytes). Typical flash lifetime is 100 k erase cycles.
Assuming that the device is expected to run for 10 years, and the data size written to flash is 4 bytes
per minute with flash encryption disabled, then the number of flash write operation can be calculated as:
60×24×365×10=5256000. In this way, no more than 42 k of erase cycles (5256000/126) will be caused
Espressif Systems
to
File
System
110
Submit Document Feedback
<https://github.com/espressif/esp-iot-
Release master

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the ESP and is the answer not in the manual?

This manual is also suitable for:

Esp32Esp8266Esp32-s2Esp32-c3Esp32-s3

Table of Contents