Watchdog support

Marc Reilly marc at
Mon May 17 06:57:18 EDT 2010


> > Does barebox have a standard API to trigger and program a watchdog ?
> No, we do not have this atm.
> Are you looking for real watchdog support, i.e. 'reset watchdog when my
> system is in a sane state' or do you have a piece of hardware on which you
> have to reset the watchdog frequently because you can't disable it in
> software?
> For the first case I propose a 'watchdog' command with an underlying
> reset_watchdog() function which resets the watchdog.

IMHO the use of 'reset' with watchdogs is ambiguous. Typically, the primary
use is to _prevent_ the watchdog from attacking you (the system resetting),
but sometimes it is also used to _cause_ the reset, so that the system
restarts properly. (suicide and resurrection. I suck at analogies.)
So, that said, I'd suggest watchdog_ping() or watchdog_feed() as functions
for the first usage, and save watchdog_reset() for the second. (or
watchdog_trigger_reset() etc)

Just my 0.02c. In the end, I don't think I'll be the one writing it, so I
won't be the one designing it. :)

> For the latter case you don't have another choice but to scatter the code
> RESET_WATCHDOG macros like U-Boot does.

Or put it in the timer interrupt :)
That was, of course, a joke.


More information about the barebox mailing list