cancel
Showing results for 
Search instead for 
Did you mean: 

Disable STM32F103 Independant Watchdog

gada
Associate III
Posted on October 19, 2015 at 11:01

Hello,

In one of our projects we have implemented IWDG (independant watchdog). There is a condition in the software that when the power supply fails, the controller STM32F103(Powered By Rechargeable Battery) puts itself in deep power down mode. 

In the power down mode the IWDG resets the controller. I do not want this to happen. In power down the watchdog should not reset the controller.

What can be the solution for this?

Thanks

#stm32-watchdog-system-reset
4 REPLIES 4
Danish1
Lead II
Posted on October 19, 2015 at 11:41

According to the reference manual, once the IWDG is started it cannot be stopped except by a Reset.

You could intentionally cause a Reset, and on starting from reset have a test that checks if the power supply has failed. If so it just goes into deep sleep rather than starting execution normally.

Hope this helps,

Danish

AvaTar
Lead
Posted on October 19, 2015 at 12:09

To state it differently, the concept of watchdogs is incompatible with power-down.

Write a signature to RAM, let the IWDG reset happen, and then go from reset to power-down without initializing the IWDG if this signature is present.

Lynn Linse
Associate III
Posted on December 15, 2016 at 22:24

No, IWDG can be made compatible with STOP mode. Per the STM manuals there is something called the IWDG_STOP bit in the FLASH_OPTR register, which (if set) freezes the IWDG during stop. I'm actually digging through the forum looking for more explanation of what this means!

Jon Green
Associate II
Posted on October 27, 2017 at 16:46

This is bugging me, too. My best solution at present (on the STM32L100 series*) is to set the IWDG to as long a timeout as possible, drop to lowest possible clock rate. and have the RTC periodic timer event wake up the processor once in a blue moon from a Standby WFE, just to kick the dog and go back to sleep. This should use so little power so rarely that it's as good as noise in the overall consumption.

(* which don't have an IWDG_STOP bit, except DBG_IWDG_STOP, which appears to apply solely to the debugger)