5
\$\begingroup\$

Can someone please explain how windowed watchdog timer is different from the normal watchdog timer? When is windowed watchdog timer prefferred over normal watchdog timer?

\$\endgroup\$
  • \$\begingroup\$ Where did you read about the windowed watchdog? \$\endgroup\$ – jippie Feb 13 '16 at 10:09
  • \$\begingroup\$ sorry its window watchdog. I am working on ARM processor which implements window watchddog. But I dont understand the need of implementing window watchdog. I think its enough to select a time period in which watchdog should restart. Then why to implement windows, closed and open in the watchdog. \$\endgroup\$ – xyz101 Feb 13 '16 at 10:13
8
\$\begingroup\$

So, let's start with what a watchdog is :

  1. A watchdog is basically a timer system, like a "tic-tac" bomb which is re-armed periodically during normal operation of your processor/controller. If your processor happens to be stuck during execution, it will fail to re-arm the watchdog, an the "tic-tac" bomb will be triggered. Then, the watchdog's job is to re-initialize the stuck system, or trigger an alarm, or execute specific instructions etc... So basically, a watchdog protects a system from being stuck.

  2. Now, imagine that your system is not absolutely stuck (=not executing anything), but for example, is stuck inside an infinite loop meaning it executes all the instructions inside the loop, one of which should be "re-arm the watchdog". But it is not able to exit the loop like it should be in normal operation. If you use a simple watchdog, it will be able to be re-armed at every iteration and your system will never be re-initialized and will stay stuck in this infinite loop. That's why the window watchdog exists : it protects the system against being stuck by needing periodical refresh like in 1), but it also detects when it is re-armed "too much" compared to what it knows to be the nominal system's operation. It's like a watchdog 2.0.

\$\endgroup\$
  • \$\begingroup\$ Thanks for the reply. But as you said "for example, is stuck inside an infinite loop. If you use a simple watchdog, it will be able to be re-armed at every iteration". I didn't get your this point. If my system get stuck, how come the watchdog gets rearmed at every iteration? My controller cant refresh the watch dog, so ideally system reintialisation should happen. \$\endgroup\$ – xyz101 Feb 13 '16 at 10:43
  • 1
    \$\begingroup\$ It gets stuck, but in an infinite loop, which means it executes all the instructions inside the loop, one of which should be "re-arm the watchdog". But it is not able to exit the loop like it should be. \$\endgroup\$ – MaximGi Feb 13 '16 at 10:45
  • \$\begingroup\$ Does this means that if the system gets stuck because of the infinite loop which also implements restarting of the of WDT, then it seems as if no watchdog is impemented? \$\endgroup\$ – xyz101 Feb 13 '16 at 10:52
  • \$\begingroup\$ Yes, the "simple" watchdog is useless in the case of an infinite loop, that's why the window watchdog exists \$\endgroup\$ – MaximGi Feb 13 '16 at 11:14
  • 1
    \$\begingroup\$ Yes you are right, BUT, you are assuming that your infinite loop is predicted, therefore you are protecting your system according to. Now, sometimes in can happen that a system is stuck inside an infinite loop which was NOT predicted by the designer. \$\endgroup\$ – MaximGi Feb 13 '16 at 11:25
3
\$\begingroup\$

I agree with the answer from MaximGi. Here is just an alternative wording:

  • Standard watchdog: only asserts its output when the watchdog timer overflows, not when it underflows.
  • Windowed watchdog: asserts its watchdog output if the watchdog timer overflows or underflows.

Picture below from Microchip describing a windowed watchdog: enter image description here

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.