power_save例程中的DFS部分在ESP32S2上运行异常

damibear
Posts: 4
Joined: Thu Jul 29, 2021 2:50 am

power_save例程中的DFS部分在ESP32S2上运行异常

Postby damibear » Mon Sep 13, 2021 10:36 am

【环境】idf版本4.3,VSCode idf插件。
【问题】我在尝试idf中的power_save例程,我仅仅在menuconfig中修改了SSID和password以及WiFi listen interval设置为1,烧录到ESP32S2-MINI-1中运行一段时间后会出现如下错误,并且重启数次。同样的代码,放到ESP32-wroom上就没有问题。
并且我尝试过在ESP32S2上取消Support for power management选项中就不会出现此类错误。是因为ESP32S2不支持吗?还是我的S2有问题?
【部分日志】

Code: Select all

I (530) wifi:new:<5,1>, old:<1,0>, ap:<255,255>, sta:<5,1>, prof:1
I (530) wifi:state: init -> auth (b0)
I (530) wifi:state: auth -> assoc (0)
I (530) wifi:state: assoc -> run (10)
W (540) wifi:<ba-add>idx:0 (ifx:0, 2e:15:e1:25:d2:22), tid:5, ssn:0, winSize:64
W (590) wifi:<ba-add>idx:1 (ifx:0, 2e:15:e1:25:d2:22), tid:0, ssn:2, winSize:64
I (590) wifi:connected with 109-2.4G, aid = 1, channel 5, 40U, bssid = 2e:15:e1:25:d2:22
I (590) wifi:security: WPA2-PSK, phy: bgn, rssi: -51
I (590) wifi:pm start, type: 1

I (610) wifi:AP's beacon interval = 102400 us, DTIM period = 1
I (1390) esp_netif_handlers: sta ip: 192.168.123.100, mask: 255.255.255.0, gw: 192.168.123.1
I (1390) power_save: got ip: 192.168.123.100

abort() was called at PC 0x40024853 on core 0
0x40024853: lock_acquire_generic at E:/Espressif/esp-idf/components/newlib/locks.c:138


Backtrace:0x4002b70f:0x3ffd3050 0x4002c32d:0x3ffd3070 0x4003316a:0x3ffd3090 0x40024853:0x3ffd3100 0x4002499d:0x3ffd3130 0x4001a245:0x3ffd3150 0x40000baa:0x3ffd3170 0x40000a65:0x3ffd3220 0x4001a428:0x3ffd3270 0x4002daa1:0x3ffd32a0 0x40024de9:0x3ffd32c0 0x4002d8c2:0x3ffd32e0 0x4002f1ad:0x3ffd3300
0x4002b70f: panic_abort at E:/Espressif/esp-idf/components/esp_system/panic.c:356

0x4002c32d: esp_system_abort at E:/Espressif/esp-idf/components/esp_system/system_api.c:112

0x4003316a: abort at E:/Espressif/esp-idf/components/newlib/abort.c:46

0x40024853: lock_acquire_generic at E:/Espressif/esp-idf/components/newlib/locks.c:138

0x4002499d: _lock_acquire_recursive at E:/Espressif/esp-idf/components/newlib/locks.c:166

0x4002daa1: vTaskStepTick at E:/Espressif/esp-idf/components/freertos/tasks.c:2855 (discriminator 1)

0x40024de9: vApplicationSleep at E:/Espressif/esp-idf/components/esp_pm/pm_impl.c:647

0x4002d8c2: prvIdleTask at E:/Espressif/esp-idf/components/freertos/tasks.c:3882

0x4002f1ad: vPortTaskWrapper at E:/Espressif/esp-idf/components/freertos/port/xtensa/port.c:168



ELF file SHA256: 8a2caa1c0a5cc90d

Rebooting...
ESP-ROM:esp32s2-rc4-20191025
Build:Oct 25 2019
rst:0xc (RTC_SW_CPU_RST),boot:0xb (SPI_FAST_FLASH_BOOT)
Saved PC:0x400241b0
0x400241b0: esp_restart_noos at E:/Espressif/esp-idf/components/esp32s2/system_api_esp32s2.c:109 (discriminator 1)

SPIWP:0xee
mode:DIO, clock div:1
load:0x3ffe6100,len:0x1800
load:0x4004c000,len:0x9e8
load:0x40050000,len:0x2b70
SHA-256 comparison failed:
Calculated: ac45cfcb2454d7e8d7c849d8aa0d37e69fb199f50323370616c52a4d38e094c9
Expected: 922e3db13a75acd3c1eca495d3ae055e9c7cd03921b3a185ffb2add79d9f9e69
Attempting to boot anyway...
entry 0x4004c1ec
I (42) boot: ESP-IDF v4.3 2nd stage bootloader
I (42) boot: compile time 17:14:10
I (42) boot: chip revision: 0
I (44) boot.esp32s2: SPI Speed      : 80MHz
I (49) boot.esp32s2: SPI Mode       : DIO
I (54) boot.esp32s2: SPI Flash Size : 4MB
I (59) boot: Enabling RNG early entropy source...
I (64) boot: Partition Table:
I (68) boot: ## Label            Usage          Type ST Offset   Length
I (75) boot:  0 nvs              WiFi data        01 02 00009000 00006000
I (82) boot:  1 phy_init         RF data          01 01 0000f000 00001000
I (90) boot:  2 factory          factory app      00 00 00010000 00100000
I (97) boot: End of partition table
I (101) esp_image: segment 0: paddr=00010020 vaddr=3f000020 size=16fa0h ( 94112) map
I (130) esp_image: segment 1: paddr=00026fc8 vaddr=3ffc8bf0 size=03ed0h ( 16080) load
I (134) esp_image: segment 2: paddr=0002aea0 vaddr=40022000 size=05178h ( 20856) load
I (142) esp_image: segment 3: paddr=00030020 vaddr=40080020 size=6c354h (443220) map
I (240) esp_image: segment 4: paddr=0009c37c vaddr=40027178 size=11a6ch ( 72300) load
I (259) esp_image: segment 5: paddr=000addf0 vaddr=50000000 size=00010h (    16) load
I (272) boot: Loaded app from partition at offset 0x10000
I (272) boot: Disabling RNG early entropy source...
I (283) cache: Instruction cache        : size 8KB, 4Ways, cache line size 32Byte
I (283) cpu_start: Pro cpu up.
I (297) cpu_start: Pro cpu start user code
I (297) cpu_start: cpu freq: 160000000
I (297) cpu_start: Application information:
I (302) cpu_start: Project name:     power_save
I (307) cpu_start: App version:      1
I (311) cpu_start: Compile time:     Sep 13 2021 18:14:44
I (318) cpu_start: ELF file SHA256:  8a2caa1c0a5cc90d...
I (324) cpu_start: ESP-IDF:          v4.3
I (328) heap_init: Initializing. RAM available for dynamic allocation:
I (335) heap_init: At 3FF9E000 len 00002000 (8 KiB): RTCRAM
I (342) heap_init: At 3FFD11E8 len 0002AE18 (171 KiB): DRAM
I (348) heap_init: At 3FFFC000 len 00003A10 (14 KiB): DRAM
I (354) spi_flash: detected chip: generic
I (359) spi_flash: flash io: dio
I (374) sleep: Configure to isolate all GPIO pins in sleep state
I (375) cpu_start: Starting scheduler on PRO CPU.
I (382) pm: Frequency switching config: CPU_MAX: 80, APB_MAX: 80, APB_MIN: 10, Light sleep: ENABLED
I (382) sleep: Enable automatic switching of GPIO sleep configuration
I (402) wifi:wifi driver task: 3ffd8cfc, prio:23, stack:6656, core=0
I (402) system_api: Base MAC address is not set
I (402) system_api: read default base MAC address from EFUSE
I (412) wifi:wifi firmware version: c7d0450
I (412) wifi:wifi certification version: v7.0
I (412) wifi:config NVS flash: enabled
I (412) wifi:config nano formating: disabled
I (412) wifi:Init data frame dynamic rx buffer num: 32
I (412) wifi:Init management frame dynamic rx buffer num: 32
I (412) wifi:Init management short buffer num: 32
I (422) wifi:Init dynamic tx buffer num: 32
I (422) wifi:Init static rx buffer size: 1600
I (422) wifi:Init static rx buffer num: 10
I (422) wifi:Init dynamic rx buffer num: 32
I (432) wifi_init: rx ba win: 6
I (432) wifi_init: tcpip mbox: 32
I (432) wifi_init: udp mbox: 6
I (432) wifi_init: tcp mbox: 6
I (432) wifi_init: tcp tx win: 5744
I (432) wifi_init: tcp rx win: 5744
I (442) wifi_init: tcp mss: 1440
I (442) wifi_init: WiFi IRAM OP enabled
I (442) wifi_init: WiFi RX IRAM OP enabled
I (442) wifi_init: WiFi SLP IRAM OP enabled
I (452) phy_init: phy_version 1800,e7ef680,Apr 13 2021,11:45:08
I (522) wifi:mode : sta (7c:df:a1:97:42:10)
I (522) wifi:enable tsf
I (522) power_save: esp_wifi_set_ps().
I (522) wifi:Set ps type: 1

I (532) wifi:new:<5,1>, old:<1,0>, ap:<255,255>, sta:<5,1>, prof:1
I (532) wifi:state: init -> auth (b0)
I (532) wifi:state: auth -> assoc (0)
I (532) wifi:state: assoc -> run (10)
W (532) wifi:<ba-add>idx:0 (ifx:0, 2e:15:e1:25:d2:22), tid:5, ssn:0, winSize:64
W (592) wifi:<ba-add>idx:1 (ifx:0, 2e:15:e1:25:d2:22), tid:0, ssn:2, winSize:64
I (592) wifi:connected with 109-2.4G, aid = 1, channel 5, 40U, bssid = 2e:15:e1:25:d2:22
I (592) wifi:security: WPA2-PSK, phy: bgn, rssi: -52
I (592) wifi:pm start, type: 1

I (592) wifi:AP's beacon interval = 102400 us, DTIM period = 1
W (632) rtc_clk: invalid RTC_XTAL_FREQ_REG value: 0x00000000

abort() was called at PC 0x40024853 on core 0
0x40024853: lock_acquire_generic at E:/Espressif/esp-idf/components/newlib/locks.c:138


Backtrace:0x4002b70f:0x3ffd3050 0x4002c32d:0x3ffd3070 0x4003316a:0x3ffd3090 0x40024853:0x3ffd3100 0x4002499d:0x3ffd3130 0x4001a245:0x3ffd3150 0x40000baa:0x3ffd3170 0x40000a65:0x3ffd3220 0x4001a428:0x3ffd3270 0x4002daa1:0x3ffd32a0 0x40024de9:0x3ffd32c0 0x4002d8c2:0x3ffd32e0 0x4002f1ad:0x3ffd3300
0x4002b70f: panic_abort at E:/Espressif/esp-idf/components/esp_system/panic.c:356

0x4002c32d: esp_system_abort at E:/Espressif/esp-idf/components/esp_system/system_api.c:112

0x4003316a: abort at E:/Espressif/esp-idf/components/newlib/abort.c:46

0x40024853: lock_acquire_generic at E:/Espressif/esp-idf/components/newlib/locks.c:138

0x4002499d: _lock_acquire_recursive at E:/Espressif/esp-idf/components/newlib/locks.c:166

0x4002daa1: vTaskStepTick at E:/Espressif/esp-idf/components/freertos/tasks.c:2855 (discriminator 1)

0x40024de9: vApplicationSleep at E:/Espressif/esp-idf/components/esp_pm/pm_impl.c:647

0x4002d8c2: prvIdleTask at E:/Espressif/esp-idf/components/freertos/tasks.c:3882

0x4002f1ad: vPortTaskWrapper at E:/Espressif/esp-idf/components/freertos/port/xtensa/port.c:168



ELF file SHA256: 8a2caa1c0a5cc90d

Rebooting...
ESP-ROM:esp32s2-rc4-20191025
Build:Oct 25 2019
rst:0xc (RTC_SW_CPU_RST),boot:0xb (SPI_FAST_FLASH_BOOT)
Saved PC:0x400241b0
0x400241b0: esp_restart_noos at E:/Espressif/esp-idf/components/esp32s2/system_api_esp32s2.c:109 (discriminator 1)

SPIWP:0xee
mode:DIO, clock div:1
load:0x3ffe6100,len:0x1800
load:0x4004c000,len:0x9e8
load:0x40050000,len:0x2b70
SHA-256 comparison failed:
Calculated: ac45cfcb2454d7e8d7c849d8aa0d37e69fb199f50323370616c52a4d38e094c9
Expected: 922e3db13a75acd3c1eca495d3ae055e9c7cd03921b3a185ffb2add79d9f9e69
Attempting to boot anyway...
entry 0x4004c1ec
I (42) boot: ESP-IDF v4.3 2nd stage bootloader
I (42) boot: compile time 17:14:10
I (42) boot: chip revision: 0
I (44) boot.esp32s2: SPI Speed      : 80MHz
I (49) boot.esp32s2: SPI Mode       : DIO
I (54) boot.esp32s2: SPI Flash Size : 4MB
I (59) boot: Enabling RNG early entropy source...
I (64) boot: Partition Table:
I (68) boot: ## Label            Usage          Type ST Offset   Length
I (75) boot:  0 nvs              WiFi data        01 02 00009000 00006000
I (82) boot:  1 phy_init         RF data          01 01 0000f000 00001000
I (90) boot:  2 factory          factory app      00 00 00010000 00100000
I (97) boot: End of partition table
I (101) esp_image: segment 0: paddr=00010020 vaddr=3f000020 size=16fa0h ( 94112) map
I (130) esp_image: segment 1: paddr=00026fc8 vaddr=3ffc8bf0 size=03ed0h ( 16080) load
I (134) esp_image: segment 2: paddr=0002aea0 vaddr=40022000 size=05178h ( 20856) load
I (142) esp_image: segment 3: paddr=00030020 vaddr=40080020 size=6c354h (443220) map
I (240) esp_image: segment 4: paddr=0009c37c vaddr=40027178 size=11a6ch ( 72300) load
I (259) esp_image: segment 5: paddr=000addf0 vaddr=50000000 size=00010h (    16) load
I (272) boot: Loaded app from partition at offset 0x10000
I (272) boot: Disabling RNG early entropy source...
I (283) cache: Instruction cache        : size 8KB, 4Ways, cache line size 32Byte
I (283) cpu_start: Pro cpu up.
I (297) cpu_start: Pro cpu start user code
I (297) cpu_start: cpu freq: 160000000
I (297) cpu_start: Application information:
I (302) cpu_start: Project name:     power_save
I (307) cpu_start: App version:      1
I (311) cpu_start: Compile time:     Sep 13 2021 18:14:44
I (318) cpu_start: ELF file SHA256:  8a2caa1c0a5cc90d...
I (324) cpu_start: ESP-IDF:          v4.3
I (328) heap_init: Initializing. RAM available for dynamic allocation:
I (335) heap_init: At 3FF9E000 len 00002000 (8 KiB): RTCRAM
I (342) heap_init: At 3FFD11E8 len 0002AE18 (171 KiB): DRAM
I (348) heap_init: At 3FFFC000 len 00003A10 (14 KiB): DRAM
I (354) spi_flash: detected chip: generic
I (359) spi_flash: flash io: dio
I (374) sleep: Configure to isolate all GPIO pins in sleep state
I (375) cpu_start: Starting scheduler on PRO CPU.
I (382) pm: Frequency switching config: CPU_MAX: 80, APB_MAX: 80, APB_MIN: 10, Light sleep: ENABLED
I (382) sleep: Enable automatic switching of GPIO sleep configuration
I (402) wifi:wifi driver task: 3ffd8cfc, prio:23, stack:6656, core=0
I (402) system_api: Base MAC address is not set
I (402) system_api: read default base MAC address from EFUSE
I (412) wifi:wifi firmware version: c7d0450
I (412) wifi:wifi certification version: v7.0
I (412) wifi:config NVS flash: enabled
I (412) wifi:config nano formating: disabled
I (412) wifi:Init data frame dynamic rx buffer num: 32
I (412) wifi:Init management frame dynamic rx buffer num: 32
I (412) wifi:Init management short buffer num: 32
I (422) wifi:Init dynamic tx buffer num: 32
I (422) wifi:Init static rx buffer size: 1600
I (422) wifi:Init static rx buffer num: 10
I (422) wifi:Init dynamic rx buffer num: 32
I (432) wifi_init: rx ba win: 6
I (432) wifi_init: tcpip mbox: 32
I (432) wifi_init: udp mbox: 6
I (432) wifi_init: tcp mbox: 6
I (432) wifi_init: tcp tx win: 5744
I (432) wifi_init: tcp rx win: 5744
I (442) wifi_init: tcp mss: 1440
I (442) wifi_init: WiFi IRAM OP enabled
I (442) wifi_init: WiFi RX IRAM OP enabled
I (442) wifi_init: WiFi SLP IRAM OP enabled
I (452) phy_init: phy_version 1800,e7ef680,Apr 13 2021,11:45:08
I (522) wifi:mode : sta (7c:df:a1:97:42:10)
I (522) wifi:enable tsf
I (522) power_save: esp_wifi_set_ps().
I (532) wifi:Set ps type: 1

I (532) wifi:new:<5,1>, old:<1,0>, ap:<255,255>, sta:<5,1>, prof:1
I (532) wifi:state: init -> auth (b0)
I (532) wifi:state: auth -> assoc (0)
I (532) wifi:state: assoc -> run (10)
W (542) wifi:<ba-add>idx:0 (ifx:0, 2e:15:e1:25:d2:22), tid:5, ssn:0, winSize:64
W (592) wifi:<ba-add>idx:1 (ifx:0, 2e:15:e1:25:d2:22), tid:0, ssn:2, winSize:64
I (592) wifi:connected with 109-2.4G, aid = 1, channel 5, 40U, bssid = 2e:15:e1:25:d2:22
I (592) wifi:security: WPA2-PSK, phy: bgn, rssi: -52
I (592) wifi:pm start, type: 1

I (602) wifi:AP's beacon interval = 102400 us, DTIM period = 1
W (632) rtc_clk: invalid RTC_XTAL_FREQ_REG value: 0x000000ESP-ROM:esp32s2-rc4-20191025
Build:Oct 25 2019
rst:0x10 (RTCWDT_RTC_RST),boot:0xb (SPI_FAST_FLASH_BOOT)
SPIWP:0xee
mode:DIO, clock div:1
load:0x3ffe6100,len:0x1800
load:0x4004c000,len:0x9e8
load:0x40050000,len:0x2b70
SHA-256 comparison failed:
Calculated: ac45cfcb2454d7e8d7c849d8aa0d37e69fb199f50323370616c52a4d38e094c9
Expected: 922e3db13a75acd3c1eca495d3ae055e9c7cd03921b3a185ffb2add79d9f9e69
Attempting to boot anyway...
entry 0x4004c1ec

damibear
Posts: 4
Joined: Thu Jul 29, 2021 2:50 am

Re: power_save例程中的DFS部分在ESP32S2上运行异常

Postby damibear » Sun Sep 19, 2021 3:34 am

在menuconfig里把RTC的时钟源从Internal 90kHz RC oscillator改为Internal 8MHz oscillator, divided by 256 (~32kHz)能够消除这个错误

Who is online

Users browsing this forum: No registered users and 8 guests