0
\$\begingroup\$

I need to implement a feature similar to that provided by the IWDG on the STM32L073RZ. The issue I'm facing is that the maximum timeout value of the IWDG is ~ 32 seconds - I need something that can work for timespans up to 24 hours.

Pouring through the datasheet isn't really helping at the moment. I'm already using the RTC to wake from Standby mode (though this feature is to prevent an issue that may occur if an RTC wakeup isn't serviced correctly so I wouldn't want to use the RTC in this situation).

Any suggestions are greatly appreciated.

\$\endgroup\$
3
  • 2
    \$\begingroup\$ You need a watchdog, for reset purposes, with a 24 hour delay? \$\endgroup\$
    – Jeroen3
    Jul 19, 2019 at 9:56
  • \$\begingroup\$ I do. The device can sit in a very low power state and wake up at very long intervals. If, for any reason, the device weren't to wake then a watchdog would do it's thing and the board would just reset. Better half a days lost data than having to send a technician to reset the device manually in a weeks time. \$\endgroup\$
    – amitchone
    Jul 19, 2019 at 13:55
  • \$\begingroup\$ I'm facing the same problem now but I would need 30 minutes of WD period. Any news? I found in several places an option byte called IWDG_STOP that can freeze the WD timer in stop mode, although I cannot find any documentation for it for the stm32l0xx familiy which lets me think that it's not available for it. Any news on the issue? \$\endgroup\$ Oct 7, 2021 at 10:19

2 Answers 2

1
\$\begingroup\$

There is no on chip functionality for a 24 hour delay watchdog. But you can use an external RTC.
You may need some edge sensitive logic that prevents the external RTC from keeping reset low.

\$\endgroup\$
2
  • \$\begingroup\$ I've been thinking along these lines, or even a monostable multivibrator along the lines of a TI CD4047B... \$\endgroup\$
    – amitchone
    Jul 19, 2019 at 14:01
  • \$\begingroup\$ @AdamMitchell Yes, but an external RTC will use less power. \$\endgroup\$
    – Jeroen3
    Jul 19, 2019 at 14:17
0
\$\begingroup\$

Reading the datasheet, I came across this:

6.3.10 Standby mode

The Standby mode allows to achieve the lowest power consumption. It is based on the Cortex®-M0+ Deepsleep mode, with the voltage regulator disabled. The VCORE domain is consequently powered off.

But then later:

25.3.4 Behavior in Stop and Standby modes

Once running, the IWDG cannot be stopped.

I assume this means IWDG will just continue when RTC wakeup event happens. I guess this might be suitable for your problem (RTC wakeup not being serviced correctly), but maybe not.

If this doesn't fit, you're probably looking for an external hardware watchdog solution.

\$\endgroup\$
2
  • \$\begingroup\$ The watchdog continues, yes, but you have to service it (and wake up to do so) more often than the asker desires. It may be possible to have a soft watchdog that feeds the hardware one but the overall goal seems dubious \$\endgroup\$ Jul 19, 2019 at 13:52
  • \$\begingroup\$ Exactly, the IWDG would have been perfect were it able to tick for much greater periods of time. I can understand that my use case is very much an edge case! \$\endgroup\$
    – amitchone
    Jul 19, 2019 at 13:57

Your Answer

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

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