我想在暂停/暂停 - 活动模式下使用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-ac
tive 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?