EmbeddedRelated.com
Forums

BL2100 Watchdog Timer, Contol?

Started by "dav...@epsiloncompany.com [rabbit-semi]" March 31, 2016
Group,

Running a pretty complex program on a BL2100 (Smartcat). I know the virtual driver has the hitwd() function, but I have had several occasions where the system would lock and the watchdog timer would not generate a reset.

Any way to control this manually, etc, so I have a better idea what the watchdog is doing.

Thanks in advance, David
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