Skip to main content
Associate II
February 12, 2026
Question

Independent watchdog cant be stopped at standby Mode at STM32H735IGK

  • February 12, 2026
  • 2 replies
  • 266 views

I am using software Independent watchdog at STM32H735IGK and i want to freeze it when entering standby mode.

I set option byte FW_IWDG_SDBY unchecked but unfortunately it is not working and my program keeps getting out from standby mode.

My code:

At init:

MX_IWDG1_Init();

 

While the program is running:

__HAL_IWDG_RELOAD_COUNTER(hiwdg);

 

When entering standby:

 
HAL_RTCEx_DeactivateWakeUpTimer(&hrtc);
HAL_PWREx_ClearWakeupFlag (PWR_WAKEUP_FLAG_ALL);
__HAL_PWR_CLEAR_FLAG(PWR_FLAG_WU);
__HAL_PWR_CLEAR_WAKEUPFLAG(PWR_FLAG_WKUP1); // E1
__HAL_PWR_CLEAR_WAKEUPFLAG(PWR_FLAG_WKUP4); // INT

//Configuring wakeup pins
PWREx_WakeupPinTypeDef sWakeupPin1;
sWakeupPin1.WakeUpPin = PWR_WAKEUP_PIN1;
sWakeupPin1.PinPolarity = PWR_PIN_POLARITY_LOW; // Flanco de bajada
sWakeupPin1.PinPull = PWR_PIN_PULL_UP;
HAL_PWREx_EnableWakeUpPin(&sWakeupPin1);
PWREx_WakeupPinTypeDef sWakeupPin4;
sWakeupPin4.WakeUpPin = PWR_WAKEUP_PIN4;
sWakeupPin4.PinPolarity = PWR_PIN_POLARITY_LOW; // Flanco de bajada
sWakeupPin4.PinPull = PWR_PIN_PULL_UP;
HAL_PWREx_EnableWakeUpPin(&sWakeupPin4);

__DSB();
__ISB();

HAL_RTCEx_SetWakeUpTimer_IT(&hrtc, 0xFFFF,RTC_WAKEUPCLOCK_RTCCLK_DIV16);

HAL_PWR_EnterSTANDBYMode();
	

 

Option bytes seen at Cube Programmer:

amartin_0-1770905782294.png

 

Thanks by advance!

2 replies

Technical Moderator
February 13, 2026

Hello @amartin 
To prevent the IWDG from resetting the MCU while it is in Standby, you need to enable (check) the FZ_IWDG_SDBY option byte. The IWDG will be frozen both in STOP (already done via FZ_IWDG_STOP) and in STANDBY, so the device will only exit Standby due to the RTC wakeup timer or the configured wakeup pins, not because of the watchdog.

"To give better visibility on the answered topics, please click on ""Accept as Solution"" on the reply which solved your issue or answered your question.Saket_Om"
amartinAuthor
Associate II
February 13, 2026

Hi, @Saket_Om 

At CubeProgrammer it says: "Unchecked: independet watchdog is freezed in STANDBY mode. Checked: Independent watchdog is running in STANDBY mode".

I want the independent watchdog to be freezed at standby mode.

 

I have checked corresponding reg and it is set to 0 which acoording to RefManual:
"Bit 18 IWDG_FZ_SDBY: IWDG Standby mode freeze option status bit
When set the independent watchdog IWDG1 is frozen in system Standby mode.
0: Independent watchdog frozen in Standby mode
1: Independent watchdog keep running in Standby mode."

 

amartin_0-1770981698719.png

Thanks for your answer

 

Technical Moderator
February 13, 2026

Hello @amartin 

Could you also try suspending the SysTick before entering Standby mode?
For example:

HAL_SuspendTick();
HAL_PWR_EnterSTANDBYMode();

 

"To give better visibility on the answered topics, please click on ""Accept as Solution"" on the reply which solved your issue or answered your question.Saket_Om"
TDK
Super User
February 16, 2026

> I set option byte FW_IWDG_SDBY unchecked but unfortunately it is not working and my program keeps getting out from standby mode.

What do you mean by "my program keeps getting out from standby mode"? How are you observing that exactly?

"If you feel a post has answered your question, please click ""Accept as Solution""."
amartinAuthor
Associate II
February 16, 2026

After executing

HAL_PWR_EnterSTANDBYMode();

When the watchdog time ends (in my case ~8sec), the program resets and i observe at RCC->RSR that the flag RCC_FLAG_WWDG1RST is set.

 

 

TDK
Super User
February 16, 2026

> When the watchdog time ends (in my case ~8sec), the program resets and i observe at RCC->RSR that the flag RCC_FLAG_WWDG1RST is set.

That is so much clearer, thank you.

WWDG1 is independent from the IWDG1. If WWDG1 is resetting the chip, this has nothing to do with the IWDG1 configuration.

But I suspect that's a typo, in which case:

 

If you can produce and upload a minimal working example that does this, I will try to duplicate here. What you are trying to do should be possible.

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