Page 1 of 1

I'm writing to NVS without commiting the changes and works fine. Why?

Posted: Thu Jan 05, 2023 7:08 pm
by chucrut
I use nvs_set_i32(...) and then nvs_get_i32(...) and the result is always correct.
I'm not using nvs_commit()

Suppose the data is gone after a power cycle.
Where is the data being stored then?
Because the data is being stored somewhere
Many thanks for your help!

Re: I'm writing to NVS without commiting the changes and works fine. Why?

Posted: Fri Jan 06, 2023 1:14 am
by ESP_Sprite
It's cached in RAM, in all likelihood. It's not guaranteed the writes make it to flash until you call nvs_commit().

Re: I'm writing to NVS without commiting the changes and works fine. Why?

Posted: Tue Jan 10, 2023 12:25 am
by mbratch
chucrut wrote:
Thu Jan 05, 2023 7:08 pm
Suppose the data is gone after a power cycle.
Where is the data being stored then?
Volatile memory