how to test watchdog in practice it's really sparking
Posted: Wed Feb 21, 2018 1:40 pm
so I have programmed watchdog to make RESET if my program falls down ...
But I'm asking how I can test in practice it really works ?
all the best for you all !
Joined: 11 Mar 2010 Posts: 13977
Posted: Wed Feb 21, 2018 1:47 pm
Just do something that doesn't reset the watchdog.
If you just sit is a loop that never exits, the only way 'out' will be the watchdog.
Beware though. Using the watchdog properly is a lot more complex than most people realise. You need to design you code to only reset it, if everything is working right. Work out how often you will reach the point where you reset it, then look at the data sheet and work out what watchdog time is the closest fit above this _in all cases_. The caveat here is that many chips have a watchdog timer that gives an enormous time range. So the nominal '18mSec' for some chips actually gives a time between 7mSec and 28mSec. You'd have to ensure your reset always occurs in less than 7mSec on such a chip....
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum