Skip to content

Docs: FAQ entry for ESP32 task-watchdog resets - #306

Open
andrewhack wants to merge 1 commit into
dawidchyrzynski:mainfrom
andrewhack:docs/esp32-watchdog-faq
Open

Docs: FAQ entry for ESP32 task-watchdog resets#306
andrewhack wants to merge 1 commit into
dawidchyrzynski:mainfrom
andrewhack:docs/esp32-watchdog-faq

Conversation

@andrewhack

Copy link
Copy Markdown

On Arduino-ESP32 the default loopTask is watched by the Task Watchdog Timer. A WiFi drop inside HAMqtt::loop() can leave PubSubClient blocked in reconnect for longer than the 5s default TWDT timeout, triggering the "task_wdt: loopTask did not reset" panic.

Adds a FAQ with four mitigations, in preference order:

  1. Gate mqtt.loop() on WiFi.status() == WL_CONNECTED (recommended)
  2. esp_task_wdt_reset() around mqtt.loop()
  3. Raise the TWDT timeout via esp_task_wdt_reconfigure()
  4. esp_task_wdt_delete(NULL) (removes coverage — last resort)

Plus a note for users running mqtt.loop() from a dedicated FreeRTOS task rather than the default loopTask.

On Arduino-ESP32 the default loopTask is watched by the Task Watchdog
Timer. A WiFi drop inside HAMqtt::loop() can leave PubSubClient blocked
in reconnect for longer than the 5s default TWDT timeout, triggering
the "task_wdt: loopTask did not reset" panic.

Adds a FAQ with four mitigations, in preference order:
1. Gate mqtt.loop() on WiFi.status() == WL_CONNECTED (recommended)
2. esp_task_wdt_reset() around mqtt.loop()
3. Raise the TWDT timeout via esp_task_wdt_reconfigure()
4. esp_task_wdt_delete(NULL) (removes coverage — last resort)

Plus a note for users running mqtt.loop() from a dedicated FreeRTOS
task rather than the default loopTask.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant