2014-07-08 07:49 AM
Hi,
I have programmed an application that reads sensors and then enters in low-power mode (StandBy) for several hoursHow can I implement a watch dog to prevent failures during during the read operation?Best Regards, Sergio #stm32f1-wwdg-iwdg2014-07-08 09:08 AM
Going to be a bit hard given the duration, and that the part's off.
You could presumably set a secondary alarm, or use an external part to provide some redundancy.2014-07-08 11:30 AM
I'm not sure if this applies to all parts, but with the stm32f4xx you can arrange for the WWDG not to be clocked while in sleep mode.
Another approach is to use the IWDG but have your processor wake up repeatedly during the extended sleep merely to clear the watchdog (and check that it shouldn't have woken up). But you need to do this as quickly as possible and get back to sleep to minimise power consumption. I don't know what debugging environment you have, but it might be worth setting the appropriate bits in DBGMCU to allow you to keep your JTAG interface open while debugging the sleeping code. Hope this helps, Danish