Page 1 of 1

Even wear on flash and storing Data in chucks of 4000

Posted: Sat Jul 09, 2022 4:16 am
by AgentSmithers
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!

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

Posted: Sat Jul 09, 2022 1:22 pm
by ESP_Sprite
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.