Grogster
 Admin Group
 Joined: 31/12/2012 Location: New ZealandPosts: 9841 |
| Posted: 04:13am 07 Oct 2025 |
|
|
|
That's a clever idea!
I have discovered that neither the HW watchdog, or the software one work if you slow the CPU clock down to 48000 - this is a problem.
Test code is in this image, but I set the software watchdog to 8000, then force a crash/bug via a divide-by-zero command. The PM never restarts, with either the software OR hardware watchdog command. It just sits there forever, and I can come back minutes later, and still access the console - but the watchdog is NOT firing(either type) with the CPU clock speed set to 48000.

EDIT: OK, Watchdog IS working if I replace the divide-by-zero command, with a simple DO:LOOP - that done, both the HW and the software watchdog work. Both at the default CPU speed, and also at 48000.
But I thought that the watchdog was ALSO supposed to kick the CPU, if there was a bug in the code(such as my divide error) that dropped the code back to the command prompt?
That's the kind of error I need to trap - if the code runs into an error and drops back to the command prompt for whatever reason. Edited 2025-10-07 14:27 by Grogster |