Closed joshbrew closed 5 years ago
Decoding 13 results 0x40085841: r_assert_param at ?? line ? 0x40085779: r_assert_param at ?? line ? 0x40085780: r_assert_param at ?? line ? 0x40089aae: btdm_bb_isr at intc.c line ? 0x40085841: r_assert_param at ?? line ? 0x40085841: r_assert_param at ?? line ? 0x400892b9: r_rwbt_isr at ?? line ? 0x4008994b: r_rwbtdm_isr_wrapper at intc.c line ? 0x40081f45: _xt_lowint1 at /Users/ficeto/Desktop/ESP32/ESP32/esp-idf-public/components/freertos/xtensa_vectors.S line 1105 0x40089aab: btdm_bb_isr at intc.c line ? 0x4017e1ce: cxa_guard_dummy at ?? line ? 0x4017e1ce: cxa_guard_dummy at ?? line ? 0x4008e467: prvIdleTask at /Users/ficeto/Desktop/ESP32/ESP32/esp-idf-public/components/freertos/tasks.c line 3564
Another stack trace: 0x40085841: r_assert_param at ?? line ? 0x40085779: r_assert_param at ?? line ? 0x40085780: r_assert_param at ?? line ? 0x40089aae: btdm_bb_isr at intc.c line ? 0x40085841: r_assert_param at ?? line ? 0x40085841: r_assert_param at ?? line ? 0x400892b9: r_rwbt_isr at ?? line ? 0x4008994b: r_rwbtdm_isr_wrapper at intc.c line ? 0x40081f45: _xt_lowint1 at /Users/ficeto/Desktop/ESP32/ESP32/esp-idf-public/components/freertos/xtensa_vectors.S line 1105 0x40089aab: btdm_bb_isr at intc.c line ? 0x4017e1fa: esp_vApplicationWaitiHook at /Users/ficeto/Desktop/ESP32/ESP32/esp-idf-public/components/esp32/freertos_hooks.c line 66 0x4017e1fa: esp_vApplicationWaitiHook at /Users/ficeto/Desktop/ESP32/ESP32/esp-idf-public/components/esp32/freertos_hooks.c line 66 0x4008e467: prvIdleTask at /Users/ficeto/Desktop/ESP32/ESP32/esp-idf-public/components/freertos/tasks.c line 3564
Another note, my heap size doubled when I changed my bluetooth transmit rate from 333 to 100ms. Wtf lol
Interrupt wdt timeout on CPU0
means that you should feed the WDT timer on loops, calling feedLoopWDT();
or delay(10);
with 10 or more
Thank you for the assist
So should I change the 1ms delay to 10 or change it to feedLoopWDT(). I have some processes that are running at 2ms intervals so I also need to desynchronize then if my delay is longer, unless I just have that delay after a SerialBT print call. I'm working on a biofeedback device that relies on the ADC running pretty fast.
Okay, fix: changed the delay after the BTserial send to 10ms, and I have a 1ms delay in the main loop for good measure, now my heap at slower response rates is restored and there are no more crashes so far
Hardware:
Board: LOLIN32 V1.0.0 Core Installation version: 1.0.1 IDE name: Arduino IDE Flash Frequency: 80MHz PSRAM enabled: ? Upload Speed: 921600 Computer OS: Win 10 and Android
Description:
Describe your problem here Am trying to sync a phone with a bluetooth serial stream. I've gotten the stream working in BLE but could not read the write bytes on the ESP32 correctly in the UART example when I tried writing to it. So I switched to SerialBT which is more simple for my needs, but now I'm getting periodic crashing after streaming for a few minutes, especially when trying to interrupt. Ironically it seems to happen only at slower Bluetooth update rates. I have a light sensor and an ADS1115 on the 5V pins which might be causing a power draw issue but this was no issue with BLE.
Could this also be related to the speed at which my receiver is reading bytes? I've been testing an app and it's not well optimized and can lag behind, but that doesn't explain to me why it doesn't crash at higher rates than the app can keep up with.
Sketch: (leave the backquotes for code formatting)
Debug Messages:
The following is my heap size, it seems steady for a bit then starts to drop. At that point when I interrupt it causes a reboot.
90212 90184 90188 90212 90184 90188 90188 90188 90188 90212 90188 90188 90188 90188 90212 90184 90184 90184 90188 90184 90212 90184 90212 90212 90184 90188 90188 90188 90184 90188 90184 90212 90188 90184 90184 90184 90184 90212 90188 90212 90188 90212 90188 90184 90188 ... 89460 89412 89384 89060 89284 89140 88824 89092 89036 88968 89052 88996 88928 88872 89044 88988 88932 88868 88808 88756 ASSERT_PARAM(512 0), in rwbt.c at line 273 Guru Meditation Error: Core 0 panic'ed (Interrupt wdt timeout on CPU0) Core 0 register dump: PC : 0x40085841 PS : 0x00060434 A0 : 0x800892bc A1 : 0x3ffc05b0
A2 : 0x00000001 A3 : 0x00000000 A4 : 0x00000000 A5 : 0x60008054
A6 : 0x3ffc1030 A7 : 0x60008050 A8 : 0x80085841 A9 : 0x3ffc0590
A10 : 0x00000004 A11 : 0x00000000 A12 : 0x6000804c A13 : 0xffffffff
A14 : 0x00000000 A15 : 0xfffffffc SAR : 0x00000004 EXCCAUSE: 0x00000005
EXCVADDR: 0x00000000 LBEG : 0x40085779 LEND : 0x40085780 LCOUNT : 0x00000000
Core 0 was running in ISR context: EPC1 : 0x40089aae EPC2 : 0x00000000 EPC3 : 0x00000000 EPC4 : 0x40085841
Backtrace: 0x40085841:0x3ffc05b0 0x400892b9:0x3ffc05d0 0x4008994b:0x3ffc05f0 0x40081f45:0x3ffc0610 0x40089aab:0x00000000
Core 1 register dump: PC : 0x4017e1ce PS : 0x00060f34 A0 : 0x8008e46a A1 : 0x3ffd1de0
A2 : 0x00000008 A3 : 0x00000001 A4 : 0x00000000 A5 : 0x3ffd1910
A6 : 0x00000000 A7 : 0x00000001 A8 : 0x3ffc829c A9 : 0x3ffc8260
A10 : 0x00000000 A11 : 0x00000001 A12 : 0x8008c8c8 A13 : 0x3ffd1ce0
A14 : 0x00000000 A15 : 0x3ffd1aa0 SAR : 0x00000000 EXCCAUSE: 0x00000005
EXCVADDR: 0x00000000 LBEG : 0x00000000 LEND : 0x00000000 LCOUNT : 0x00000000
Backtrace: 0x4017e1ce:0x3ffd1de0 0x4008e467:0x3ffd1e00
Rebooting... ets Jun 8 2016 00:22:57
rst:0xc (SW_CPU_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT) configsip: 0, SPIWP:0xee clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00 mode:DIO, clock div:1 load:0x3fff0018,len:4 load:0x3fff001c,len:808 load:0x40078000,len:6084 load:0x40080000,len:6696 entry 0x400802e4 92620