你的浏览器版本过低,可能导致网站不能正常访问!
为了你能正常使用网站功能,请使用这些浏览器。

stm32f0 wwdog problem

[复制链接]
hellonsn 提问时间:2018-7-24 16:24 /
WWDG HAS an EWI (early wakeup interrupt) that we can use ? the question is can we refresh the downcounter in the EWI interrupt handler function to avoid system reset ??
I tried to do it ,but seems it doesn't work , and after the interrupt , the WWDG triggerred a system reset even the downcounter has been refreshed in the interrtupt handler.
So could anyone give some advice on that situation?? thanks a lot.  

收藏 评论10 发布时间:2018-7-24 16:24

举报

10个回答
toofree 回答时间:2018-7-24 17:28:01
窗口看门狗,只有在红框时间内,才允许刷新看门狗寄存器(即喂狗),其余时间是不允许喂狗的。一旦达到T6时间,仍然没有喂狗的话,将产生复位。


傲游截图20180724172006.png

评分

参与人数 1蝴蝶豆 +4 收起 理由
zero99 + 4

查看全部评分

zwjchinayids 回答时间:2018-7-24 18:00:38
hello! WWDG 是有区间的,你必须在时间段内喂狗   早了和晚了都会复位的,so你要获取 当前时间进行对比
.sorry   I Cann't English ,I'm from  China

评分

参与人数 1蝴蝶豆 +3 收起 理由
zero99 + 3

查看全部评分

zwjchinayids 回答时间:2018-7-24 18:02:09
zwjchinayids 发表于 2018-7-24 18:00
hello! WWDG 是有区间的,你必须在时间段内喂狗   早了和晚了都会复位的,so你要获取 当前时间进行对比
.s ...

建议您先看下IWDG  后进行比较
hellonsn 回答时间:2018-7-25 07:36:17
zwjchinayids 发表于 2018-7-24 18:00
hello! WWDG 是有区间的,你必须在时间段内喂狗   早了和晚了都会复位的,so你要获取 当前时间进行对比
.s ...

hello,  I set the window value = 0x7f , which is the max value , and set T[0-6] = 0X7F as well , when the counter reaches 0x40 , triggering a EWI interrupt, my question is in the EWI interrupt handler , is it possible to refresh the T counter ?
thanks.
hellonsn 回答时间:2018-7-25 07:36:46
toofree 发表于 2018-7-24 17:28
窗口看门狗,只有在红框时间内,才允许刷新看门狗寄存器(即喂狗),其余时间是不允许喂狗的。一旦达到T6时 ...

hello,  I set the window value = 0x7f , which is the max value , and set T[0-6] = 0X7F as well , when the counter reaches 0x40 , triggering a EWI interrupt, my question is in the EWI interrupt handler , is it possible to refresh the T counter ?
thanks.
hellonsn 回答时间:2018-7-25 09:08:28
From the user reference , we can see that:

In some applications, the EWI interrupt can be used to manage a software system check
and/or system recovery/graceful degradation, without generating a WWDG reset. In this
case, the corresponding interrupt service routine (ISR) should reload the WWDG counter to avoid the WWDG reset, then trigger the required actions.

But when I reload the WWDG counter , a system reset happened after the interrupt.

回答时间:2018-7-25 09:24:30
本帖最后由 安 于 2018-7-25 09:35 编辑
hellonsn 发表于 2018-7-25 09:08
From the user reference , we can see that:

In some applications, the EWI interrupt can be used to  ...

hello,I want to see your code how to used.for example: main.zip (2.05 KB, 下载次数: 1)

评分

参与人数 1蝴蝶豆 +3 收起 理由
zero99 + 3

查看全部评分

zwjchinayids 回答时间:2018-7-25 15:17:11
hellonsn 发表于 2018-7-25 07:36
hello,  I set the window value = 0x7f , which is the max value , and set T[0-6] = 0X7F as well , w ...

不可以的!,这样做可能会出现WWDG误判。
在"主程序喂狗论"中,最"强有的理论依据"就是---"程序跑飞了可是中断不一定会死" (中断一般都有自己固定不变的中断向量地址,这样即使主程序飞,中断也能正确地跳入自己的轨道继续运行.)

我没懂你说的中断是哪种中断.但是你可以修改 看门狗回调函数。不知道我理解你题意了没。
zwjchinayids 回答时间:2018-7-25 15:19:59
hellonsn 发表于 2018-7-25 07:36
hello,  I set the window value = 0x7f , which is the max value , and set T[0-6] = 0X7F as well , w ...

抱歉,刚刚没看到你说的EWI,发送出去才看到了
这样是可以的,清除标志位后等待一下标志位真正清除,然后再喂狗,退出中断。保证中断只执行一次。

评分

参与人数 1蝴蝶豆 +3 收起 理由
zero99 + 3

查看全部评分

12下一页

所属标签

相似问题

关于
我们是谁
投资者关系
意法半导体可持续发展举措
创新与技术
意法半导体官网
联系我们
联系ST分支机构
寻找销售人员和分销渠道
社区
媒体中心
活动与培训
隐私策略
隐私策略
Cookies管理
行使您的权利
官方最新发布
STM32N6 AI生态系统
STM32MCU,MPU高性能GUI
ST ACEPACK电源模块
意法半导体生物传感器
STM32Cube扩展软件包
关注我们
微信公众号二维码 微信公众号
手机版二维码 手机版