cancel
Showing results for 
Search instead for 
Did you mean: 

Can freertos block IWDG?

mich35
Associate III

Hello,

I am using freertos configured by STM32CubeMx.

The IWDG is activated and configured by STM32CubeMx too.

I met an issue in my code but this is not the purpose of this post.

Due to this issue the STM32L431 stays blocked indefinitly despite the IWDG is activated!

How can this be possible?

I never met such a case when using other OS.

Can freertos block IWDG?

Best regards

Mich.

3 REPLIES 3
Imen.D
ST Employee

Hello @mich35 ,

Check that no task in FreeRTOS is blocking the IWDG timeout period to refresh the IWDG periodically, as this can lead to the IWDG not being refreshed in time, causing a reset.

Once the IWDG is started, it cannot be stopped except by a reset. This means that if the IWDG is not refreshed within the timeout period, it should trigger a reset. So, It is important to ensure that the IWDG is refreshed within the timeout period by the tasks running in FreeRTOS.

You can check with a logic analyzer to see if IWDG is being run and to see how frequently it runs.

When your question is answered, please close this topic by clicking "Accept as Solution".
Thanks
Imen

Hello Imen,

How a task in FreeRTOS can block the IWDG?

When the issue occurs (a read at a bad memory address) the IWDG is never refresh so it should trig.But it does not trig.

How can this occur?

What do you mean by "You can check with a logic analyzer to see if IWDG is being run and to see how frequently it runs."?

Best regards

Mich

TDK
Guru

Nothing can block IWDG once started. FreeRTOS cannot stop IWDG.

If you forcibly hold NRST high, it will prevent a reset as that is the mechanism the chip uses to reset. That's it.

Recheck your assumptions.

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