Most low-power applications operate in burst mode, where the system is asleep most of the time.
I don't understand how to use a watchdog (WD) in those kinds of systems.

The perfect scenario would be to wake up periodically to reset my MCU's internal WD.
The problem: internal WDs are too energy expensive (usually more than 1uA) to use while sleeping. (Assuming a CR2032 coin cell battery as a power source).

What are the strategies to use a WD in a low power system?
Use a specialized IC?
Enable WD at wakeup?

  • \$\begingroup\$ Internal WD is simple oscilator with counter a little logic only, so it draw very close to as litle as possible. You have option to make external low power oscilator and wake according to it using some sleep active pin of MCU. \$\endgroup\$
    – user208862
    Apr 4, 2021 at 14:42
  • \$\begingroup\$ Are you looking at run-of-the-mill microcontrollers, or at specially-designed low-power microcontrollers? \$\endgroup\$
    – Hearth
    Apr 4, 2021 at 14:44
  • \$\begingroup\$ @MichalPodmanický "so it draw very close to as litle as possible" In my experience, they are rarely lower than 1uA. When they are, like for the STM8L51, the datasheet mentions typical value not tested in production. \$\endgroup\$
    – gbt
    Apr 4, 2021 at 15:03
  • \$\begingroup\$ @Hearth Specially designed. If you have any suggestion. let me know. \$\endgroup\$
    – gbt
    Apr 4, 2021 at 15:03
  • 1
    \$\begingroup\$ What is your power source? \$\endgroup\$ Apr 4, 2021 at 22:30

2 Answers 2


The watchdog has the task to monitor code execution and possibly to reset the CPU.

When the CPU is stopped, there's no reason for the watchdog to work or to be awaken.

  • 1
    \$\begingroup\$ What about a situation where a problem would trigger unwanted endless sleep? \$\endgroup\$
    – gbt
    Apr 6, 2021 at 18:46
  • \$\begingroup\$ In this case you need an external ultra low power watchdog timer like Texas Instruments TPL5010 Nano-Power System Timer With Watchdog. \$\endgroup\$ Apr 6, 2021 at 21:35

You don't say what processor you are using but I have used the WD timer in an AVR for performing the processor wake-up.

Here is a section of my code that goes to sleep to be awakened by the WD timer reset.

When the WD expires the processor is reset and wakes up, it configures the processor as with a normal reset and disables the WD (if you wish to use the WDT to monitor your code you could leave it enabled but configure it for the timing you need during execution).

After performing the required operations it enables and configures the WD timer for the required sleep time, turns off the various peripherals not needed during sleep then sets the WD timer for a later wake up. It then goes into an infinite loop (that will never execute) until the next reset.

Although a similar behaviour can be obtained using the normal timers they require that the clocks be operating and as such the quiescent current of the system is usually much higher even if using the low power internal RC clock (varies with processor).

The power consumption during sleep was about 20-30uA in my design although just the processor itself with WD timer takes about 3uA at normal temperatures. This would be about 5 or 6 years when powered from a CR2032 lithium cell.

void power_down(void){
bit_dir_inp(LED1);          // Disable LED
ADCSRA= 0;                  // Disable ADC
sleep_mode();               // Power down, wait for reset
  • \$\begingroup\$ So you're abusing the watchdog as a completely normal timer, this is not what OP asks about. Your use of the watchdog is the complete opposite, since you turn it off during the time that it's supposed to be used - guarding against logic bugs in your firmware. \$\endgroup\$
    – pipe
    Apr 4, 2021 at 22:17
  • \$\begingroup\$ @pipe - I was not using it during active operation but there is nothing stopping you using it for both purposes in the same piece of code. \$\endgroup\$ Apr 4, 2021 at 22:20
  • \$\begingroup\$ HI @KevinWhite. I'm sorry about my naive question, but I'm not sure I understand your point. Why would you only activate your watchdog in sleep and not while your application is running? Your 5 or 6 years estimate seems right to me, assuming I sleep 99% of the time and I don't do any expensive while running. \$\endgroup\$
    – gbt
    Apr 6, 2021 at 18:53
  • \$\begingroup\$ @gberth - I'm using the watchdog as the wakeup timer. I'm not using it for protection during execution. There is nothing stopping it from being used for both purposes. With the AVR I could get lower quiescent current this way rather than using a normal timer that would require the cpu clock to be running during sleep. \$\endgroup\$ Apr 6, 2021 at 18:56

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.