Search found 3 matches

by jorgeespinoza
Fri Feb 15, 2019 8:47 am
Forum: General Discussion
Topic: nvs_flash_init retry?
Replies: 4
Views: 5922

Re: nvs_flash_init retry?

I created a ticket about adding the retry in the ESP-IDF template repository on GitHub. Is there any interest in me creating a pull request?

https://github.com/espressif/esp-idf-template/issues/11

Thanks!!
by jorgeespinoza
Wed Feb 13, 2019 10:49 pm
Forum: General Discussion
Topic: nvs_flash_init retry?
Replies: 4
Views: 5922

Re: nvs_flash_init retry?

I saw in the commit history of esp-idf/examples/wifi/wps/main/wps.c that a second return code check was added. This makes me wonder how to make the check more future proof in case more return codes need to be checked in the future. Would it be more robust and future proof if the retry was written as...
by jorgeespinoza
Wed Feb 13, 2019 9:30 pm
Forum: General Discussion
Topic: nvs_flash_init retry?
Replies: 4
Views: 5922

nvs_flash_init retry?

Hi, In the example esp-idf/examples/wifi/wps/main/wps.c , I see there is a retry if `nvs_flash_init` returns specific failure codes. esp_err_t ret = nvs_flash_init(); if (ret == ESP_ERR_NVS_NO_FREE_PAGES || ret == ESP_ERR_NVS_NEW_VERSION_FOUND) { ESP_ERROR_CHECK(nvs_flash_erase()); ret = nvs_flash_i...