nvs failed to open from specified partition

ahmadmansoori
Posts: 2
Joined: Sat Sep 24, 2022 10:31 am

nvs failed to open from specified partition

Postby ahmadmansoori » Mon Oct 10, 2022 11:24 am

hi, I have the following partition table on my board:

## Label Usage Type ST Offset Length
0 nvs WiFi data 01 02 00010000 00004000
1 otadata OTA data 01 00 00014000 00002000
2 phy_init RF data 01 01 00016000 00001000
3 ota_0 OTA app 00 10 00020000 00100000
4 ota_1 OTA app 00 11 00120000 00100000
5 nvs_key NVS keys 01 04 00220000 00001000
6 nvs_cirq WiFi data 01 02 00221000 001db000

when i try to open the `nvs_cirq` in the following code, i get the :
ESP_ERR_NVS_PART_NOT_FOUND
the code is as below:
  1.   nvs_handle_t handle;
  2.   esp_err_t err = nvs_open_from_partition("nvs_cirq", "cir_qd", NVS_READWRITE, &handle);
  3.   if (err != ESP_OK) {
  4.     ESP_LOGW(TAG, "Error (%s) opening NVS handle !\n", esp_err_to_name(err));
  5.   }
i can work with the default nvs partition without a problem, so what is the problem here, what is it that I am doing wrong?

martins
Posts: 50
Joined: Tue Aug 24, 2021 8:58 am

Re: nvs failed to open from specified partition

Postby martins » Tue Oct 11, 2022 12:01 pm

Hi, do you initialize the partition before you start working with it?

Code: Select all

err = nvs_flash_init_partition("nvs_cirq");

Who is online

Users browsing this forum: No registered users and 60 guests