cancel
Showing results for 
Search instead for 
Did you mean: 

How to Enable/Disable Watchdog During Sleep Without Reset on STM32

vijayrakesh
Associate II

Hello STM32 community,

I’m working on a project where I need to temporarily disable/enable the watchdog before entering into low-power/sleep modes, but I want to avoid resetting the MCU.

Here’s the context:

  • I’m using an STM32U385 MCU

  • I know that watchdog configuration can be changed via option bytes, but changes only take effect after a reset.

  • In my scenario, performing a reset is not acceptable because I need the MCU to resume execution seamlessly after sleep.

Problem:

  • The Independent Watchdog (IWDG) starts automatically once configured and cannot be stopped at runtime.

  • I want to enter sleep modes (like Stop or Standby) without being reset by the watchdog, but also in some scenarios watchdog needs to be run in sleep modes.

What I’ve considered:

  • Using HAL FLASH option bytes to set IWDG to software mode — works, but requires a reset.

Question for the community:

  1. Is there a hardware-supported way to enable/disable the IWDG during sleep without resetting the MCU?

Any insights, examples, or best practices would be greatly appreciated.

Thanks in advance!

1 REPLY 1
TDK
Super User

> Is there a hardware-supported way to enable/disable the IWDG during sleep without resetting the MCU?

No (apart from option bytes).

If you feel a post has answered your question, please click "Accept as Solution".