您的位置:首页 > 其它

how to disable watchdog

2013-05-31 10:44 489 查看
Feature phone 的production release 版本上存在(1)死机无法抓取得memory dump或是(2)用JTAG分析问题时watchdog timeout了, 可以关闭watchdog去debug 问题,关闭方法如下:

11A before关闭 watchdog方法是将WDT_Enable()这个函数中的参数变为kal_FALSE。如下
Application_Initialize() (init\src\init.c) like this:
#ifdef __PRODUCTION_RELEASE__
#ifdef __MULTI_BOOT__
if ( system_boot_mode!=FACTORY_BOOT )
#endif /* __MULTI_BOOT__ */
// WDT_Enable(KAL_TRUE);
WDT_Enable(KAL_FALSE);
#endif /* __PRODUCTION_RELEASE__ */

11A after(包括11A)关闭 watchdog方法是将wdt_data.fgEnable
= kal_TRUE 改为 KAL_FALSE。如下

Application_Initialize() (hal\system\init\src\init.c) like this:
#ifdef __PRODUCTION_RELEASE__
#ifdef __MULTI_BOOT__
if ( system_boot_mode!=FACTORY_BOOT )
#endif /* __MULTI_BOOT__ */
//wdt_data.fgEnable=KAL_TRUE;
wdt_data.fgEnable=KAL_FALSE;
init_dcl_wdt_handle=DclWDT_Open(DCL_WDT,0);
DclWDT_Control(init_dcl_wdt_handle,WDT_CMD_ENABLE,(DCL_CTRL_DATA_T*)&wdt_data);
DclWDT_Close(init_dcl_wdt_handle);
#endif /* __PRODUCTION_RELEASE__ */


如果在Application_Initialize() (hal\system\init\src\init.c) 沒有上面所述內容,但是有WDT_SetValue(255)函数,
关闭watch dog 方法为: WDT_SetValue(255);替换为WDT_Enable(KAL_FALSE);

在w12.36 11B起增加了两个feature option ,FORCE_MEMORY_DUMP & FORCE_WATCHDOG_MUTE以加速打开或者关闭watch dog and memory dump。修改project make file中的feature option, 然后remake system即可有效。
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: