Wifi crash NVS related...

ammaree
Posts: 39
Joined: Tue Dec 27, 2016 2:10 am

Wifi crash NVS related...

Postby ammaree » Sat Jan 06, 2018 6:35 pm

I have just encountered a problem never seen before. The wifi code has been stable for a long time on a number of devices.
# Developing on MSYS2 ie Windows,
# IDF 3.0 and submodules updated to the latest, latest BlueDroid fixes was done this afternoon..
# I have tried to set Wifi NVS FLASH in menuconfig both enabled and disabled, both crash but much sooner when ENABLED

The UART console output is below, ANY ideas ?

AMM
With Wifi NVS FLASH = ENABLED
===========================
Guru Meditation Error: Core 0 panic'ed (IllegalInstruction). Exception was unhandled.
Register dump:
PC : 0x4011f48b PS : 0x00060c30 A0 : 0x8011f53d A1 : 0x3ffbd490
0x4011f48b: nvs::Page::alterEntryState(unsigned int, nvs::Page::EntryState) at C:/Dropbox/devs/ws/z-sdk/esp-idf/components/nvs_flash/src/nvs_page.cpp:311

A2 : 0x3ffbf158 A3 : 0x00000000 A4 : 0x00000002 A5 : 0x00000000
A6 : 0x00000000 A7 : 0x00000000 A8 : 0x0000007d A9 : 0x3ffbd450
A10 : 0x00000000 A11 : 0x00009060 A12 : 0x00000000 A13 : 0x00000000
A14 : 0x00000006 A15 : 0x00000001 SSAR : 0x00000020 EXCCAUSE: 0x00000000
EXCVADDR: 0x00000000 LBEG : 0x4000c2e0 LEND : 0x4000c2f6 LCOUNT : 0xffffffff

Backtrace: 0x4011f48b:0x3ffbd490 0x4011f53a:0x3ffbd4c0 0x4011f7fd:0x3ffbd4e0 0x4011eac2:0x3ffbd550 0x4011ec0d:0x3ffbd5b0 0x4011e565:0x3ffbd5f0 0x4011e5fe:0x3ffb
d620 0x4013389b:0x3ffbd640 0x40133913:0xx3ffbd670 0x400da321:0x3ffbd690 0x400d280b:0x3ffbd6c0 0x40153678:0x3ffbd6e0 0x40134dd0:0x3ffbd700 0x40134ebd:0x3ffbd770
0x400f985f:0x3ffbd790 0x400d106e:0x3ffbd7b0
0x4011f48b: nvs::Page::alterEntryState(unsigned int, nvs::Page::EntryState) at C:/Dropbox/devs/ws/z-sdk/esp-idf/components/nvs_flash/src/nvs_page.cpp:311
0x4011f53a: nvs::Page::writeEntry(nvs::Item const&) at C:/Dropbox/devs/ws/z-sdk/esp-idf/components/nvs_flash/src/nvs_page.cpp:311
0x4011f7fd: nvs::Page::writeItem(unsigned char, nvs::ItemType, char const*, void const*, unsigned int) at C:/Dropbox/devs/ws/z-sdk/esp-idf/components/nvs_flash/src/nvs_page.cpp:311
0x4011eac2: nvs::Storage::writeItem(unsigned char, nvs::ItemType, char const*, void const*, unsigned int) at C:/Dropbox/devs/ws/z-sdk/esp-idf/components/nvs_flash/src/nvs_storage.cpp:241
0x4011ec0d: nvs::Storage::createOrOpenNamespace(char const*, bool, unsigned char&) at C:/Dropbox/devs/ws/z-sdk/esp-idf/components/nvs_flash/src/nvs_storage.cpp:241
0x4011e565: nvs_open_from_partition at C:/Dropbox/devs/ws/z-sdk/esp-idf/components/nvs_flash/src/nvs_api.cpp:419
0x4011e5fe: nvs_open at C:/Dropbox/devs/ws/z-sdk/esp-idf/components/nvs_flash/src/nvs_api.cpp:419
0x4013389b: misc_nvs_load at ??:?
0x40133913: misc_nvs_init at ??:?
0x400da321: wifi_init at ??:?
0x400d280b: esp_wifi_init_internal at ??:?
0x40153678: esp_wifi_init at C:/Dropbox/devs/ws/z-sdk/esp-idf/components/esp32/wifi_init.c:38
0x40134dd0: halWL_StartAP at C:/Dropbox/devs/ws/z-components/hal_esp32/hal_network.c:256
0x40134ebd: halWL_Start at C:/Dropbox/devs/ws/z-components/hal_esp32/hal_network.c:256
0x400f985f: app_main at C:/Dropbox/devs/ws/z-appl/iMacs/application.c:142
0x400d106e: main_task at C:/Dropbox/devs/ws/z-sdk/esp-idf/components/esp32/cpu_start.c:449

CPU halted.


With Wifi NVS FLASH = DISABLED
============================
0.262: main wifi I (327) wifi: wifi firmware version: 403db1d
0.2662: main wifi I (327) wifi: config NVS flash: disabled
0.262: main wifi I (328) wifi: config nano formating: disabled
0.262: main wifi I (329) wifi: Init dynamic tx buffer num: 32
0.262: main wifi I (330) wifi: Init data frame dynamic rx buffer num: 32
0.262: main wifi I (330) wifi: Init management frame dynamic rrx buffer num: 32
0.262: main wifi I (331) wifi: wifi driver task: 3ffc2d94, prio:23, stack:4096
0.262: main wifi I (332) wifi: Init static rx buffer num: 10
0.262: main wifi I (333) wifi: Init dynamic rx buffer num: 32
0.262: main wifi I (334) wifi: wifi power manager task: 0x3ffc79ec prio: 21 stack: 2560
0.262: wifi phy_init W (1322) phy_init: failed to load RF calibration data (0x1102), falling back to full calibration

Guru Meditation Error: Core 0 paniic'ed (IllegalInstruction). Exception was unhandled.
Register dump:
PC : 0x4011f48b PS : 0x00060730 A0 : 0x8011f53d A1 : 0x3ffc2a60
0x4011f48b: nvs::Page::alterEntryState(unsigned int, nvs::Page::EntryState) at C:/Dropbox/devs/ws/z-sdk/esp-idf/components/nvs_flash/src/nvs_page.cpp:311

A2 : 0x3ffbf158 A3 : 0x00000000 A4 : 0x00000002 A5 : 0x00000000
A6 : 0x00000000 A7 : 0x00000000 A8 : 0x0000007d A9 : 0x3ffc2a20
A10 : 0x00000000 A11 : 0x00009060 A12 : 00x00000000 A13 : 0x0000052a
A14 : 0x3f4173ac A15 : 0x00001102 SAR : 0x00000020 EXCCAUSE: 0x00000000
EXCVADDR: 0x00000000 LBEG : 0x4000c2e0 LEND : 0x4000c2f6 LCOUNT : 0xffffffff

Backtrace: 0x4011f48b:0x3ffc2a60 0x4011f53a:0x3ffc2a90 0x4011f7fd:0x3ffc2ab0 0x4011eac2:0x3ffc2b20 0x4011ec0d:0x3ffc2b80 0x4011e565:0x3ffc2bc0 0x4011e5fe:0x3ffc2bf0 0x4013324ff:0x3ffc2c10 0x4013331d:0x3ffc2c40 0x400d9e75:0x3ffc2c60 0x400d9ee4:0x3ffc2c90 0x400da6fb:0x3ffc2cc0 0x400ec2ae:0x3ffc2ce0
0x4011f48b: nvs::Page::alterEntryState(unsigned int, nvs::Page::EntryState) at C:/Dropbox/devs/ws/z-sdk/esp-idf/components/nvs_flash/src/nvs_page.cpp:311

0x4011f53a: nvs::Page::writeEntry(nvs::Item const&) at C:/Dropbox/devs/ws/z-sdk/esp-idf/components/nvs_flash/src/nvs_page.cpp:311

0x4011f7fd: nvs::Page::writeItem(unsigned char, nvs::ItemType, char const*, void const*, unsigned int) at C:/Dropbox/devs/ws/z-sdk/esp-idf/components/nvs_flash/src/nvs_page.cpp:311

0x4011eac2: nvs::Storage::writeItem(unsigned char, nvs::ItemType, char const*, void const*, unsigned int) at C:/Dropbox/devs/ws/z-sdk/esp-idf/components/nvs_flash/src/nvs_storage.cpp:241

0x4011ec0d: nvs::Storage::createOrOpenNamespace(char const*, bool, unsigned char&) at C:/Dropbox/devs/ws/z-sdk/esp-idf/components/nvs_flash/src/nvs_storage.cpp:241

0x4011e565: nvs_open_from_partition at C:/Dropbox/devs/ws/z-sdk/esp-idf/components/nvs_flash/src/nvs_api.cpp:419
0x4011e5fe: nvs_open at C:/Dropbox/devs/ws/z-sdk/esp-idf/components/nvs_flash/src/nvs_api.cpp:419
0x4013324f: esp_phy_store_cal_data_to_nvs at C:/Dropbox/devs/ws/z-sdk/esp-idf/components/esp32/phy_init.c:179
0x4013331d: esp_phy_load_cal_and_init at C:/Dropbox/devs/ws/z-sdk/esp-idf/components/esp32/phy_init.c:289
0x400d9e75: wifi_hw_start at ??:?
0x400d9ee4: wifi_start_process at ??:?
0x400da6fb: ieee80211_ioctl_process at ??:?
0x400ec2ae: ppTask at ??:?
CPU halted.

ammaree
Posts: 39
Joined: Tue Dec 27, 2016 2:10 am

Re: Wifi crash NVS related...

Postby ammaree » Sat Jan 06, 2018 7:59 pm

Solved, in case it is of value to someone else..

In make menuconfig - > Component config -> SPI Flash driver -> Enable SPI flash ROM driver patched functions

I had turned this off since reading the help information indicated that it is not required for a standard ESP32-WROOM module.

Seems I was wrong, or maybe the help text ???

Who is online

Users browsing this forum: Dennie and 112 guests