You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I set logging to debug and switch WiFi logging to debug, on start up (from the main thread) when my app attempts to read the battery voltage it aborts because locks.c thinks that I am logging from within an ISR.
Expected Behavior
That it would log he debug message instead of aborting.
0x40029d65: esp_system_abort at E:/Dev/Espressif/esp-idf/components/esp_system/system_api.c:104
0x4002e19a: abort at E:/Dev/Espressif/esp-idf/components/newlib/abort.c:46
0x40025faa: lock_acquire_generic at E:/Dev/Espressif/esp-idf/components/newlib/locks.c:142
0x400260d1: _lock_acquire_recursive at E:/Dev/Espressif/esp-idf/components/newlib/locks.c:170
0x40092d8e: _vfprintf_r at /builds/idf/crosstool-NG/.build/HOST-x86_64-w64-mingw32/xtensa-esp32s2-elf/src/newlib/newlib/libc/stdio/vfprintf.c:853 (discriminator 2)
0x40095d9d: vprintf at /builds/idf/crosstool-NG/.build/HOST-x86_64-w64-mingw32/xtensa-esp32s2-elf/src/newlib/newlib/libc/stdio/vprintf.c:34
0x4009a121: esp_log_writev at E:/Dev/Espressif/esp-idf/components/log/log.c:189
0x4002e061: esp_log_write at E:/Dev/Espressif/esp-idf/components/log/log.c:199
0x400881c2: adc_set_init_code at E:/Dev/Espressif/esp-idf/components/driver/adc_common.c:248
(inlined by) adc1_get_raw at E:/Dev/Espressif/esp-idf/components/driver/adc_common.c:345
0x400858cb: app_main at e:\source\wylas\beamatouch\build/../main/main.cpp:57 (discriminator 8)
0x40029dca: main_task at E:/Dev/Espressif/esp-idf/components/freertos/xtensa/port.c:535
0x40029d6d: vPortTaskWrapper at E:/Dev/Espressif/esp-idf/components/freertos/xtensa/port.c:169
The text was updated successfully, but these errors were encountered:
github-actionsbot
changed the title
Debug logging from adc_set_init_code (on main thread) causing an abort because it thinks it calls from an ISR
Debug logging from adc_set_init_code (on main thread) causing an abort because it thinks it calls from an ISR (IDFGH-4233)
Nov 9, 2020
Environment
Problem Description
When I set logging to debug and switch WiFi logging to debug, on start up (from the main thread) when my app attempts to read the battery voltage it aborts because locks.c thinks that I am logging from within an ISR.
Expected Behavior
That it would log he debug message instead of aborting.
Actual Behavior
System aborts and restarts.
Steps to reproduce
Code to reproduce this issue
Debug Logs
I (820) my_main: Logger initialised
D (820) partition: Loading the partition table
I (840) gpio: GPIO[7]| InputEn: 0| OutputEn: 0| OpenDrain: 0| Pullup: 1| Pulldown: 0| Intr:0
I (840) gpio: GPIO[15]| InputEn: 0| OutputEn: 0| OpenDrain: 0| Pullup: 1| Pulldown: 0| Intr:0
I (850) my_main: Disable Charging
abort() was called at PC 0x40025faa on core 0
0x40025faa: lock_acquire_generic at E:/Dev/Espressif/esp-idf/components/newlib/locks.c:142
Backtrace:0x4002952f:0x3ffc4950 0x40029d65:0x3ffc4970 0x4002e19a:0x3ffc4990 0x40025faa:0x3ffc4a00 0x400260d1:0x3ffc4a30 0x40092d8e:0x3ffc4a50 0x40095d9d:0x3ffc4d60 0x4009a121:0x3ffc4d90 0x4002e061:0x3ffc4dc0 0x4
00881c2:0x3ffc4e10 0x400858cb:0x3ffc4e50 0x40029dca:0x3ffc4e70 0x40029d6d:0x3ffc4e90
0x4002952f: panic_abort at E:/Dev/Espressif/esp-idf/components/esp_system/panic.c:349
0x40029d65: esp_system_abort at E:/Dev/Espressif/esp-idf/components/esp_system/system_api.c:104
0x4002e19a: abort at E:/Dev/Espressif/esp-idf/components/newlib/abort.c:46
0x40025faa: lock_acquire_generic at E:/Dev/Espressif/esp-idf/components/newlib/locks.c:142
0x400260d1: _lock_acquire_recursive at E:/Dev/Espressif/esp-idf/components/newlib/locks.c:170
0x40092d8e: _vfprintf_r at /builds/idf/crosstool-NG/.build/HOST-x86_64-w64-mingw32/xtensa-esp32s2-elf/src/newlib/newlib/libc/stdio/vfprintf.c:853 (discriminator 2)
0x40095d9d: vprintf at /builds/idf/crosstool-NG/.build/HOST-x86_64-w64-mingw32/xtensa-esp32s2-elf/src/newlib/newlib/libc/stdio/vprintf.c:34
0x4009a121: esp_log_writev at E:/Dev/Espressif/esp-idf/components/log/log.c:189
0x4002e061: esp_log_write at E:/Dev/Espressif/esp-idf/components/log/log.c:199
0x400881c2: adc_set_init_code at E:/Dev/Espressif/esp-idf/components/driver/adc_common.c:248
(inlined by) adc1_get_raw at E:/Dev/Espressif/esp-idf/components/driver/adc_common.c:345
0x400858cb: app_main at e:\source\wylas\beamatouch\build/../main/main.cpp:57 (discriminator 8)
0x40029dca: main_task at E:/Dev/Espressif/esp-idf/components/freertos/xtensa/port.c:535
0x40029d6d: vPortTaskWrapper at E:/Dev/Espressif/esp-idf/components/freertos/xtensa/port.c:169
The text was updated successfully, but these errors were encountered: