用按键来重启 esp_restart();导致nvs读取不了数据?还导致了复位?

Moderator: ESP_Bob

fst202130609
Posts: 171
Joined: Thu Sep 23, 2021 10:03 am

用按键来重启 esp_restart();导致nvs读取不了数据?还导致了复位?

Postby fst202130609 » Fri Dec 10, 2021 9:02 am

if((KEY_KEY_READ ==KEY_LONG_PRES)&&(KEY_UP ==0))
{
printf("key2 long down\r\n");
KEY_KEY_READ = NO_KEY_PRES;
ESP_ERROR_CHECK(nvs_flash_erase());
nvs_flash_init();
esp_restart();
}

导致nvs_get_str(wificfg_nvs_handler,"wifi_ssid",wifi_ssid,&len)出现异常错误,abort() was called at PC 0x4038480d on core 0

Who is online

Users browsing this forum: No registered users and 35 guests