4 ms·
I’m not best qualified to answer, but some processors can have a watchdog timer that has to be reset by your software every so often otherwise within a set inte
by willyt 6y ago
I’m not best qualified to answer, but some processors can have a watchdog timer that has to be reset by your software every so often otherwise within a set interval otherwise the chip resets. This works like a ‘deadmans handle’ that can be used to detect when your code has hung and will perform a hardware reset, so you’re system can return to a known good state. Might be something like that?
- RogerL 6y agoIt's dead common in embedded software, such as avionics. Every task needs a watchdog timer. Basically you 'ping' the timer every so often, which resets it to (say) 1 second (or whatever makes sense for your task) Then it counts down. If it reaches zero, meaning one second has passed since it was reset it will trigger an interrupt. You of course design your system so that your task trips it every 500 ms (say). You don't ever want that watchdog to expire. But, being human, we write infinite loops, or code that takes 'too long' to run. And so when the watchdog triggers the interrupt that is a signal that you have some kind of sw or possibly hardware issue. You shut down or restart that task, and/or do other remedial actions, like alert the pilot in human manned airframes. You of course have to be very thorough in your design here, as this is your last chance to react to these errors.