Power down sleep with watchdog reset

Hi,

I'm currently extending the operating time of my standalone Arduino chip, which runs on batteries, by putting it to sleep when not in use (power down sleep mode).

However, i would also like to use the watchdog in case the program locks up and needs to be reset for any reason since it is permanently powered on for months at a time.

Is this possible?

Thanks

Simple answer: yes. That’s what the watchdog is for.

Slightly less simple answer: unless the Arduino lets the watchdog know that it’s alive the watchdog will reset your Arduino, incorrectly.

So what are doing to let the watchdog know that it’s OK?

A cursory internet search revealed this article which may provide you with the information you need or at least get you to ask specific questions on how to implement the desired solution: Watchdog Information

Good luck!

Thanks for your response.

Is there any harm/ risk of issues if i do the following all in the same program:

I would like to use as little battery as possible to prolong my board’s operation time. I would also like to use the watchdog to ensure the board keeps working in case the board locks up for some reason. The board will be put to sleep when not used, but when it is sleeping, i cannot use wdt_reset(); so the Arduino board resets as a result. Should i periodically wake up, say every 4 seconds, call wdt_reset(); then go back to sleep?

Many thanks for any help

Power down turns off the "internal" timers. Those two are mutually exclusive.

Thanks

Any problems with wake up via watchdog timer, say every 4 seconds, use wdt_reset(); then go back to sleep? Then also use external interrupt to wake up.

Make certain you configure the watchdog to first generate an interrupt then reset the processor.