Repository navigation
ESP32_GENERIC_S3: raise INT_WDT timeout 300→1000 ms + pin brownout ON (fluispotter #44) - #1
Merged
Merged
Conversation
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.
What
ports/esp32/boards/ESP32_GENERIC_S3/sdkconfig.board:CONFIG_ESP_INT_WDT_TIMEOUT_MS=1000(was the IDF default 300 ms)CONFIG_ESP_BROWNOUT_DET=y+CONFIG_ESP_BROWNOUT_DET_LVL_SEL_7=y(pin thebrownout detector ON explicitly — this is already the IDF default level 7,
made explicit so it can't drift)
Why
The Fluispotter device had intermittent mid-session reboots
(
machine.reset_cause()==WDT/ code 3, ~8.5% per dose). Bench forensics(fluispotter/fluispotter-firmware issue micropython#44):
stage-0 = system reset); RTC WDT and TG0 WDT are disabled, and no user
machine.WDTis created.machine.disable_irq()+ 800 ms busy-wait → resetcause 3. So the reboots are the IWDT firing on a transient >300 ms
interrupts-off window in the WiFi/lightsleep path.
os.sync~33 µs even with a60 KB WiFi POST in flight; the real lightsleep path (WiFi assoc + EXT1 hall
wake + lightsleep + WiFi TX) survived 40/40; the pump motor draws
~20-30 mA vs ~300 mA WiFi+CPU (not a power sag; and it's the interrupt
watchdog, not a brownout).
3× margin (1000 ms) absorbs the transient; the watchdog stays enabled. The ULP
coprocessor regulates the pumps independently of CPU interrupts, so a longer
interrupt watchdog does not weaken pump safety. Value tunable (500–1000 ms).
The explicit brownout pin is a medical-device safety default.
Verify after flashing
machine.disable_irq()+ 500 ms → now SURVIVES (was a reset at the 300 msdefault); + 1200 ms → still resets. Confirms the new timeout.
from the WDT (code 3) interrupt-timing reboots this fixes.
🤖 Generated with Claude Code