Using ESP32-WROOM with a 16Mbit SPI-connected flash mem (for storage, using littlefs and flashdb etc.) as well as the WROOM's internal SPI 4MB flash for application and NVS
Using ESP-IDF 5.2 I'll occasionally get "Exception not handled" or "Instruction Fetch Error" or similar with an address up at 0x3FFxxxxx which is in my heap.
Generally, what's the cause (and hopefully fix!) of such exceptions? Do I have an issue trying to access SPI when cache is disabled? There seems to be a correlation with turning off wifi, and/or closing listening TCP sockets.
My SDK config doesn't show any mem protection features enabled, but these crashes are infrequent and I can't reproduce on-demand, so experimenting with settings might take a long time to see if it has helped.
An example exception backtrace, although USUALLY my stacktrace also just prints a 0x3FFxxxxx adresss, so I don't know if this is representative:
0x401dec64: uart_ll_get_txfifo_len at C:/Espressif/frameworks/esp-idf/components/hal/esp32/include/hal/uart_ll.h:408
(inlined by) uart_tx_char at C:/Espressif/frameworks/esp-idf/components/vfs/vfs_uart.c:165
0x401dfb3f: uart_write at C:/Espressif/frameworks/esp-idf/components/vfs/vfs_uart.c:218
0x400d973f: console_write at C:/Espressif/frameworks/esp-idf/components/vfs/vfs_console.c:73 (discriminator 1)
0x401de1fe: esp_vfs_write at C:/Espressif/frameworks/esp-idf/components/vfs/vfs.c:482 (discriminator 4)
0x4000bd83: ?? ??:0
0x4000117d: ?? ??:0
0x400592fe: ?? ??:0
0x4005937a: ?? ??:0
0x401b1f1d: __sfvwrite_r at /builds/idf/crosstool-NG/.build/HOST-x86_64-w64-mingw32/xtensa-esp-elf/src/newlib/newlib/libc/stdio/fvwrite.c:251
0x401b1b0a: _fputs_r at /builds/idf/crosstool-NG/.build/HOST-x86_64-w64-mingw32/xtensa-esp-elf/src/newlib/newlib/libc/stdio/fputs.c:107
0x401b1b41: fputs at /builds/idf/crosstool-NG/.build/HOST-x86_64-w64-mingw32/xtensa-esp-elf/src/newlib/newlib/libc/stdio/fputs.c:140 (discriminator 1)
0x400dc8ff: errcmd_puts at C:/src/(my app)/components/app/errcmd.c:500 (discriminator 1)
Help with exceptions accessing heap, when stopping wifi/sockets
Who is online
Users browsing this forum: floitsch_toit, ronbreukers and 92 guests