質問

what is the difference between hardware watchdog and software watchdog ?

役に立ちましたか?

解決 2

HW watchdog resets the system automatically, if the shutdown is not (periodically) prevented by software; SW watchdog OTOH can do something only, when given CPU time. Thus it must periodically check if the system needs to be reset and respond to that by programming HW.

The end result is that a SW watchdog can fail to respond to total system crash.

Typical programming models of those are:

HW watchdog:   [HW circuit]  <-- [low priority timer interrupt postponing reset]
--
vs.
--
SW watchdog:   [Low priority SW process feeding SW Watchdog]
           +   [High priority SW process requiring "food"]

他のヒント

A hardware watchdog is hardware. Software watchdog is software. For a hardware watchdog, there is hardware that if it is not kicked often enough will assume the software has hung and will reset the system usually or whatever the design dictates. The hardware is assumed to be more reliable than the software. For a software watchdog, one software task/thread/whatever is assumed to be more reliable than another, if the questionable code fails to kick the reliable code then the reliable code kills the questionable code (or whatever the design dictates). There is a problem if the questionable code fails due to hardware which could take down all of the code including the software watchdog. So a software watchdog is only useful if you have the watchdog running in such a way that it is more reliable than the task in question, for example it may be there to prevent a task from wandering out of its memory space and getting a protection fault (which you could have just watched for in a fault handler rather than setup a watchdog, but anyway)...

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top