Notice. New forum software under development. It's going to miss a few functions and look a bit ugly for a while, but I'm working on it full time now as the old forum was too unstable. Couple days, all good. If you notice any issues, please contact me.
OA47 Guru Joined: 11/04/2012 Location: AustraliaPosts: 1013
Posted: 10:15pm 03 Jul 2022
Copy link to clipboard
Print this post
Whilst editing a program on the VGA version of the Pi Pico it seems that when the program stops on an error the watchdog timer is not stopped so often the program will restart before I can diagnose or edit the offending code.
It is just a nuisance as I can disable the watchdog before testing (if I remember)
OA47
pwillard Guru Joined: 07/06/2022 Location: United StatesPosts: 324
Posted: 10:41pm 03 Jul 2022
Copy link to clipboard
Print this post
Silly computers... they take everything so literally.
Grogster Admin Group Joined: 31/12/2012 Location: New ZealandPosts: 9757
Posted: 12:15am 04 Jul 2022
Copy link to clipboard
Print this post
That is by design. It is so the watchdog will reboot the system if the code falls over to the command-prompt for some reason.
I tend to write my code with the watchdog commands where I want them, but comment them out while testing the code to prevent this from happening.
Or just use WATCHDOG OFF as you hint at when the code stops.
Watchdog should only be enabled once you have fully written and tested your code, otherwise it probably WILL annoy you like this. Smoke makes things work. When the smoke gets out, it stops!
CaptainBoing Guru Joined: 07/09/2016 Location: United KingdomPosts: 2171
Posted: 09:07am 04 Jul 2022
Copy link to clipboard
Print this post
morning Graeme
Imagine you aren't sat there debugging (the 'mite generally has no way of telling it isn't doing it's job in anger).......... the 'mite has done exactly what it should to make a tough solution.
for debugging I always have the watchdog turned off for precisely the reason you are finding.