I am getting the exact same error, under pretty much the exact same circumstances: A "Cache disabled but ..." Guru error in the RMT driver (using the same esp32-owb library as OP) while reading from the SPI flash. I'm using ESP-IDF v4.4.1. Here's the backtrace:
Code: Select all
Guru Meditation Error: Core 0 panic'ed (Cache disabled but cached memory region accessed).
Core 0 register dump:
PC : 0x4016189c PS : 0x00060034 A0 : 0x80081f70 A1 : 0x3ffb0ba0
0x4016189c: rmt_ll_get_tx_err_interrupt_status at C:/esp/esp-idf/components/hal/esp32/include/hal/rmt_ll.h:307
A2 : 0x3ffb14fc A3 : 0x00000000 A4 : 0x00000080 A5 : 0x00000001
A6 : 0x00000001 A7 : 0x00000000 A8 : 0x80084643 A9 : 0x000e0f20
A10 : 0x3ff56000 A11 : 0x3ffb0ba4 A12 : 0x00000000 A13 : 0x3ffd7ee8
A14 : 0x00060023 A15 : 0x00000000 SAR : 0x00000020 EXCCAUSE: 0x00000007
EXCVADDR: 0x00000000 LBEG : 0x00000000 LEND : 0x00000000 LCOUNT : 0x00000000
Backtrace:0x40161899:0x3ffb0ba00x40081f6d:0x3ffb0be0 0x40083935:0x3ffb0c00 0x4008578c:0x3ffafbd0 0x40083dbc:0x3ffafbf0
0x40161899: rmt_ll_enable_tx_err_interrupt at C:/esp/esp-idf/components/hal/esp32/include/hal/rmt_ll.h:252
0x40081f6d: shared_intr_isr at C:/esp/esp-idf/components/esp_hw_support/intr_alloc.c:407
0x40083935: _xt_lowint1 at C:/esp/esp-idf/components/freertos/port/xtensa/xtensa_vectors.S:1111
0x4008578c: spi_flash_op_block_func at C:/esp/esp-idf/components/spi_flash/cache_utils.c:123 (discriminator 1)
0x40083dbc: ipc_task at C:/esp/esp-idf/components/esp_ipc/src/esp_ipc.c:74
With some random modifications to my application code, I can also coax another, similar trace out of it:
Code: Select all
Guru Meditation Error: Core 0 panic'ed (Cache disabled but cached memory region accessed).
Core 0 register dump:
PC : 0x4015831c PS : 0x00060034 A0 : 0x80081e98 A1 : 0x3ffb0ba0
0x4015831c: rmt_ll_get_tx_err_interrupt_status at C:/esp/esp-idf/components/hal/esp32/include/hal/rmt_ll.h:307
A2 : 0x3ffb14f8 A3 : 0x00000000 A4 : 0x00000080 A5 : 0x00000001
A6 : 0x00000001 A7 : 0x00000000 A8 : 0x8008456b A9 : 0x000e0f20
A10 : 0x3ff56000 A11 : 0x3ffb0ba4 A12 : 0x00000001 A13 : 0x3ffddf30
A14 : 0x00060023 A15 : 0x00000000 SAR : 0x00000020 EXCCAUSE: 0x00000007
EXCVADDR: 0x00000000 LBEG : 0x4000c2e0 LEND : 0x4000c2f6 LCOUNT : 0x00000000
Backtrace:0x40158319:0x3ffb0ba00x40081e95:0x3ffb0be0 0x4008385d:0x3ffb0c00 0x4000c2df:0x3ffbfef0 0x400934f1:0x3ffbff00 0x40085752:0x3ffbff80 0x400f5d79:0x3ffbffc0 0x400ebc8d:0x3ffbfff0 0x400ebf69:0x3ffc0020 0x400ebfdb:0x3ffc0060 0x400ec09b:0x3ffc00c0 0x400ec93a:0x3ffc00f0 0x400ee526:0x3ffc0150 0x400eedbb:0x3ffc01a0 0x400eb133:0x3ffc01c0 0x400d3aab:0x3ffc01f0 0x4014771c:0x3ffc0210 0x401477c5:0x3ffc0240 0x400dc15d:0x3ffc0260 0x400d86a5:0x3ffc0310
0x40158319: rmt_ll_enable_tx_err_interrupt at C:/esp/esp-idf/components/hal/esp32/include/hal/rmt_ll.h:252
0x40081e95: shared_intr_isr at C:/esp/esp-idf/components/esp_hw_support/intr_alloc.c:407
0x4008385d: _xt_lowint1 at C:/esp/esp-idf/components/freertos/port/xtensa/xtensa_vectors.S:1111
0x400934f1: spi_flash_chip_generic_read at C:/esp/esp-idf/components/spi_flash/spi_flash_chip_generic.c:220
0x40085752: esp_flash_read at C:/esp/esp-idf/components/spi_flash/esp_flash_api.c:832
0x400f5d79: esp_partition_read at C:/esp/esp-idf/components/spi_flash/partition.c:424
0x400ebc8d: littlefs_api_read at C:/Users/alemariusnexus/workspace/vustoy/master/esp32-vustoy/externals/components/esp_littlefs/src/littlefs_api.c:22
0x400ebf69: lfs_bd_read at C:/Users/alemariusnexus/workspace/vustoy/master/esp32-vustoy/externals/components/esp_littlefs/src/littlefs/lfs.c:99
(inlined by) lfs_bd_read at C:/Users/alemariusnexus/workspace/vustoy/master/esp32-vustoy/externals/components/esp_littlefs/src/littlefs/lfs.c:27
0x400ebfdb: lfs_dir_getslice at C:/Users/alemariusnexus/workspace/vustoy/master/esp32-vustoy/externals/components/esp_littlefs/src/littlefs/lfs.c:600
0x400ec09b: lfs_dir_get at C:/Users/alemariusnexus/workspace/vustoy/master/esp32-vustoy/externals/components/esp_littlefs/src/littlefs/lfs.c:646
0x400ec93a: lfs_dir_find at C:/Users/alemariusnexus/workspace/vustoy/master/esp32-vustoy/externals/components/esp_littlefs/src/littlefs/lfs.c:1230
0x400ee526: lfs_file_rawopencfg at C:/Users/alemariusnexus/workspace/vustoy/master/esp32-vustoy/externals/components/esp_littlefs/src/littlefs/lfs.c:2483
0x400eedbb: lfs_file_rawopen at C:/Users/alemariusnexus/workspace/vustoy/master/esp32-vustoy/externals/components/esp_littlefs/src/littlefs/lfs.c:2625
(inlined by) lfs_file_open at C:/Users/alemariusnexus/workspace/vustoy/master/esp32-vustoy/externals/components/esp_littlefs/src/littlefs/lfs.c:5094
0x400eb133: vfs_littlefs_open at C:/Users/alemariusnexus/workspace/vustoy/master/esp32-vustoy/externals/components/esp_littlefs/src/esp_littlefs.c:939
0x400d3aab: esp_vfs_open at C:/esp/esp-idf/components/vfs/vfs.c:399 (discriminator 3)
0x4014771c: _fopen_r at /builds/idf/crosstool-NG/.build/HOST-x86_64-w64-mingw32/xtensa-esp32-elf/src/newlib/newlib/libc/stdio/fopen.c:129
0x401477c5: fopen at /builds/idf/crosstool-NG/.build/HOST-x86_64-w64-mingw32/xtensa-esp32-elf/src/newlib/newlib/libc/stdio/fopen.c:168
For me, this only happens when compiling with size optimizations (-Os). It does not happen with -O2. I have searched around a bit and found a discussion about similar errors that seemed to have something to do with function inlining:
https://github.com/espressif/esp-idf/is ... -669172977
https://github.com/espressif/esp-idf/is ... -823995356
I have not really looked into how all of this relates, so I might be way off here, but I do notice that the offending function is declared inline
but not forced inline like this, which seemed to be the problem in that discussion:
Code: Select all
static inline uint32_t rmt_ll_get_tx_err_interrupt_status(rmt_dev_t *dev)
{
uint32_t status = dev->int_st.val;
return ((status & 0x04) >> 2) | ((status & 0x20) >> 4) | ((status & 0x100) >> 6) | ((status & 0x800) >> 8) |
((status & 0x4000) >> 10) | ((status & 0x20000) >> 12) | ((status & 0x100000) >> 14) | ((status & 0x800000) >> 16);
}