Skip to content

nrf52 watchdog (attempt #2)#8670

Merged
thebentern merged 2 commits into
meshtastic:developfrom
SebKuzminsky:nrf52-watchdog-take-2
Nov 20, 2025
Merged

nrf52 watchdog (attempt #2)#8670
thebentern merged 2 commits into
meshtastic:developfrom
SebKuzminsky:nrf52-watchdog-take-2

Conversation

@SebKuzminsky

Copy link
Copy Markdown
Contributor

This PR differs from the disastrous #8485 in two ways:

  • WDT now only runs while the MCU runs; the WDT is paused when the MCU is in Sleep or Halt.
  • WDT timeout is now 90 seconds instead of 2 seconds. This matches the ESP32 WDT timeout. This should fix the spurious watchdog bite during flashing.

I would appreciate a sanity test from @Xaositek and @HarukiToreda

SebKuzminsky and others added 2 commits November 18, 2025 11:52
* nrf52: add watchdog

Main thread only for now.

* bump framework-arduinoadafruitnrf52 to pick up new wdt support

* clang-format the new parts of main-nrf52.cpp

---------

Co-authored-by: Ben Meadors <benmmeadors@gmail.com>
(cherry picked from commit 8395429)
The 90 seconds wdt timeout matches the esp32 wdt timeout.
@thebentern thebentern added the enhancement New feature or request label Nov 18, 2025
@SebKuzminsky

SebKuzminsky commented Nov 18, 2025

Copy link
Copy Markdown
Contributor Author

@markusgritsch can you see if this resolves #8468 for you?
(And by "resolve" i mean it reboots by itself after 90 seconds instead of hanging forever when it has a problem.)

@HarukiToreda

Copy link
Copy Markdown
Contributor

awesome, i'll set a couple to test out

@Xaositek

Copy link
Copy Markdown
Contributor

@thebentern Let's merge this so we can test it a bit more; I do like the rework here, great job @SebKuzminsky

@thebentern thebentern merged commit 2b88064 into meshtastic:develop Nov 20, 2025
76 of 77 checks passed
@HarukiToreda

Copy link
Copy Markdown
Contributor

I've been running it with no issues at all

@Xaositek

Copy link
Copy Markdown
Contributor

Following the merge I've tested so far my Wio Tracker L1 Pro and Heltec T114; was able to change settings successfully.

@SebKuzminsky

Copy link
Copy Markdown
Contributor Author

Yay, thanks folks! :)

@FFAMax

FFAMax commented Dec 11, 2025

Copy link
Copy Markdown

On the NRF52840 Seeed XIAO, the system is functioning as expected. I am wondering if it is possible to log the reboot reason during boot, specifically if there is a mechanism in the hardware that preserves the trigger for the reboot.

@SebKuzminsky SebKuzminsky deleted the nrf52-watchdog-take-2 branch December 11, 2025 15:44
@HarukiToreda

Copy link
Copy Markdown
Contributor

I'm getting T114 nodes that are off(deep sleep) and they will randomly reboot and power on by themselves. It's very random and sometimes it can take a full day or two to do this.

@markusgritsch

Copy link
Copy Markdown

I'm getting T114 nodes that are off(deep sleep) and they will randomly reboot and power on by themselves. It's very random and sometimes it can take a full day or two to do this.

I have two T114 running 2.7.16 powered by a battery, which never sporadically reboot. They also never turn on themselves from deep sleep. Do you have anything connected to the USB connector? My devices turn themselves on from deep sleep if I connect them to power on the USB port.

@Xaositek

Copy link
Copy Markdown
Contributor

@SebKuzminsky between @HarukiToreda's comment and now #8959, do we need to investigate?

@SebKuzminsky

Copy link
Copy Markdown
Contributor Author

I think it's unlikely that @HarukiToreda's comment indicates a problem with the new watchdog, given the large and variable time. But it's not impossible.

I like @FFAMax's suggestion to somehow log/record the reboot reason, but i don't know how to do that.

#8959 is reported against 2.7.15, which does not include the nrf watchdog (but does include some other nrf deep sleep changes), so i think this also does not suggest a wdt problem. It's possible the reported version number is wrong and it's really somewhere between 2.7.15 and 2.7.16, which could potentially include the nrf watchdog, i'll ask for more info in that issue.

jeek pushed a commit to jeek/Meshtastic-Exploiteers-Hacker-Pager that referenced this pull request Jun 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants