大家好、
我们迁移到 Blestack V3.0.1
您能否提供有关看门狗的详细信息或为 blestack v3.0.1配置看门狗的任何示例代码?
与 V2.01.01相比、看门狗实现有何差异。
提前感谢您。
此致、
Saritha.G
This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
大家好、
在移植到 v3.0.1后、看门狗计时器不工作
我们观察到与之前版本相比的更改 。WatchdogCC26XX_HWAttrs 结构已修改。 Reloadvalue 添加新结构成员,并删除 IntNum 成员。
中断类型 更改为 NMI、并且在 WatchdogCC26XX.c 文件中、Hwi_con构 被 Hwi_plug 取代
我们在下面使用了看门狗配置设置。
/*看门狗对象*/
WatchdogCC26XX_Object WatchdogCC26XX 对象[1];
/*看门狗硬件参数结构*/
const WatchdogCC26XX_HWAttrs watchdogCC26XHwAttrs[1]= {
{
baseAddr = WDT_BASE、
.reloadValue = 1000/*以毫秒为单位的重载值*/
}
};
/*看门狗配置结构*/
const Watchdog_Config Watchdog_config[1]={
{&WatchdogCC26XX_fxnTable、&watchdogCC26XXObjects[0]、&watchdogCC26XXHwAttrs[0]}、
};
const uint_least8_t Watchdog_count=1;
Watchdog_Params 观察 dogInitParams;
Watchdog_init();
/*使用配置参数初始化看门狗,请参见:watchdog.h 文件中的注释*/
Watchdog_Params_init (&watchdogInitParams);
watchdogInitParams.callbackFxn =(Watchdog_Callback) WatchdogTimerCallback;
watchdogInitParams.debugStallMode = Watchdog_debug_star_on;
WatchdogInitParams.resetMode = Watchdog_reset_on;
WatchdogHandle = Watchdog_open ((unsigned int) Board_watchdog、&watchdogInitParams);
if (watchdogHandle ==空)
{
返回成功;
}
其他
{
退货失败;
}
静态空看门狗 TimerCallback (UARg a0)
{
Watchdog_clear (watchdogHandle);
}
我们将 while (1)循环保留在应用程序中以验证看门狗复位、但应用程序将会挂起状态、而不是系统复位状态。 您能帮我解决这个问题吗?
非常感谢、
此致、
Saritha