Nice explanation, very clear. If you want more than 8-10 seconds you can roll your own watchdog by counting down a global variable in a core-1 routine and resetting it in your main core-0 routine. If the count gets to zero in core-1, do a reset. It’s not as bulletproof as the hardware WDT but it works. Also this version can be turned off on normal program exit. The hardware WDT can’t be stopped once stated. (By design I guess)
Fantastic video, Kevin. Saved from mucking around with uasyncio, which seems to be a painful alternative. Extra credit for throwing in the video of your dog ;)
Hi, great video. What is the impact of starting a watchdog timer and then putting the pico into deepsleep until. a button is pressed? Would the watchdog timer kick in and reset even if in deepsleep or would it pause while in deep sleep?
Great question Dave - the pico wouldn't know a button is being pressed whilst in deep sleep; you'd need extra external circuitry for that - take a look at how Pimoroni achieves this with the Enviro range.
Good question, I came here wondering the same, not regards a button, but just how the WDT and deepsleep react to one another, does the deepsleep stop the WDT or not? My project does a little work-load, then sleeps for 2mins and repeats. Works reliably for 5-6 days and then fails. I'll keep looking.
Nice explanation, very clear.
If you want more than 8-10 seconds you can roll your own watchdog by counting down a global variable in a core-1 routine and resetting it in your main core-0 routine.
If the count gets to zero in core-1, do a reset. It’s not as bulletproof as the hardware WDT but it works.
Also this version can be turned off on normal program exit. The hardware WDT can’t be stopped once stated. (By design I guess)
Fantastic video, Kevin. Saved from mucking around with uasyncio, which seems to be a painful alternative. Extra credit for throwing in the video of your dog ;)
Thanks Kevin for this great tip of the day 👍
Thanks, Pierre-yves!
The maximum timeout is 8.4 secs ( or to be exact, 0x7fffff millisec, 8.388607 sec)
Hi, great video. What is the impact of starting a watchdog timer and then putting the pico into deepsleep until. a button is pressed? Would the watchdog timer kick in and reset even if in deepsleep or would it pause while in deep sleep?
Great question Dave - the pico wouldn't know a button is being pressed whilst in deep sleep; you'd need extra external circuitry for that - take a look at how Pimoroni achieves this with the Enviro range.
Good question, I came here wondering the same, not regards a button, but just how the WDT and deepsleep react to one another, does the deepsleep stop the WDT or not? My project does a little work-load, then sleeps for 2mins and repeats. Works reliably for 5-6 days and then fails. I'll keep looking.
@@ashleycawley5816 have you looked at logging the state to a log file (using something like Phew!) to make troubleshooting easier.
Am I the only person who watched this hoping it was going to be something to do with the actual dog? 🤣