Merge branch 'feature/nvs_version_check' into 'master'
nvs_flash: Version compatibility check for nvs storage See merge request idf/esp-idf!2855
This commit is contained in:
@@ -469,7 +469,7 @@ void app_main()
|
||||
|
||||
// Initialize NVS.
|
||||
ret = nvs_flash_init();
|
||||
if (ret == ESP_ERR_NVS_NO_FREE_PAGES) {
|
||||
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();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user