ESP32-C3FH4 flash partition wear levelling

some_engineer
Posts: 4
Joined: Thu Apr 27, 2023 10:09 am

ESP32-C3FH4 flash partition wear levelling

Postby some_engineer » Thu Aug 10, 2023 9:52 am

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

ESP_Sprite
Posts: 9739
Joined: Thu Nov 26, 2015 4:08 am

Re: ESP32-C3FH4 flash partition wear levelling

Postby ESP_Sprite » Fri Aug 11, 2023 2:08 am

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.

some_engineer
Posts: 4
Joined: Thu Apr 27, 2023 10:09 am

Re: ESP32-C3FH4 flash partition wear levelling

Postby some_engineer » Wed Aug 16, 2023 1:56 pm

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.

Who is online

Users browsing this forum: Bing [Bot], sirOwlBeak and 98 guests