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.
Code: Select all
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_init();
}
ESP_ERROR_CHECK( ret );
Code: Select all
ESP_ERROR_CHECK(nvs_flash_init());
Thanks!!
Jorge