Page 1 of 1

Disabling Watchdog

Posted: Sun Sep 03, 2023 7:57 pm
by geologic
Hi

I'm using STM32 core on a Nucleo64 board. The board is most of the time sleeping and sometimes it wakes from sleep to grab some sensors data and send it to a server.
I want to implement a watchdog only on the "wake" part of the code, and i tried the IWatchdog library. the problem is when i go to sleep i want to disable watchdog, and IWatchdog library does not seem to allow that.

1) is it possible do disable/enable watchdog on IWatchdog library?
2) do you know other watchdog library who allow that?

Thanks

Re: Disabling Watchdog

Posted: Mon Sep 04, 2023 12:54 am
by dannyf
by its very nature, a watchdog needs to be fed regularly. So a software-disable-able? watchdog is counter-intuitive.

you can fake a "watchdog" of your own with one of the timer interrupts.

Re: Disabling Watchdog

Posted: Mon Sep 04, 2023 12:47 pm
by fpiSTM
As stated in the README.md of the library:
https://github.com/stm32duino/Arduino_C ... /README.md
WARNING: Once started the IWDG timer can not be stopped. If you are planning to debug the live system, the watchdog timer may cause the system to be reset while you are stopped in the debugger. Also consider the iwatchdog timer implications if you are designing a system which puts the CPU in sleep mode.
If you do sleep mode, you have to wake up periodically to reload the IWDG, that's all.

Re: Disabling Watchdog

Posted: Mon Sep 04, 2023 3:37 pm
by geologic
I'm doing a batery operated project, i'm saving all uA i can... now i have to wake like every 20 seconds just to kick the watchdog ass... Too bad... :(

Thank's guys for your help.

Re: Disabling Watchdog

Posted: Mon Sep 04, 2023 4:03 pm
by fpiSTM
Then do not use the iwdg.