Re: BL2100 Watchdog Timer, Contol?

"[email protected] [rabbit-semi]" <[email protected]> 31 Mar 2016 06:46:26 -0700
Newsgroups gmane.comp.hardware.rabbit-semiconductor
Message-ID <[email protected]>
Hi David,

Following is based on my (limited) experience with watchdogs.

In itself, a watchdog doesn't protect you against a program entering a bad state. For instance in a program like:

while (1)
{
  costate {
     run_prog ();
  }
  costate {
      hitWd(1);
  }
}

the watchdog protects you against a program who ran amok and got stuck in a tight loop. It doesn't protect you against run_prog becoming stuck in an bad state and board becoming unresponsive. For instance if rung_prog contains something like:

  waitfor (never_happens());

the wathdog will never trigger a reset.  

At a very minimum I do check for some software reset button in the same costate as the watchdog hitting. That allows user a way out (apart from old power cycling).

That is probably the reason why Rabbit multiplexed the hardware watchdog and created many software ones. My advice would be to place one such virtual watchdog in any loop you consider critical.

Mircea