STM32F4的窗口看门狗WWDG
2017-06-11 20:10
176 查看
不管是开发指南,中英文参考手册,还是其他啥!讲来讲去就讲些废话,不就是下面这个东西嘛,理解了下面这个根本,其他的理解都是水到渠成……
Figure 214. Watchdog blockdiagram
把这个图看懂,其他一切都搞定!
喜欢原汁原味的,不喜欢把人家(所谓英语专业翻译家们)咀嚼的再拿来嚼一嚼,不光苍白无味,而且可能还会中毒(翻译者本人可能都没理解,误导人!),所以下面直接上English!!
研究思路:
上面是解决方案啊,就是问题的答案,那么这个答案的问题是什么?就是这个东西是怎么产生的?为什么要产生这个东西?咱们放一放,后来再讲!
1解决方案,答案,解说:
1.1理解两句话:《STM32F4xx英文参考手册》中22.1的WWDG
introduction
1.1.1先来看第一句话:
The watchdog circuit generatesan MCU reset on expiry of a programmed time period, unless the programrefreshes the contents of the downcounter before the T6 bit becomes
cleared.
先看懂俩符号:
上面的logic gates来自《Digital Design and Computer Architecture》
再看下面窗口看门狗的数字电路:
Figure 214. Watchdog blockdiagram
只要T6位(注意这个T6位是7-bit downcounter最高位)为0,而且在窗口看门狗WWDG的WDGA位使能情况下,Reset输出为1
1.1.2好,再看第二句话:
An MCU reset is also generatedif the 7-bit downcounter value (in the control register) is refreshed beforethe downcounter has reached the window register value.
再看下面数字电路:
Figure 214. Watchdog block diagram
the downcounter has reached thewindow register value
the comparator输出为1
WDGA为1
自然RESET输出为1
1.2使能WWDG后,Programmable
free-running downcounter
1.3Early wakeup interrupt (EWI): triggered (if enabled and the watchdogactivated) when the downcounter
is equal to 0x40.
在T6位马上要减少到0时,果断early出发中断去“喂狗”:
1.4程序的思路就是按照上面“Figure 214. Watchdog block diagram”,理解了整个“解决方案”的运行过程了。根本不需要死记硬背!说不定还能提出自己的解决方案!自己设计数字电路!!!这就是创新那!!
2解决的问题解说:
The window watchdog is used to detect the occurrenceof a software fault, usually generated by external interference or byunforeseen
logical conditions, which causes the application program to abandonits normal sequence.
总之,一句话,程序如果是正常运行的,就可以定期去报到:我很正常。除非除了什么意外:被别人揍晕(external interference)或者自己把自己搞晕(unforeseen
logical conditions),在规定时间没能去报到,那就复位reset!
感觉不错文章:
《STM32菜鸟成长记录---窗口看门狗》点击打开链接
Figure 214. Watchdog blockdiagram
把这个图看懂,其他一切都搞定!
喜欢原汁原味的,不喜欢把人家(所谓英语专业翻译家们)咀嚼的再拿来嚼一嚼,不光苍白无味,而且可能还会中毒(翻译者本人可能都没理解,误导人!),所以下面直接上English!!
研究思路:
上面是解决方案啊,就是问题的答案,那么这个答案的问题是什么?就是这个东西是怎么产生的?为什么要产生这个东西?咱们放一放,后来再讲!
1解决方案,答案,解说:
1.1理解两句话:《STM32F4xx英文参考手册》中22.1的WWDG
introduction
1.1.1先来看第一句话:
The watchdog circuit generatesan MCU reset on expiry of a programmed time period, unless the programrefreshes the contents of the downcounter before the T6 bit becomes
cleared.
先看懂俩符号:
上面的logic gates来自《Digital Design and Computer Architecture》
再看下面窗口看门狗的数字电路:
Figure 214. Watchdog blockdiagram
只要T6位(注意这个T6位是7-bit downcounter最高位)为0,而且在窗口看门狗WWDG的WDGA位使能情况下,Reset输出为1
1.1.2好,再看第二句话:
An MCU reset is also generatedif the 7-bit downcounter value (in the control register) is refreshed beforethe downcounter has reached the window register value.
再看下面数字电路:
Figure 214. Watchdog block diagram
the downcounter has reached thewindow register value
the comparator输出为1
WDGA为1
自然RESET输出为1
1.2使能WWDG后,Programmable
free-running downcounter
1.3Early wakeup interrupt (EWI): triggered (if enabled and the watchdogactivated) when the downcounter
is equal to 0x40.
在T6位马上要减少到0时,果断early出发中断去“喂狗”:
1.4程序的思路就是按照上面“Figure 214. Watchdog block diagram”,理解了整个“解决方案”的运行过程了。根本不需要死记硬背!说不定还能提出自己的解决方案!自己设计数字电路!!!这就是创新那!!
2解决的问题解说:
The window watchdog is used to detect the occurrenceof a software fault, usually generated by external interference or byunforeseen
logical conditions, which causes the application program to abandonits normal sequence.
总之,一句话,程序如果是正常运行的,就可以定期去报到:我很正常。除非除了什么意外:被别人揍晕(external interference)或者自己把自己搞晕(unforeseen
logical conditions),在规定时间没能去报到,那就复位reset!
感觉不错文章:
《STM32菜鸟成长记录---窗口看门狗》点击打开链接
相关文章推荐
- STM32F4 窗口看门狗WWDG【使用库函数】
- STM32F4 窗口看门狗WWDG【使用库函数】
- stm32F4系列MCU,窗口看门狗 WWDG中的bug
- 窗口看门狗(WWDG):神舟IV实验
- stm32 窗口看门狗 WWDG
- 嵌入式(九)窗口看门狗-WWDG
- STM32窗口看门狗_原子战舰WWDG例程学习笔记
- WWDG—窗口看门狗
- cortex_m3_stm32嵌入式学习笔记(六):窗口看门狗实验(WWDG)
- STM32F4——独立看门狗与窗口看门狗
- STM32F103ZE单片机在WWDG窗口看门狗的EWI中断中喂狗导致系统复位的原因及解决办法(中断函数重入问题)
- stm8的独立看门狗与窗口看门狗
- STM32 独立看门狗IWDG 与窗口看门狗WWDG
- stm32 独立看门狗和窗口看门狗区别
- STM32之看门狗(独立与窗口)
- STM32之窗口看门狗例程
- 32单片机学习之窗口看门狗
- stm32的窗口看门狗的一点发现
- STM32学习-理解窗口看门狗
- STM8s窗口看门狗