PacktPublishing / Internet-of-Things-with-ESP32

Developing IoT Projects with ESP32, published by Packt
MIT License
184 stars 50 forks source link

Chaper 3 - Touchpad Example. Task watch dog triggered when detecting touches #5

Open chrisjhebert1973 opened 1 year ago

chrisjhebert1973 commented 1 year ago

Build the touch pad example, also built directly from the git hub repo. issue persists in both cases.

Issue appears to be triggered by calling printf with formatted data in the monitor task. This is specifically when there's formatted data. If I remove the format specifier and other arguments, watchdog is not triggered and the output is displayed.

Environment:

HW : Espressif ESP32 Dev Module Dev Environment : VS Code + Platform IO on Max M1 Max

␛[0;31mE (25424) task_wdt: Task watchdog got triggered. The following tasks/users did not reset the watchdog in time:␛[0m ␛[0;31mE (25424) task_wdt: Tasks currently running:␛[0m ␛[0;31mE (25424) task_wdt: CPU 0: IDLE␛[0m ␛[0;31mE (25424) task_wdt: CPU 1: IDLE␛[0m

assert failed: task_wdt_isr task_wdt.c:585 (cpus_fail != 0)

Backtrace: 0x400821d2:0x3ffb0dc0 0x40085a51:0x3ffb0de0 0x4008ac95:0x3ffb0e00 0x400e58e7:0x3ffb0f20 0x400828dd:0x3ffb0f40 0x400849c3:0x3ffb5e40 0x400d3243:0x3ffb5e60 0x40086daa:0x3ffb5e80 0x40088685:0x3ffb5ea0

chrisjhebert1973 commented 1 year ago

Increasing the stack size seems to resolve the issue for me. Please can you update the source for the sample increasing the stack size of the monitor task to a higher value. I used 4096.

ozanoner commented 1 year ago

Thanks for the feedback, @chrisjhebert1973!