Go Down

Topic: Watchdog in Arduino Library - or at least support by bootloader (Read 32 times) previous topic - next topic

westfw

Quote
"watchdog function in the Arduino Library that would allow processor-independent implementation of such function"

Ah.  It depends on whether that means "processor-independent within the AVR family" or "processor-independent within all CPUs that implement an arduino-like library."  Usually a watchdog is a pretty architecture-dependent thing; not all chips support the same timeouts, some have a "window" of allowed reset times, etc...
The avr-libc watchdog functions are probably OK for within the AVR family...

drjiohnsmith

question time:

so can I include a watchdog timer in arduino code,
   
it would be nice on a few bit I'm playing with,
   as I'd like the thing to look after itself, go back to a known good state
       i.e. a watch dog.

is there an example set of code that I can compile etc to try out,

bperrybap



is there an example set of code that I can compile etc to try out,


Look back 4 posts. Nick's post (reply #7) shows how to use watchdog for the AVR.

--- bill

drjiohnsmith

thanks

saw the code snippet,
   
there was some comment about the right boot loader !
     what is the right boot loader ? I use the Arduino IDE, is that the right boot loader ?

bperrybap

The bootloader is code stored in flash on the board.
The IDE can be used to burn/update the bootloader on the board
if you have a ISP programmer.

Depending on which bootloader is on the board, watchdog may or may
not work because the older bootloaders don't properly handle
restarting from a watchdog reset.

--- bill

Go Up