Search found 3 matches

by taherrera
Thu Jul 11, 2024 10:28 pm
Forum: ESP-IDF
Topic: [SOLVED] ESP_ERR_NVS_NOT_FOUND from nvs_get_blob() due to nvs_commit() race condition
Replies: 18
Views: 18875

Re: [SOLVED] ESP_ERR_NVS_NOT_FOUND from nvs_get_blob() due to nvs_commit() race condition

This is the function I use to store: int storage_write(uint8_t * tosave, size_t save_size){ nvs_handle_t NvsHandle; const char * save_key = "AGT"; console_printf("[I] storage.c storage_write: Saving \"%s\"\n", save_key); esp_err_t err = nvs_open(STORAGE_NAMESPACE, NVS_READWRITE, &NvsHandle); if (err...
by taherrera
Thu Jul 11, 2024 10:09 pm
Forum: ESP-IDF
Topic: [SOLVED] ESP_ERR_NVS_NOT_FOUND from nvs_get_blob() due to nvs_commit() race condition
Replies: 18
Views: 18875

Re: [SOLVED] ESP_ERR_NVS_NOT_FOUND from nvs_get_blob() due to nvs_commit() race condition

I save in the NVS by doing:

esp_err_t err = nvs_set_blob(Storage, save_key, tosave, save_size);
and immediately after:
err = nvs_commit(Storage);

But I dont call nvs_close
by taherrera
Fri Feb 09, 2024 1:13 am
Forum: ESP-IDF
Topic: [SOLVED] ESP_ERR_NVS_NOT_FOUND from nvs_get_blob() due to nvs_commit() race condition
Replies: 18
Views: 18875

Re: [SOLVED] ESP_ERR_NVS_NOT_FOUND from nvs_get_blob() due to nvs_commit() race condition

Hello, I think I am having this same issue. ESP_ERR_NVS_NOT_FOUND was happening to me because I was calling esp_reset() just after a write to the nvs. I am writing 1064 bytes using nvs_set_blob in a 0x14000 size unencrypted nvs partition with a single blob_key. I tried using CONFIG_SPI_FLASH_VERIFY_...