Docs: FAQ entry for ESP32 task-watchdog resets - #306
Open
andrewhack wants to merge 1 commit into
Open
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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:
Plus a note for users running mqtt.loop() from a dedicated FreeRTOS task rather than the default loopTask.