cancel
Showing results for 
Search instead for 
Did you mean: 

Check watchdog status ?

srikanth
Associate III

hi ,

Actually i am using STM32h750 controller. In this i want to know that ,is watchdog expiry occurred / not while main program is in running.

After initializing the IWDG the 26 bit in RCC_RSR register is going to set.

So how i know by watchdog controller is going to restart. which register i need to check

thank you

regards

srikanth

1 ACCEPTED SOLUTION

Accepted Solutions
TDK
Guru

The IWDG resets the chip when its counter reaches 0. You cannot read the current value, you can only reset it to the reload value.

The IWDG doesn't have an early wake up interrupt so you can't get an early indication that a reset will occur. You can only check the IWDG1RSTF bit to see if it was the reason for the reset.

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

View solution in original post

4 REPLIES 4
TDK
Guru

The IWDG resets the chip when its counter reaches 0. You cannot read the current value, you can only reset it to the reload value.

The IWDG doesn't have an early wake up interrupt so you can't get an early indication that a reset will occur. You can only check the IWDG1RSTF bit to see if it was the reason for the reset.

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

thank you for replay,

At time of MX_IWDG1_Init() initialize IWDG1RSTF bit is going to high. This time how would i know restart reason.

Perhaps you could use a regular TIM in an equivalent mode, and capture the currently executing code location.

Single step debugging probably not going to work. Check options to stop TIM, etc.​

A​ periodic interrupt could perhaps store return addresses in a list so you could identify blocking code.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
TDK
Guru

If IWDG1RSTF is high, it means IWDG caused the last reset. Clear the flag after reading it.

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