[En-Nut-Discussion] Watchdog Debugging
Nathan Moore
nategoose at gmail.com
Wed Sep 24 19:13:50 CEST 2008
On Wed, Sep 24, 2008 at 12:15 PM, Bernard Fouché <bernard.fouche at kuantic.com
> wrote:
> Timothy M. De Baillie wrote:
> >
> > Any thoughts or improvements out there in the ether?
> >
> What about:
>
> - with a configuration option, remove usage of the hardware watchdog and
> provide a software one, based on a available timer/counter. When the
> counter reaches its max value, an interrupt is fired. One must choose a
> max value that makes the timer/counter with a timing equals to the real
> watchdog (or the closest possible).
>
> - the function to reset the hardware watchdog then just reset the
> timer/counter.
>
> - the interrupt fired when the counter reaches its max value can write
> information to EEPROMs, banked RAM, on the serial port, etc.
>
Just keep in mind that if a hang-up happens within an ISR or critical
section
this method won't catch it.
NutEnterCritical();
for(i = 0; (i = 4); i++) {
f(i);
}
NutExitCritical();
Nathan
More information about the En-Nut-Discussion
mailing list