// Initialize NVS.
esp_err_t err = nvs_flash_init();
if (err == ESP_ERR_NVS_NO_FREE_PAGES || err == ESP_ERR_NVS_NEW_VERSION_FOUND) {
ESP_ERROR_CHECK(nvs_flash_erase());
err = nvs_flash_init();
}
难道是因为这里吗????
断开WiFi之后,为啥nvs会被擦除,并且重新初始化nvs???
Re: 断开WiFi之后,为啥nvs会被擦除,并且重新初始化nvs???
是的,nvs_flash_erase() 就是擦除的命令。
Who is online
Users browsing this forum: No registered users and 98 guests