Thankyou for making things easy, i would like to make one thing more easy to fellow viewers, In IWDG how the prescaler value is choosen?, Answer : the RL value is 12 bit, so first take and prescaler and put in the formula, if RL value is greater than 4095, then simply increase the prescaler value, until RL value is lesser than 4095.
An essential part of embedded systems is power consumption. I tried to implement IWDG on a low power application (STM32L5) where the mcu spends 99.99% of the time in standby. I only want the WDT to fire is the code gets stuck without "kicking the dog" while awake. In the Option bytes, there is the IWDG_STDBY that turns off the IWDG counter while in standby. Not only does it prevent the IWDG from firing while the STM32 is in standby, it also seems to prevent the code from running at all!
Excellent video on stm32 watchdog timers. (y) There should be a video on I2S peripheral of stm32. How it works and how we can communicate with audio devices.
i think a good case using WWDG and IWDG together is that WWDG has an interrupt which lets you do some clean up or logging before the reset actually happens, or you can all together avoid the reset and put the device in a known state or whatever you want
Wonderful! another technical youtuber here. I didn't get what you said, can you elaborate or give some reference? In the company I work some teams use this and some do not. They say wwdg is for software faults.
@@vb9950 that is correct WWDG is more for software faults but for example if what is causing the software fault is a hardware device like external sensor or something is messing up SPI and only way to fix it is to reset the system..idk just an example. you would use WWDG to catch the software part and do some clean up in the interrupt handler and eventually let the IWDG trigger so the system can reset. so you get best of both worlds , the ability to clean something up or maybe warn the user the system is about to reboot and do it gracefully
@@powerstar817 ok here is an example.. lets says you have 3 functions, function 1is doing some math, function 2 perhaps controlling a motor, and functon 3 maybe sending data to pc via UART... at the end of every function you feed the WWDG, because remember a watchdog is just a timer that you cannot let it go to zero , so you always set it back to a high value and it will start counting down... So at the end of each function you set the WWDG to a high number and everything is ok, it never reaches 0. If however one of your functions hangs/freezes then the wwdg will never get fed and thus trigger an interrupt , in this interrupt you can maybe do some housekeeping stuff before reset, or all together fix things and not trigger the reset..etc...... However when using something like an RTOS this approach will fail and this is where you would need to use both a WWDG and an IWDG , or simply the WWDG with a little more careful thinking... I can make a video on this sometime to demonstrate
And what will happens if it over maximum time. In between of 13 - 20ms it works fine. If it goes lower than 13ms wwdg gets reset. But what happens when it over the 20ms
Sorry, You have explained window Value calculation for WWDG, not for IWDG. if we enable window option for IWDG how can we calculate? For IWDG you explained only reload value.