ESP32 restarting while running a task

While I’m running this specific task, sometimes it works fine but sometimes it reboots continuously.

Guru Meditation Error: Core  0 panic'ed (Interrupt wdt timeout on CPU0). 
Core  0 register dump:
PC      : 0x4008b56c  PS      : 0x00060634  A0      : 0x8008b2e5  A1      : 0x3ffb5da0  
0x4008b56c: block_data_size at /home/pcblr6004/AWS/standalone/aws_fild/build/../freertos/vendors/espressif/esp-idf/components/heap/multi_heap.c:163
A2      : 0x00001960  A3      : 0x3ffbfb94  A4      : 0xfffffffc  A5      : 0x3ffb8040  
A6      : 0x40083998  A7      : 0x3ffd2bd8  A8      : 0x00001964  A9      : 0x3ffb8040  
0x40083998: esp_phy_common_clock_enable at /home/pcblr6004/AWS/standalone/aws_fild/build/../freertos/vendors/espressif/esp-idf/components/esp_wifi/src/phy_init.c:193
A10     : 0x3ffb5fbc  A11     : 0x00060023  A12     : 0x00060023  A13     : 0x3ffbfea8  
A14     : 0x00000001  A15     : 0x3ffb6f14  SAR     : 0x00000018  EXCCAUSE: 0x00000005  
EXCVADDR: 0x00000000  LBEG    : 0x4000c2e0  LEND    : 0x4000c2f6  LCOUNT  : 0xffffffff  
Backtrace:0x4008b569:0x3ffb5da0 0x4008b2e2:0x3ffb5dc0 0x40081943:0x3ffb5df0 0x40081970:0x3ffb5e10 0x4008e989:0x3ffb5e30 0x400839bd:0x3ffb5e50 0x4012fcbd:0x3ffb5e70 0x40139929:0x3ffb5ea0 0x400903d1:0x3ffb5f20
0x4008b569: block_data_size at /home/pcblr6004/AWS/standalone/aws_fild/build/../freertos/vendors/espressif/esp-idf/components/heap/multi_heap.c:162
0x4008b2e2: multi_heap_malloc_impl at /home/pcblr6004/AWS/standalone/aws_fild/build/../freertos/vendors/espressif/esp-idf/components/heap/multi_heap.c:440
0x40081943: heap_caps_malloc at /home/pcblr6004/AWS/standalone/aws_fild/build/../freertos/vendors/espressif/esp-idf/components/heap/heap_caps.c:145
0x40081970: heap_caps_malloc_default at /home/pcblr6004/AWS/standalone/aws_fild/build/../freertos/vendors/espressif/esp-idf/components/heap/heap_caps.c:187
0x4008e989: malloc at /home/pcblr6004/AWS/standalone/aws_fild/build/../freertos/vendors/espressif/esp-idf/components/newlib/heap.c:32
0x400839bd: wifi_malloc at /home/pcblr6004/AWS/standalone/aws_fild/build/../freertos/vendors/espressif/esp-idf/components/esp_wifi/esp32/esp_adapter.c:73
0x4012fcbd: esf_buf_alloc at ??:?
0x40139929: wdevProcessRxSucDataAll at ??:?
0x400903d1: ppTask at ??:?
ELF file SHA256: 1e2b27ebb8fb18c1
Rebooting...

Seems like this malloc if failing: esp-afr-sdk/esp_adapter.c at 9e3992ead78da4e9c4c0c6082d719640f258d29c · espressif/esp-afr-sdk · GitHub

Would you please try to enable CONFIG_SPIRAM_TRY_ALLOCATE_WIFI_LWIP in your sdkconfig?

Thanks.

I already have it enabled in my sdkconfig file.

CONFIG_SPIRAM_MALLOC_ALWAYSINTERNAL=16384
CONFIG_SPIRAM_TRY_ALLOCATE_WIFI_LWIP=y
CONFIG_SPIRAM_MALLOC_RESERVE_INTERNAL=32768
CONFIG_SPIRAM_ALLOW_BSS_SEG_EXTERNAL_MEMORY=y
CONFIG_SPIRAM_CACHE_WORKAROUND=y

Again got this similar error but at a different location.

Guru Meditation Error: Core  0 panic'ed (Interrupt wdt timeout on CPU0). 
Core  0 register dump:
PC      : 0x4008b55b  PS      : 0x00060f34  A0      : 0x8008b2e5  A1      : 0x3ffebd90  
0x4008b55b: block_data_size at /home/pcblr6004/AWS/standalone/aws_fild/build/../freertos/vendors/espressif/esp-idf/components/heap/multi_heap.c:157
A2      : 0x3ffb8791  A3      : 0x3ffebcb0  A4      : 0xfffffffc  A5      : 0x3ffb876c  
A6      : 0x3ffe739c  A7      : 0x00000000  A8      : 0x00000024  A9      : 0x3ffb876c  
A10     : 0x3ffe7b9c  A11     : 0x3ffcdd90  A12     : 0x00000000  A13     : 0x00000001  
A14     : 0x00000000  A15     : 0x00000001  SAR     : 0x00000008  EXCCAUSE: 0x00000005  
EXCVADDR: 0x00000000  LBEG    : 0x40191c10  LEND    : 0x40191c22  LCOUNT  : 0x00000000  
0x40191c10: read_uint32 at /home/pcblr6004/AWS/standalone/aws_fild/build/../components/depthai/src/spi_messaging.c:45 (discriminator 3)
0x40191c22: read_uint32 at /home/pcblr6004/AWS/standalone/aws_fild/build/../components/depthai/src/spi_messaging.c:55
Backtrace:0x4008b558:0x3ffebd90 0x4008b2e2:0x3ffebdb0 0x40081943:0x3ffebde0 0x40081970:0x3ffebe00 0x4008e989:0x3ffebe20 0x400e8118:0x3ffebe40 0x400e8185:0x3ffebe70 0x400dff03:0x3ffebeb0
0x4008b558: block_data_size at /home/pcblr6004/AWS/standalone/aws_fild/build/../freertos/vendors/espressif/esp-idf/components/heap/multi_heap.c:156
0x4008b2e2: multi_heap_malloc_impl at /home/pcblr6004/AWS/standalone/aws_fild/build/../freertos/vendors/espressif/esp-idf/components/heap/multi_heap.c:440
0x40081943: heap_caps_malloc at /home/pcblr6004/AWS/standalone/aws_fild/build/../freertos/vendors/espressif/esp-idf/components/heap/heap_caps.c:145
0x40081970: heap_caps_malloc_default at /home/pcblr6004/AWS/standalone/aws_fild/build/../freertos/vendors/espressif/esp-idf/components/heap/heap_caps.c:187
0x4008e989: malloc at /home/pcblr6004/AWS/standalone/aws_fild/build/../freertos/vendors/espressif/esp-idf/components/newlib/heap.c:32
0x400e8118: dai::SpiApi::req_metadata(dai::Metadata*, char const*) at /home/pcblr6004/AWS/standalone/aws_fild/build/../components/depthai/src/spi_api.cpp:576
0x400e8185: dai::SpiApi::req_message(dai::Message*, char const*) at /home/pcblr6004/AWS/standalone/aws_fild/build/../components/depthai/src/spi_api.cpp:655
0x400dff03: run_demo at /home/pcblr6004/AWS/standalone/aws_fild/build/../components/cpp/src/app_main.cpp:72
ELF file SHA256: 62d826df17a12925
Rebooting...

None of the code in this call-stack is from us. I would recommend asking on Espressif forum.

Thanks.

Oh okay, will do that. Thanks for the support.

Did you get to solve it? Please I’m having a similar issue.