Custom build works, except i2c.readfrom_mem
Posted: Tue Oct 26, 2021 11:31 am
I'm using esp-idf v4.4-dev (latest commit before 5.0-dev) and micropython v1.17(also tested master branch) and am testing on a esp32-devkit-v4 module. I added some code to micropython use WiFi Enterprise from python. After building for GENERIC, wifi works, bluetooth works, standard things work. So far I've walked against one bug and that's when I use i2c.readfrom_mem() function, it crashes the freertos kernel and reboots. Weird thing is it does work with the dirty general binairies available on the website. This is the error:
So it seems like there's an unhandled interrupt. Normal i2c.readfrom() and writeto() do work. I understand I can use those two as a workaround, but for completeness i'm trying to make readfrom_mem to work. Anyone knows what I'm missing? Might be a simple sdk configuration flag I need to add.
Code: Select all
Guru Meditation Error: Core 0 panic'ed (StoreProhibited). Exception was unhandled.
Core 0 register dump:
PC : 0x4008c788 PS : 0x00060031 A0 : 0x8008c91d A1 : 0x3ffbe8d0
0x4008c788: i2c_master_cmd_begin_static at /opt/esp-idf-sdk/components/driver/i2c.c:1345
A2 : 0x3ffb6f70 A3 : 0x00000000 A4 : 0x00000000 A5 : 0x6002701c
A6 : 0x00000001 A7 : 0x00000000 A8 : 0x3ffb717c A9 : 0x00000901
A10 : 0x000000a5 A11 : 0x00000001 A12 : 0x00000001 A13 : 0x3ffb7180
A14 : 0x00000000 A15 : 0x3ff67000 SAR : 0x0000001d EXCCAUSE: 0x0000001d
EXCVADDR: 0x00000008 LBEG : 0x4008c73a LEND : 0x4008c746 LCOUNT : 0x00000000
0x4008c73a: i2c_ll_write_txfifo at /opt/esp-idf-sdk/components/hal/esp32/include/hal/i2c_ll.h:548
(inlined by) i2c_master_cmd_begin_static at /opt/esp-idf-sdk/components/driver/i2c.c:1338
0x4008c746: i2c_master_cmd_begin_static at /opt/esp-idf-sdk/components/driver/i2c.c:1339
Backtrace:0x4008c785:0x3ffbe8d00x4008c91a:0x3ffbe910 0x40082c95:0x3ffbe940 0x401dd203:0x3ffbcf80 0x400d2d33:0x3ffbcfa0 0x40096244:0x3ffbcfc0
0x4008c785: i2c_master_cmd_begin_static at /opt/esp-idf-sdk/components/driver/i2c.c:1345
0x4008c91a: i2c_isr_handler_default at /opt/esp-idf-sdk/components/driver/i2c.c:500
0x40082c95: _xt_lowint1 at /opt/esp-idf-sdk/components/freertos/port/xtensa/xtensa_vectors.S:1111
0x401dd203: cpu_ll_waiti at /opt/esp-idf-sdk/components/hal/esp32/include/hal/cpu_ll.h:183
(inlined by) esp_pm_impl_waiti at /opt/esp-idf-sdk/components/esp_pm/pm_impl.c:838
0x400d2d33: esp_vApplicationIdleHook at /opt/esp-idf-sdk/components/esp_system/freertos_hooks.c:63
0x40096244: prvIdleTask at /opt/esp-idf-sdk/components/freertos/tasks.c:3956