I tested my ESP32 with basic WiFi samples and everything was allright. I then moved on and started playing with NVS to store some info which was working great too. Problem is I think I managed to break/corrupt something on the ESP32. When I flash another of those WiFi basic samples, e.g. this one:
Code: Select all
void app_main(void)
{
nvs_flash_init();
tcpip_adapter_init();
ESP_ERROR_CHECK( esp_event_loop_init(event_handler, NULL) );
wifi_init_config_t cfg = WIFI_INIT_CONFIG_DEFAULT();
ESP_ERROR_CHECK( esp_wifi_init(&cfg) );
ESP_ERROR_CHECK( esp_wifi_set_storage(WIFI_STORAGE_RAM) );
ESP_ERROR_CHECK( esp_wifi_set_mode(WIFI_MODE_STA) );
wifi_config_t sta_config = {
.sta = {
.ssid = "********",
.password = "*******",
.bssid_set = 0
}
};
ESP_ERROR_CHECK( esp_wifi_set_config(WIFI_IF_STA, &sta_config) );
ESP_ERROR_CHECK( esp_wifi_start() );
ESP_ERROR_CHECK( esp_wifi_connect() );
gpio_set_direction(GPIO_NUM_4, GPIO_MODE_OUTPUT);
int level = 0;
while (1) {
gpio_set_level(GPIO_NUM_4, level);
level = !level;
vTaskDelay(2000 / portTICK_PERIOD_MS);
}
}
Code: Select all
I (2545) heap_alloc_caps: Region 19: 3FFC0EA8 len 0001F158 tag 0
I (2555) heap_alloc_caps: Region 25: 3FFE8000 len 00018000 tag 1
I (2565) cpu_start: Pro cpu up.
I (2571) cpu_start: Single core mode
I (2577) cpu_start: Pro cpu start user code
I (2602) rtc: rtc v160 Nov 22 2016 19:00:05
I (2613) rtc: XTAL 40M
D (2628) nvs: nvs_flash_init_custom start=9 count=6
D (2694) phy_init: loading PHY init data from application binary
D (2695) nvs: nvs_open phy 0
D (2696) nvs: nvs_get cal_version 4
D (2716) phy_init: load_cal_data_from_nvs_handle: failed to get cal_version (4354)
D (2786) nvs: nvs_close 1
W (2811) cpu_start: failed to load RF calibration data, falling back to full calibration
V (2892) phy_init: register_chipv7_phy, init_data=0x3f400d5c, cal_data=0x3ffc1f14, mode=2
Any ideas? I am lost at the moment.