BLE write triggers watchdog / Is it safe to disable watchdog on both CPU IDLE tasks?

akolodner25
Posts: 27
Joined: Tue Nov 22, 2022 5:15 am

BLE write triggers watchdog / Is it safe to disable watchdog on both CPU IDLE tasks?

Postby akolodner25 » Thu Dec 15, 2022 7:31 pm

Hi! I'm using Arduino as an ESP32 component on an ESP32S3, and I'm using BLE to send a packet of around 280 bytes every 20ms to a mobile app. According to https://espressif-docs.readthedocs-host ... le-bt.html, the ESP32 can do up to 90Kbps, and that should only be around 14Kbps. But after about 5 sec, I get this error:

Code: Select all

E (49612) task_wdt: Task watchdog got triggered. The following tasks did not reset the watchdog in time:
E (49612) task_wdt:  - IDLE (CPU 0)
E (49612) task_wdt: Tasks currently running:
E (49612) task_wdt: CPU 0: BTU_TASK
E (49612) task_wdt: CPU 1: IDLE
E (49612) task_wdt: Print CPU 0 (current core) backtrace


Backtrace: 0x4208CB9A:0x3FC98990 0x40376E79:0x3FC989B0 0x400559DD:0x3FCAB500 |<-CORRUPTED
0x4208cb9a: task_wdt_isr at /Users/USERNAME/esp/esp-idf/components/esp_system/task_wdt.c:183 (discriminator 3)

0x40376e79: _xt_lowint1 at /Users/USERNAME/esp/esp-idf/components/freertos/port/xtensa/xtensa_vectors.S:1111


E (49612) task_wdt: Print CPU 1 backtrace


Backtrace: 0x4037B899:0x3FC98F90 0x40376E79:0x3FC98FB0 0x420CF14F:0x3FCF6100 0x42004276:0x3FCF6120 0x403810ED:0x3FCF6140 0x40382C05:0x3FCF6160
0x4037b899: esp_crosscore_isr at /Users/USERNAME/esp/esp-idf/components/esp_system/crosscore_int.c:92

0x40376e79: _xt_lowint1 at /Users/USERNAME/esp/esp-idf/components/freertos/port/xtensa/xtensa_vectors.S:1111

0x420cf14f: cpu_ll_waiti at /Users/USERNAME/esp/esp-idf/components/hal/esp32s3/include/hal/cpu_ll.h:182
 (inlined by) esp_pm_impl_waiti at /Users/USERNAME/esp/esp-idf/components/esp_pm/pm_impl.c:837

0x42004276: esp_vApplicationIdleHook at /Users/USERNAME/esp/esp-idf/components/esp_system/freertos_hooks.c:63

0x403810ed: prvIdleTask at /Users/USERNAME/esp/esp-idf/components/freertos/tasks.c:3987 (discriminator 1)

0x40382c05: vPortTaskWrapper at /Users/USERNAME/esp/esp-idf/components/freertos/port/xtensa/port.c:131
This repeats every few seconds. I found that I can fix the error by disabling "Watch CPU0 Idle Task" in the SDK config. However, I already have "Watch CPU1 Idle Task" disabled, because Arduino requires this (to run loopTask). Will this cause any (foreseeable) problems now that neither core has its idle task watchdog running? Alternatively, does anybody know how I can get the BLE updates to work without triggering the watchdog in the first place?

akolodner25
Posts: 27
Joined: Tue Nov 22, 2022 5:15 am

Re: BLE write triggers watchdog / Is it safe to disable watchdog on both CPU IDLE tasks?

Postby akolodner25 » Fri Dec 16, 2022 2:05 am

Found a workaround: setting the BLE task to run on the same core as the Arduino loopTask will allow it to run without a watchdog, while still ensuring that one core has a watchdog enabled

Who is online

Users browsing this forum: Majestic-12 [Bot], Nespressif and 119 guests