WiFi Power Save example crash

jclall
Posts: 2
Joined: Tue Jun 11, 2019 12:29 pm

WiFi Power Save example crash

Postby jclall » Tue Jun 11, 2019 1:50 pm

Hi all,

I'm having big problems making the WiFi Power Save IDF example to work properly.
The problem is that the firmware crashes with a Panic at wakeup.

I've seen quite some posts describing the same kind of issue, most are pretty old.
Some seems to suggest that the issue was fixed, some have no answer.

I've tried various IDF versions v3.2, v3.3, v3.3-beta3, v4.0-dev all leading to the same results.

The example code has only been modified:
- to use my network credentials (I'm using a plain TP-LINK Wireless router)
- to extend the wake-up delay from 2000µs to 10000µs as suggested in some posts and docs.

I'm building the code in Visual Studio using VisualGDB ESP32 plugin (all up to date).

I'm using an ESP-WROOM-32 module on the following board:
https://www.az-delivery.de/products/esp ... oard?ls=de
The WROOM module is labeled:
Z11-161007
FCC ID:2AC7Z-ESPWROOM32

Here is the log:
ets Jun 8 2016 00:22:57

rst:0x1 (POWERON_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0xee
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:2
load:0x3fff0018,len:4
load:0x3fff001c,len:6348
load:0x40078000,len:11308
ho 0 tail 12 room 4
load:0x40080400,len:6680
entry 0x40080760
I (30) boot: ESP-IDF v4.0-dev 2nd stage bootloader
I (30) boot: compile time 14:48:36
I (30) boot: Enabling RNG early entropy source...
I (35) boot: SPI Speed : 40MHz
I (39) boot: SPI Mode : DIO
I (43) boot: SPI Flash Size : 2MB
I (47) boot: Partition Table:
I (51) boot: ## Label Usage Type ST Offset Length
I (58) boot: 0 nvs WiFi data 01 02 00009000 00006000
I (66) boot: 1 phy_init RF data 01 01 0000f000 00001000
I (73) boot: 2 factory factory app 00 00 00010000 00100000
I (81) boot: End of partition table
I (85) esp_image: segment 0: paddr=0x00010020 vaddr=0x3f400020 size=0x18a24 (100900) map
I (129) esp_image: segment 1: paddr=0x00028a4c vaddr=0x3ffb0000 size=0x02dd8 ( 11736) load
I (134) esp_image: segment 2: paddr=0x0002b82c vaddr=0x40080000 size=0x00400 ( 1024) load
I (136) esp_image: segment 3: paddr=0x0002bc34 vaddr=0x40080400 size=0x043dc ( 17372) load
I (152) esp_image: segment 4: paddr=0x00030018 vaddr=0x400d0018 size=0x68648 (427592) map
I (303) esp_image: segment 5: paddr=0x00098668 vaddr=0x400847dc size=0x0c730 ( 50992) load
I (335) boot: Loaded app from partition at offset 0x10000
I (335) boot: Disabling RNG early entropy source...
I (335) cpu_start: Pro cpu up.
I (339) cpu_start: Application information:
I (344) cpu_start: Project name: power_save
I (349) cpu_start: App version: 1
I (353) cpu_start: Compile time: Jun 11 2019 14:48:15
I (359) cpu_start: ELF file SHA256: 076f800df52fc4dc...
I (365) cpu_start: ESP-IDF: v4.0-dev
I (370) cpu_start: Starting app cpu, entry point is 0x400811f8
I (0) cpu_start: App cpu up.
I (381) heap_init: Initializing. RAM available for dynamic allocation:
I (388) heap_init: At 3FFAE6E0 len 00001920 (6 KiB): DRAM
I (394) heap_init: At 3FFB8DB8 len 00027248 (156 KiB): DRAM
I (400) heap_init: At 3FFE0440 len 00003AE0 (14 KiB): D/IRAM
I (406) heap_init: At 3FFE4350 len 0001BCB0 (111 KiB): D/IRAM
I (413) heap_init: At 40090F0C len 0000F0F4 (60 KiB): IRAM
I (419) cpu_start: Pro cpu start user code
I (438) cpu_start: Starting scheduler on PRO CPU.
I (0) cpu_start: Starting scheduler on APP CPU.
I (582) pm_esp32: Frequency switching config: CPU_MAX: 80, APB_MAX: 80, APB_MIN: 10, Light sleep: ENABLED
I (582) wifi: wifi driver task: 3ffc0650, prio:23, stack:3584, core=0
I (582) wifi: wifi firmware version: 53ea8b1
I (592) wifi: config NVS flash: enabled
I (592) wifi: config nano formating: disabled
I (602) system_api: Base MAC address is not set, read default base MAC address from BLK0 of EFUSE
I (612) system_api: Base MAC address is not set, read default base MAC address from BLK0 of EFUSE
I (672) wifi: Init dynamic tx buffer num: 32
I (672) wifi: Init data frame dynamic rx buffer num: 32
I (672) wifi: Init management frame dynamic rx buffer num: 32
I (672) wifi: Init management short buffer num: 32
I (682) wifi: Init static rx buffer size: 1600
I (682) wifi: Init static rx buffer num: 10
I (682) wifi: Init dynamic rx buffer num: 32
I (892) phy: phy_version: 4100, 6fa5e27, Jan 25 2019, 17:02:06, 0, 0
I (892) wifi: mode : sta (3c:71:bf:6a:8a:84)
I (892) power_save: esp_wifi_set_ps().
I (892) power_save: SYSTEM_EVENT_STA_START
I (902) wifi: Set ps type: 1

I (1022) wifi: new:<6,0>, old:<1,0>, ap:<255,255>, sta:<6,0>, prof:1
I (2982) wifi: state: init -> auth (b0)
I (2992) wifi: state: auth -> assoc (0)
I (3002) wifi: state: assoc -> run (10)
I (3022) wifi: connected with TP-LINK_A072, channel 6, bssid = 84:16:f9:e0:a0:72
I (3032) wifi: pm start, type: 1

Guru Meditation Error: Core 1 panic'ed (LoadProhibited). Exception was unhandled.
Core 1 register dump:
PC : 0x400d1f4e PS : 0x00060733 A0 : 0x800824c4 A1 : 0x3ffbbb10
A2 : 0x000074cc A3 : 0x00000000 A4 : 0x00060720 A5 : 0x00000001
A6 : 0x00060720 A7 : 0x00060023 A8 : 0xffffffff A9 : 0x3ffbbaf0
A10 : 0x00285edf A11 : 0x00000000 A12 : 0x00060720 A13 : 0x00000001
A14 : 0x00060723 A15 : 0x00060023 SAR : 0x0000001d EXCCAUSE: 0x0000001c
EXCVADDR: 0x00000017 LBEG : 0x00000000 LEND : 0x00000000 LCOUNT : 0x00000000

ELF file SHA256: 076f800df52fc4dc2f9a696b9faabfe0ffffffffffffffffffffffffffffffff

Backtrace: 0x400d1f4e:0x3ffbbb10 0x400824c1:0x3ffbbb30 0x4008979a:0x3ffbbb50 0x40087c29:0x3ffbbb70

Rebooting...
ets Jun 8 2016 00:22:57

rst:0xc (SW_CPU_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0xee
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:2
load:0x3fff0018,len:4
load:0x3fff001c,len:6348
load:0x40078000,len:11308
ho 0 tail 12 room 4
load:0x40080400,len:6680
entry 0x40080760
I (31) boot: ESP-IDF v4.0-dev 2nd stage bootloader
I (31) boot: compile time 14:48:36
I (31) boot: Enabling RNG early entropy source...
I (36) boot: SPI Speed : 40MHz
I (40) boot: SPI Mode : DIO
I (44) boot: SPI Flash Size : 2MB
I (48) boot: Partition Table:
I (51) boot: ## Label Usage Type ST Offset Length
I (59) boot: 0 nvs WiFi data 01 02 00009000 00006000
I (66) boot: 1 phy_init RF data 01 01 0000f000 00001000
I (74) boot: 2 factory factory app 00 00 00010000 00100000
I (81) boot: End of partition table
I (85) esp_image: segment 0: paddr=0x00010020 vaddr=0x3f400020 size=0x18a24 (100900) map
I (130) esp_image: segment 1: paddr=0x00028a4c vaddr=0x3ffb0000 size=0x02dd8 ( 11736) load
I (134) esp_image: segment 2: paddr=0x0002b82c vaddr=0x40080000 size=0x00400 ( 1024) load
I (137) esp_image: segment 3: paddr=0x0002bc34 vaddr=0x40080400 size=0x043dc ( 17372) load
I (152) esp_image: segment 4: paddr=0x00030018 vaddr=0x400d0018 size=0x68648 (427592) map
I (304) esp_image: segment 5: paddr=0x00098668 vaddr=0x400847dc size=0x0c730 ( 50992) load
I (335) boot: Loaded app from partition at offset 0x10000
I (335) boot: Disabling RNG early entropy source...
I (336) cpu_start: Pro cpu up.
I (339) cpu_start: Application information:
I (344) cpu_start: Project name: power_save
I (349) cpu_start: App version: 1
I (354) cpu_start: Compile time: Jun 11 2019 14:48:15
I (360) cpu_start: ELF file SHA256: 076f800df52fc4dc...
I (366) cpu_start: ESP-IDF: v4.0-dev
I (371) cpu_start: Starting app cpu, entry point is 0x400811f8
I (362) cpu_start: App cpu up.
I (382) heap_init: Initializing. RAM available for dynamic allocation:
I (388) heap_init: At 3FFAE6E0 len 00001920 (6 KiB): DRAM
I (394) heap_init: At 3FFB8DB8 len 00027248 (156 KiB): DRAM
I (401) heap_init: At 3FFE0440 len 00003AE0 (14 KiB): D/IRAM
I (407) heap_init: At 3FFE4350 len 0001BCB0 (111 KiB): D/IRAM
I (413) heap_init: At 40090F0C len 0000F0F4 (60 KiB): IRAM
I (420) cpu_start: Pro cpu start user code
I (439) cpu_start: Starting scheduler on PRO CPU.
I (0) cpu_start: Starting scheduler on APP CPU.
I (580) pm_esp32: Frequency switching config: CPU_MAX: 80, APB_MAX: 80, APB_MIN: 10, Light sleep: ENABLED
I (580) wifi: wifi driver task: 3ffc0650, prio:23, stack:3584, core=0
I (580) wifi: wifi firmware version: 53ea8b1
I (590) wifi: config NVS flash: enabled
I (590) wifi: config nano formating: disabled
I (590) system_api: Base MAC address is not set, read default base MAC address from BLK0 of EFUSE
I (600) system_api: Base MAC address is not set, read default base MAC address from BLK0 of EFUSE
I (660) wifi: Init dynamic tx buffer num: 32
I (660) wifi: Init data frame dynamic rx buffer num: 32
I (660) wifi: Init management frame dynamic rx buffer num: 32
I (670) wifi: Init management short buffer num: 32
I (670) wifi: Init static rx buffer size: 1600
I (680) wifi: Init static rx buffer num: 10
I (680) wifi: Init dynamic rx buffer num: 32
I (840) phy: phy_version: 4100, 6fa5e27, Jan 25 2019, 17:02:06, 0, 0
I (840) wifi: mode : sta (3c:71:bf:6a:8a:84)
I (850) power_save: esp_wifi_set_ps().
I (850) power_save: SYSTEM_EVENT_STA_START
I (850) wifi: Set ps type: 1

I (970) wifi: new:<6,0>, old:<1,0>, ap:<255,255>, sta:<6,0>, prof:1
I (2940) wifi: state: init -> auth (b0)
I (2950) wifi: state: auth -> assoc (0)
I (2950) wifi: state: assoc -> run (10)
I (2980) wifi: connected with TP-LINK_A072, channel 6, bssid = 84:16:f9:e0:a0:72
I (3030) wifi: pm start, type: 1

Guru Meditation Error: Core 0 panic'ed (IllegalInstruction). Exception was unhandled.
Memory dump at 0x401340c8: ffffffff ffffffff ffffffff
Core 0 register dump:
PC : 0x401340cc PS : 0x00060730 A0 : 0x8012be09 A1 : 0x3ffbda50
A2 : 0x3ffb9bf4 A3 : 0x3ffbdaa0 A4 : 0x00000064 A5 : 0x00000101
A6 : 0x3ffb9f0a A7 : 0x00000011 A8 : 0x801340cc A9 : 0x3ffbda10
A10 : 0x00000000 A11 : 0x3ffbdaa0 A12 : 0x3ffbccc8 A13 : 0x00000000
A14 : 0x00000001 A15 : 0x00000000 SAR : 0x00000010 EXCCAUSE: 0x00000000
EXCVADDR: 0x00000000 LBEG : 0x4000c2e0 LEND : 0x4000c2f6 LCOUNT : 0xffffffff

ELF file SHA256: 076f800df52fc4dc2f9a696b9faabfe0393c11988a85220cd2bb06385f530da0

Backtrace: 0x401340cc:0x3ffbda50 0x4012be06:0x3ffbda80 0x401258dc:0x3ffbdaa0 0x40087c29:0x3ffbdad0

Rebooting...
ets Jun 8 2016 00:22:57

rst:0xc (SW_CPU_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0xee
Does anyone have some hints on how to proceed or solve this issue?

Thanks in advance,
Best regards,
JC

ESP_igrr
Posts: 2067
Joined: Tue Dec 01, 2015 8:37 am

Re: WiFi Power Save example crash

Postby ESP_igrr » Tue Jun 11, 2019 3:20 pm

Hi JC,

The issue is related to configuration of the SPI peripheral used to access the flash chip. We have a fix for this in review at the moment.

In the meantime, you should be able to work around the issue by switching to QIO flash mode. This option can be found in menuconfig, under "Serial flasher config", "Flash SPI mode".

jclall
Posts: 2
Joined: Tue Jun 11, 2019 12:29 pm

Re: WiFi Power Save example crash

Postby jclall » Mon Jun 17, 2019 2:10 pm

Hi ESP_igrr,

Thanks a lot.
It solves the issue.

Best regards,
JC

Who is online

Users browsing this forum: No registered users and 301 guests