Page 1 of 1

ESP32-C3FH4 flash partition wear levelling

Posted: Thu Aug 10, 2023 9:52 am
by some_engineer
Hi all,

I have a need to create a separate 4KB flash partition for storing some data. This data is written only once during production flashing, and does not change over the lifetime of the device. I'm aware that there is wear leveling API for FATfs, and probably spiffs type partition also use some sort of wear leveling. But is this the case for a nvs type partition that is never written to? Do I have to make sure I occasionally refresh this data partition to make sure the data is not lost or corrupted? Or is there still some under the hood wear leveling partition that somehow takes care of that ?

Thanks

Re: ESP32-C3FH4 flash partition wear levelling

Posted: Fri Aug 11, 2023 2:08 am
by ESP_Sprite
The normal fault mode for NOR flash (as used in that ESP32 you mention) is generally assumed to be that it 'wears out' in the sense that a sector can only be erased a certain time before it exhibits write errors. If your NVS partition is read-only, it never gets erased, and as such you don't need to do wear-leveling.

Re: ESP32-C3FH4 flash partition wear levelling

Posted: Wed Aug 16, 2023 1:56 pm
by some_engineer
I see, thank you for the answer. Good to know that it is NOR flash, somehow I couldn't not find any documentation on what type of flash is inside the SoC.