Even wear on flash and storing Data in chucks of 4000

AgentSmithers
Posts: 12
Joined: Fri Jul 02, 2021 12:18 am

Even wear on flash and storing Data in chucks of 4000

Postby AgentSmithers » Sat Jul 09, 2022 4:16 am

Hey everyone,
After reviewing nvs_set_str, it appears that I can store a string up to 4000bytes by appending using a sample like here: http://www.macpczone.co.uk/content/esp3 ... wer-cycles

The my buffer will go over type and I'd like to store it away and 4000b is a lot but from my understanding the wear by using nvs_set_str is automatically handled by the SDK for the longest life correct?

Also, I assume I can store multiple chucks of these 4000b pages just by adjusting the key value.

Thank you for any feed back!

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

Re: Even wear on flash and storing Data in chucks of 4000

Postby ESP_Sprite » Sat Jul 09, 2022 1:22 pm

Yes. However, for proper wear leveling, you want to make the NVS partition a fair bit larger than the maximum size of all the things you're going to store there.

Who is online

Users browsing this forum: Bing [Bot] and 182 guests