ST意法半导体
直播中

王有罕

7年用户 150经验值
私信 关注
[问答]

IWDG和WWDG用于stm8l151c6暂停活动模式

我想在暂停/暂停 - 活动模式下使用stm8L看门狗。我的系统被RTC唤醒。


1.当我选择独立看门狗时,当系统处于暂停/暂停 - 激活模式时,会发生看门狗复位。如您所知,选项字节(0x4808)的默认设置是IWDG仍处于暂停/暂停状态,如果您不提供看门狗,则会发生看门狗复位。我不想在中断程序中喂养看门狗,所以我选择Window看门狗。

2. WWDG根据选项字节配置停止在暂停/暂停 - 激活模式下运行。在允许的看门狗窗口很难喂养看门狗。 stm8l以16MHz运行,这意味着WWDG必须在大约50ms内刷新。但是在我的任务调度程序中,任务处理时间可能超过50毫秒,因此错过了刷新。我不想使用定时器中断来提供看门狗。我没有好主意处理WWDG。

我再次选择IWDG。上电后,检查选项字节并配置IWDG停止在暂停/暂停 - 激活模式下运行。看起来效果很好。修改选项字节是否存在一些潜在问题?

以上来自于谷歌翻译


以下为原文




I want to use stm8L watch dog in halt/halt-active mode. my system wakes up by RTC.


1. when I choice Independent watchdog, a watchdog reset happens when system is in halt/halt-active mode. As you know, the option byte(0x4808) default setting is IWDG still runing in halt/halt active, if you do not feed watchdog, a watchdog reset happens. I do not want to feed watch dog in interrupt routine, So I choice Window watchdog.

2. WWDG stop runing in halt/halt-active mode according to option byte configuration. it is difficult to feed watch dog in allowed watchdog window. stm8l runs at 16MHz, It means WWDG must be refreshed in about 50ms. but in my task scheduler, it maybe take more than 50ms when task processing so that the refresh allowed missed. I do not want to use timer interrupt to feed watchdog. I don't have good idea to handle WWDG.

3. I choice IWDG again. after powers up, check the option byte and configure the IWDG stop runing in halt/halt-active mode. It seems works well. Is there some potential issue to modify option bytes?

回帖(3)

文甘翀

2019-3-15 16:10:18
嗨,
 
 
 IWDG用来防止硬件bug,我认为不能用来防止FW,因为当FW停止时,IWDG也运行并且MCU没有复位。
 
 我认为使用WWDG并通过计时器清除它。
 
 Thinh的

以上来自于谷歌翻译


以下为原文





Hi,


IWDG using to prevent hardware bug, I think can not using to prevent FW, because when FW halt, IWDG also run and MCU not reset.

I think using WWDG and clear it by timer.

Thinh
举报

王有罕

2019-3-15 16:43:46
斯宾格应该熟悉任务牧师。并知道每项任务花了多少时间。任务花费的时间是近似的。复位IWDG值在任务中被清除,可能会执行IWDG时间。如果未清除IWDG值,则必须在任务处理中出现一些错误并发生IWDG重置。
 
 
这是使用WWDG的好方法。我会尝试。

以上来自于谷歌翻译


以下为原文





1. Desinger should be familiar with task sheduler. and know how many time is spent for each task. Task spent time is approximate. reset IWDG value is cleared in task with probably exeed IWDG time. if IWDG value is not cleared, It must be some errors in task handling and a IWDG reset happens.


2. That is good way to use WWDG. I will try it.
举报

衡辉

2019-3-15 16:52:18
40667

以上来自于谷歌翻译


以下为原文

40667
举报

更多回帖

发帖
×
20
完善资料,
赚取积分