On an STM32L0C8 MCU, I have the watchdog enabled while executing. At certain points in execution, I would like the chip to go into low power sleep mode. When it goes into low-power sleep mode though, the watchdog timer remains activated and will reset the entire MCU after the timer goes to 0, making it seemingly impossible to use both the watchdog and low-power sleep mode at the same time.
My question is, how do I refresh the countdown timer while in low-power sleep mode or how do I disable the WDT to stop it from resetting the MCU?
I looked all around the reference manual linked below to figure out how to disable / refresh the timer but it seems like this isn't possible. On page 514 it says:
20.3.4 Behavior in Stop and Standby modes Once running, the IWDG cannot be stopped
(IWDG being the Independent Watchdog) but it doesn't say anything about low-power sleep mode. In multiple other areas it suggests the same thing, that the IWDG can't be stopped. Am I missing something? Are we not supposed to use the watchdog if we want to go into sleep mode? Is it possible to modify the watchdog countdown timers code to stop decrementing before entering sleep mode? Please let me know!