Espressif Systems ESP Faq page 128

Table of Contents

Advertisement

Chapter 4. Software framework
in NVS, which does not exceed 100 k. Therefore, such operation is supported even without the effects
of multiple sectors. In actual use, usually there will be multiple sectors given to NVS, and the NVS can
distribute erase cycles to different sectors, making the number of erase cycles in each sector necessarily
less than 42 k.
Therefore, the NVS of ESP32 can meet such requirement.
Does NVS have wear levelling function?
Yes, NVS (Non-Volatile Storage) has wear leveling functionality. When storing data in flash memory,
the limited number of writing and erasing operations to the flash will cause some storage blocks to have
shorter service life than others, affecting the overall working life of the memory. To address this issue,
NVS uses an erase-write balancing mechanism implemented internally, rather than the wear_levelling
component in ESP-IDF, to evenly distribute data across the flash memory blocks, ensuring that each
block is used as much as possible to extend the overall working life of the flash memory.
Can NVS sectors be corrupted by accidental power loss during writing?
No, NVS is designed to resist accidental power loss, so it will not be damaged.
Will the configured Wi-Fi SSID and PASSWORD disappear after the ESP series development board is pow-
ered on again and need to be reconfigured?
• It will be stored in NVS by default and will not disappear due to power failure. You can also set it through
esp_wifi_set_storage(), which can be divided into two situations:
– If you want to save the Wi-Fi SSID and PSAAWORD when powered off, you can store the Wi-Fi infor-
mation in flash by calling esp_wifi_set_storage(WIFI_STORAGE_FLASH).
– If you want to achieve the operation of not saving the Wi-Fi SSID and PASSWORD when powered off,
you can call esp_wifi_set_storage(WIFI_STORAGE_RAM) to store the Wi-Fi information in
RAM.
How to realize that stored user data can be saved after power off, not erased by OTA, and can be re-written
or modified?
• Non-volatile storage can meet the above requirements, and only eFuse and flash can be used to store the data.
Since the data should be modifiable, only flash is suitable. It is recommended to use NVS or MFG mechanism.
For details, please refer to
Manufacturing Utility
NVS Partition Generator Utility
4.8.3 PSRAM
Espressif Systems
111
Submit Document Feedback
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