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!
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
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.
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.
You are perfect and clear. Solution to my problems. Respect.
4:27 Useful shortcuts: Ctrl + click - opens declaration. If you want to go back press Ctrl + W.
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.
Excelent video. Keep making this videos. They are very instructivo. Cheers from Argentina.
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!
I agreed, excellent explanation with simplest maths...
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
@@EdwinFairchild thanks, but i don't understand how to catch software faults with wwdg? U have any idea?
@@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
@@EdwinFairchild it clear now. Yes here iwdg can act like a monitoring watchdog or a spare wdg.
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.
Great job, Thank you so much.
Really useful video
in WWDG i am trying the same, but when i put a smaller delay than the window ms, it doesn't reset, do you have an idea why?
What is that calculator app? I too need a calculator app that allows for easy editing.
Bro you are the best for STM videos, Where are you living bro?
Congratulations! How can I turn off WWDG to enter StandBy?👍
In WWGD formula why use this value 4096 ? is that machine cycle value of stm32??
Hi, i want to understand the use of window value in Stm32 IWDG. This is available in HAL document
Plz watch the video. It's explained in it.
thank you
Can we set presale as 4 for 1 second delay
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
13 to 20 is the window. Outside it, the system will reset..
how +64 came in the window watchdog counter formula
It's modified from the one ST have in the reference doc.. Check that out.
@@ControllersTech Okay. How to calculate the window value for IWDG?
Common man.. just watch the video... It's what i have explained there.
and how can we observe those changes while running the code?
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.