2020-08-24 09:22 PM
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
Solved! Go to Solution.
2020-08-24 09:36 PM
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.
2020-08-24 09:36 PM
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.
2020-08-24 11:12 PM
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.
2020-08-25 06:06 AM
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.
2020-08-25 06:37 AM
If IWDG1RSTF is high, it means IWDG caused the last reset. Clear the flag after reading it.