I've got an application with an ESP32 using BLE to read data which is continuously being advertised while also advertising itself so that a mobile app can connect to it. This is done by having a dedicated task which switches between advertising and scanning. When the mobile app connects to the module, the module stops advertising and starts scanning continuously while the app is still connected.
The issue is that after an indeterminate amount of time, the module experiences a watchdog timeout, with the following error message displayed:
Code: Select all
ASSERT_PARAM(131072 0), in rwble.c at line 235
Guru Meditation Error: Core 0 panic'ed (Interrupt wdt timeout on CPU0)
Core 0 register dump:
PC : 0x4008a639 PS : 0x00060f34 A0 : 0x8008e4f0 A1 : 0x3ffbf0d0
0x4008a639: r_assert_param at ??:?
A2 : 0x00000001 A3 : 0x00000000 A4 : 0x00000000 A5 : 0x60008054
A6 : 0x3ffbdccc A7 : 0x60008050 A8 : 0x8008a639 A9 : 0x3ffbf0b0
A10 : 0x00000004 A11 : 0x00000000 A12 : 0x6000804c A13 : 0xffffffff
A14 : 0x00000000 A15 : 0xfffffffc SAR : 0x00000004 EXCCAUSE: 0x00000005
EXCVADDR: 0x00000000 LBEG : 0x4008a571 LEND : 0x4008a578 LCOUNT : 0x00000000
0x4008a571: r_assert_param at ??:?
0x4008a578: r_assert_param at ??:?
Core 0 was running in ISR context:
EPC1 : 0x4008cf61 EPC2 : 0x00000000 EPC3 : 0x00000000 EPC4 : 0x4008a639
0x4008cf61: r_lld_evt_end_isr at ??:?
0x4008a639: r_assert_param at ??:?
ELF file SHA256: be6ad9722a98d30e33a36882ccbd23da5b0c40ef616ae0e315c14c4304ca4188
Backtrace: 0x4008a639:0x3ffbf0d0 0x4008e4ed:0x3ffbf0f0 0x4008f0db:0x3ffbf110 0x4008866d:0x3ffbf130 0x401ab603:0x3ffbab30 0x400d53b3:0x3ffbab50 0x4009898d:0x3ffbab70 0x40099681:0x3ffbab90
0x4008a639: r_assert_param at ??:?
0x4008e4ed: r_rwble_isr at ??:?
0x4008f0db: r_rwbtdm_isr_wrapper at intc.c:?
0x4008866d: _xt_lowint1 at C:/Users/mpulis/Desktop/Projects/ESP32/IDF3/msys32/home/esp-idf/components/freertos/xtensa_vectors.S:1154
0x401ab603: esp_pm_impl_waiti at C:/Users/mpulis/Desktop/Projects/ESP32/IDF3/msys32/home/esp-idf/components/esp32/pm_esp32.c:493
0x400d53b3: esp_vApplicationIdleHook at C:/Users/mpulis/Desktop/Projects/ESP32/IDF3/msys32/home/esp-idf/components/esp_common/src/freertos_hooks.c:86
0x4009898d: prvIdleTask at C:/Users/mpulis/Desktop/Projects/ESP32/IDF3/msys32/home/esp-idf/components/freertos/tasks.c:3538
0x40099681: vPortTaskWrapper at C:/Users/mpulis/Desktop/Projects/ESP32/IDF3/msys32/home/esp-idf/components/freertos/port.c:435
Core 1 register dump:
PC : 0x4010ec59 PS : 0x00060a34 A0 : 0x80099684 A1 : 0x3fff2d20
0x4010ec59: bleTimeDivisionTask at C:/Users/mpulis/Desktop/Projects/ESP32/IDF3/msys32/home/ASM16xSEv4/main/ble_interface.c:422
A2 : 0x0003dba8 A3 : 0x00000000 A4 : 0x00060023 A5 : 0x3fff1f70
A6 : 0x00000000 A7 : 0x00000000 A8 : 0x00000000 A9 : 0x00000000
A10 : 0x00000001 A11 : 0x3ffcd2f4 A12 : 0x3f4125ec A13 : 0x0000001f
A14 : 0x00000001 A15 : 0x00000005 SAR : 0x00000004 EXCCAUSE: 0x00000005
EXCVADDR: 0x00000000 LBEG : 0x40096210 LEND : 0x4009623e LCOUNT : 0xffffffff
0x40096210: memcpy at /home/jeroen/esp8266/esp32/newlib_xtensa-2.2.0-bin/newlib_xtensa-2.2.0/xtensa-esp32-elf/newlib/libc/machine/xtensa/../../../../.././newlib/libc/machine/xtensa/memcpy.S:168
0x4009623e: memcpy at /home/jeroen/esp8266/esp32/newlib_xtensa-2.2.0-bin/newlib_xtensa-2.2.0/xtensa-esp32-elf/newlib/libc/machine/xtensa/../../../../.././newlib/libc/machine/xtensa/memcpy.S:201
ELF file SHA256: be6ad9722a98d30e33a36882ccbd23da5b0c40ef616ae0e315c14c4304ca4188
Backtrace: 0x4010ec59:0x3fff2d20 0x40099681:0x3fff2d40
0x4010ec59: bleTimeDivisionTask at C:/Users/mpulis/Desktop/Projects/ESP32/IDF3/msys32/home/ASM16xSEv4/main/ble_interface.c:422
0x40099681: vPortTaskWrapper at C:/Users/mpulis/Desktop/Projects/ESP32/IDF3/msys32/home/esp-idf/components/freertos/port.c:435
What could the issue be?