cancel
Showing results for 
Search instead for 
Did you mean: 

STM32F3 and IWDG activation

FFrac
Associate

Hi,

I'm currently working on a project with STM32F303RC.

I have problems with Internal watchdog. It seems to be activated every startup even if I don't enable it by the CubeMX.

Starting the application with IWDG disabled make my board to continuous reset.

If I enable IWDG and I call the HAL_IWDG_Refresh(&hiwdg); command the system works properly.

This is quite strange for me.

After some researches on this forum I tried also to modify Option bytes. If I select WDG_SW, the system works even if I don't enable and refresh IWDG.

Why does I need to change option bytes in order to let the IWDG disabled?

2 REPLIES 2
Max
ST Employee

​WDG_SW means the IWD is enabled by software inside your code. This mode give the application the flexibility to run sections of the code without having to serve the watchdog.

WDG_HW means the IWD is always enabled (by hardware) to recover from an eventual hang-up during the reset phase, before you got the possibility to activate it by software.

This makes your application more resilient to bursts of noise for example that could first generate a reset due to the BOR and then hang the CPU before the software had time to activate the watchdog again.

AvaTar
Lead

I think the question is - the OP did not initially activate the IWDG, nor ask for it.

And the issue are the ventures of Cube in making design decisions for unsuspecting users.

That's why I dropped Cube from the beginning.