Backtrace issue when reading ADC
Posted: Tue Dec 19, 2023 10:18 am
Hi all,
I am using esp32 and reading adc values using api "adc1_get_raw()".Earlier i was reading only one sample but due to some reasons, i want to read 512/1024 samples at a time and average them.i am able to take 64/128 samples and average them.as soon as i go to take 256 or more sample i start getting back trace prints.i am unable to decode this.Can anyone help me to understand why reading more than 256 samples causing the issue?what could be the issue?as far as i know.,adc read call is blocking call but not sure what could cause back trace issue.
Thanks in advance!
//////////////////////LOGS/////////////////
Backtrace:0x4013C7DE:0x3FFBE8300x40083EED:0x3FFBE850 0x4000BFED:0x3FFBBB10 0x4009551E:0x3FFBBB20 0x401370C0:0x3FFBBB40 0x400EAC79:0x3FFBBB70 0x400EB4E5:0x3FFBBBE0 0x400D5A89:0x3FFBBC00
0x4013c7de: task_wdt_isr at /home/bipin/esp/esp-idf/components/esp_system/task_wdt.c:183
0x40083eed: _xt_lowint1 at /home/bipin/esp/esp-idf/components/freertos/port/xtensa/xtensa_vectors.S:1111
0x4009551e: vPortClearInterruptMaskFromISR at /home/bipin/esp/esp-idf/components/freertos/port/xtensa/include/freertos/portmacro.h:571
(inlined by) vPortExitCritical at /home/bipin/esp/esp-idf/components/freertos/port/xtensa/port.c:319
0x401370c0: adc1_get_raw at /home/bipin/esp/esp-idf/components/driver/adc_common.c:449
(inlined by) adc1_get_raw at /home/bipin/esp/esp-idf/components/driver/adc_common.c:427
0x400eac79: Temperature::read_raw() at /home/bipin/esp/fellow_language_release/EKG_Pro/firmware/main/temperature.hpp:231
(inlined by) Kettle::on_timer() at /home/bipin/esp/fellow_language_release/EKG_Pro/firmware/main/kettle.hpp:52
0x400eb4e5: Kettle::periodic_timer_callback(void*) at /home/bipin/esp/fellow_language_release/EKG_Pro/firmware/main/kettle.hpp:507
0x400d5a89: timer_process_alarm at /home/bipin/esp/esp-idf/components/esp_timer/src/esp_timer.c:360
(inlined by) timer_task at /home/bipin/esp/esp-idf/components/esp_timer/src/esp_timer.c:386
Backtrace:0x4008D7D9:0x3FFBEE300x40083EED:0x3FFBEE50 0x4000BFED:0x3FFD7560 0x4009551E:0x3FFD7570 0x4013CA22:0x3FFD7590 0x4013CA2F:0x3FFD75C0 0x400D3A2E:0x3FFD75E0 0x400937DC:0x3FFD7600
0x4008d7d9: esp_crosscore_isr at /home/bipin/esp/esp-idf/components/esp_system/crosscore_int.c:92
0x40083eed: _xt_lowint1 at /home/bipin/esp/esp-idf/components/freertos/port/xtensa/xtensa_vectors.S:1111
0x4009551e: vPortClearInterruptMaskFromISR at /home/bipin/esp/esp-idf/components/freertos/port/xtensa/include/freertos/portmacro.h:571
(inlined by) vPortExitCritical at /home/bipin/esp/esp-idf/components/freertos/port/xtensa/port.c:319
0x4013ca22: esp_task_wdt_reset at /home/bipin/esp/esp-idf/components/esp_system/task_wdt.c:330
0x4013ca2f: idle_hook_cb at /home/bipin/esp/esp-idf/components/esp_system/task_wdt.c:80
0x400d3a2e: esp_vApplicationIdleHook at /home/bipin/esp/esp-idf/components/esp_system/freertos_hooks.c:51 (discriminator 1)
0x400937dc: prvIdleTask at /home/bipin/esp/esp-idf/components/freertos/tasks.c:3974
I (20350) Main: MME: 0 CUR T :nan ,TAR T:96.11, PID OP:-10, heat_warm_on: 0
I (21590) Main: MME: 0 CUR T :nan ,TAR T:96.11, PID OP:-10, heat_warm_on: 0
I (22820) Main: MME: 0 CUR T :nan ,TAR T:96.11, PID OP:-10, heat_warm_on: 0
I (24050) Main: MME: 0 CUR T :nan ,TAR T:96.11, PID OP:-10, heat_warm_on: 0
Backtrace:0x4013C7DE:0x3FFBE8300x40083EED:0x3FFBE850 0x4000BFED:0x3FFBBB10 0x4009551E:0x3FFBBB20 0x401370C0:0x3FFBBB40 0x400EAC79:0x3FFBBB70 0x400EB4E5:0x3FFBBBE0 0x400D5A89:0x3FFBBC00
0x4013c7de: task_wdt_isr at /home/bipin/esp/esp-idf/components/esp_system/task_wdt.c:183
0x40083eed: _xt_lowint1 at /home/bipin/esp/esp-idf/components/freertos/port/xtensa/xtensa_vectors.S:1111
0x4009551e: vPortClearInterruptMaskFromISR at /home/bipin/esp/esp-idf/components/freertos/port/xtensa/include/freertos/portmacro.h:571
(inlined by) vPortExitCritical at /home/bipin/esp/esp-idf/components/freertos/port/xtensa/port.c:319
0x401370c0: adc1_get_raw at /home/bipin/esp/esp-idf/components/driver/adc_common.c:449
(inlined by) adc1_get_raw at /home/bipin/esp/esp-idf/components/driver/adc_common.c:427
0x400eac79: Temperature::read_raw() at /home/bipin/esp/fellow_language_release/EKG_Pro/firmware/main/temperature.hpp:231
(inlined by) Kettle::on_timer() at /home/bipin/esp/fellow_language_release/EKG_Pro/firmware/main/kettle.hpp:52
0x400eb4e5: Kettle::periodic_timer_callback(void*) at /home/bipin/esp/fellow_language_release/EKG_Pro/firmware/main/kettle.hpp:507
0x400d5a89: timer_process_alarm at /home/bipin/esp/esp-idf/components/esp_timer/src/esp_timer.c:360
(inlined by) timer_task at /home/bipin/esp/esp-idf/components/esp_timer/src/esp_timer.c:386
I am using esp32 and reading adc values using api "adc1_get_raw()".Earlier i was reading only one sample but due to some reasons, i want to read 512/1024 samples at a time and average them.i am able to take 64/128 samples and average them.as soon as i go to take 256 or more sample i start getting back trace prints.i am unable to decode this.Can anyone help me to understand why reading more than 256 samples causing the issue?what could be the issue?as far as i know.,adc read call is blocking call but not sure what could cause back trace issue.
Thanks in advance!
//////////////////////LOGS/////////////////
Backtrace:0x4013C7DE:0x3FFBE8300x40083EED:0x3FFBE850 0x4000BFED:0x3FFBBB10 0x4009551E:0x3FFBBB20 0x401370C0:0x3FFBBB40 0x400EAC79:0x3FFBBB70 0x400EB4E5:0x3FFBBBE0 0x400D5A89:0x3FFBBC00
0x4013c7de: task_wdt_isr at /home/bipin/esp/esp-idf/components/esp_system/task_wdt.c:183
0x40083eed: _xt_lowint1 at /home/bipin/esp/esp-idf/components/freertos/port/xtensa/xtensa_vectors.S:1111
0x4009551e: vPortClearInterruptMaskFromISR at /home/bipin/esp/esp-idf/components/freertos/port/xtensa/include/freertos/portmacro.h:571
(inlined by) vPortExitCritical at /home/bipin/esp/esp-idf/components/freertos/port/xtensa/port.c:319
0x401370c0: adc1_get_raw at /home/bipin/esp/esp-idf/components/driver/adc_common.c:449
(inlined by) adc1_get_raw at /home/bipin/esp/esp-idf/components/driver/adc_common.c:427
0x400eac79: Temperature::read_raw() at /home/bipin/esp/fellow_language_release/EKG_Pro/firmware/main/temperature.hpp:231
(inlined by) Kettle::on_timer() at /home/bipin/esp/fellow_language_release/EKG_Pro/firmware/main/kettle.hpp:52
0x400eb4e5: Kettle::periodic_timer_callback(void*) at /home/bipin/esp/fellow_language_release/EKG_Pro/firmware/main/kettle.hpp:507
0x400d5a89: timer_process_alarm at /home/bipin/esp/esp-idf/components/esp_timer/src/esp_timer.c:360
(inlined by) timer_task at /home/bipin/esp/esp-idf/components/esp_timer/src/esp_timer.c:386
Backtrace:0x4008D7D9:0x3FFBEE300x40083EED:0x3FFBEE50 0x4000BFED:0x3FFD7560 0x4009551E:0x3FFD7570 0x4013CA22:0x3FFD7590 0x4013CA2F:0x3FFD75C0 0x400D3A2E:0x3FFD75E0 0x400937DC:0x3FFD7600
0x4008d7d9: esp_crosscore_isr at /home/bipin/esp/esp-idf/components/esp_system/crosscore_int.c:92
0x40083eed: _xt_lowint1 at /home/bipin/esp/esp-idf/components/freertos/port/xtensa/xtensa_vectors.S:1111
0x4009551e: vPortClearInterruptMaskFromISR at /home/bipin/esp/esp-idf/components/freertos/port/xtensa/include/freertos/portmacro.h:571
(inlined by) vPortExitCritical at /home/bipin/esp/esp-idf/components/freertos/port/xtensa/port.c:319
0x4013ca22: esp_task_wdt_reset at /home/bipin/esp/esp-idf/components/esp_system/task_wdt.c:330
0x4013ca2f: idle_hook_cb at /home/bipin/esp/esp-idf/components/esp_system/task_wdt.c:80
0x400d3a2e: esp_vApplicationIdleHook at /home/bipin/esp/esp-idf/components/esp_system/freertos_hooks.c:51 (discriminator 1)
0x400937dc: prvIdleTask at /home/bipin/esp/esp-idf/components/freertos/tasks.c:3974
I (20350) Main: MME: 0 CUR T :nan ,TAR T:96.11, PID OP:-10, heat_warm_on: 0
I (21590) Main: MME: 0 CUR T :nan ,TAR T:96.11, PID OP:-10, heat_warm_on: 0
I (22820) Main: MME: 0 CUR T :nan ,TAR T:96.11, PID OP:-10, heat_warm_on: 0
I (24050) Main: MME: 0 CUR T :nan ,TAR T:96.11, PID OP:-10, heat_warm_on: 0
Backtrace:0x4013C7DE:0x3FFBE8300x40083EED:0x3FFBE850 0x4000BFED:0x3FFBBB10 0x4009551E:0x3FFBBB20 0x401370C0:0x3FFBBB40 0x400EAC79:0x3FFBBB70 0x400EB4E5:0x3FFBBBE0 0x400D5A89:0x3FFBBC00
0x4013c7de: task_wdt_isr at /home/bipin/esp/esp-idf/components/esp_system/task_wdt.c:183
0x40083eed: _xt_lowint1 at /home/bipin/esp/esp-idf/components/freertos/port/xtensa/xtensa_vectors.S:1111
0x4009551e: vPortClearInterruptMaskFromISR at /home/bipin/esp/esp-idf/components/freertos/port/xtensa/include/freertos/portmacro.h:571
(inlined by) vPortExitCritical at /home/bipin/esp/esp-idf/components/freertos/port/xtensa/port.c:319
0x401370c0: adc1_get_raw at /home/bipin/esp/esp-idf/components/driver/adc_common.c:449
(inlined by) adc1_get_raw at /home/bipin/esp/esp-idf/components/driver/adc_common.c:427
0x400eac79: Temperature::read_raw() at /home/bipin/esp/fellow_language_release/EKG_Pro/firmware/main/temperature.hpp:231
(inlined by) Kettle::on_timer() at /home/bipin/esp/fellow_language_release/EKG_Pro/firmware/main/kettle.hpp:52
0x400eb4e5: Kettle::periodic_timer_callback(void*) at /home/bipin/esp/fellow_language_release/EKG_Pro/firmware/main/kettle.hpp:507
0x400d5a89: timer_process_alarm at /home/bipin/esp/esp-idf/components/esp_timer/src/esp_timer.c:360
(inlined by) timer_task at /home/bipin/esp/esp-idf/components/esp_timer/src/esp_timer.c:386