With such a long max timeout, could we add an option to keep the watchdog active during sleep?Maybe something like:
Watchdog.init(WatchdogConfiguration().timeout(180s).sleepMode(True);
By default this could be false so if someone doesn't explicitly add it, it'll disable it like it is now but I personally would like to keep it enabled during sleep. It makes it more of a broader "catch all". For example, maybe somehow the sleep duration was set wrong or something else happened that it wasn't falling asleep properly or waking up from sleep properly. What do you think?
I'd love to continue to use the AB1805 watchdog for the short term duration hardware watchdog (i.e. 124 seconds) but then would use this watchdog as a "cloud side" watchdog. With a max duration of over 2 hours or even much longer for the nRF52840, I'd like to keep it enabled all the time even during sleep modes and pet it only during an ACK of a publish event OR possibly a dedicated Particle.Function(). I'd have my backend that processes webbooks from a device (Python + SQL). It would keep track of when the watchdog was last pet and then call a Particle.Function() to pet the watchdog maybe once per hour? I'd have no problem at all burning 24 data operations a day/device for this extra cloud side watchdog functionality. If I needed could do every 2 hours even.
Generally speaking, my customers are "OK" with an occasional hang up for 1-2 hours but it's a pain in the butt if they have to travel to the site to give it a hard power off. I've had a few scenarios where the device was "connected". I could ping it, I could push new firmware to it, but it stopped sending data out and it was unable to process Particle functions. The AB1805 wasn't resetting it so it's like user application firmware was running but was still locked up somehow. This would be the catch all for that edge case issue.