使用CC1310,15.4协议栈,使用跳频模式,不开看门狗工作是正常的。打开看门狗功能,从机一连上主机后,程序就复位了,请TI的工作人员帮忙看下是什么原因?
初始化:
uint8_t watch_dog_init(void)
{
Watchdog_Params params;
uint32_t reloadValue;
Watchdog_init();
/* Open a Watchdog driver instance */
Watchdog_Params_init(¶ms);
params.callbackFxn = (Watchdog_Callback) watchdogCallback;
params.debugStallMode = Watchdog_DEBUG_STALL_ON;
params.resetMode = Watchdog_RESET_ON;
watchdogHandle = Watchdog_open(Board_WATCHDOG0, ¶ms);
if (watchdogHandle == NULL) {
/* Error opening Watchdog */
while (1) {}
}
/*
* The watchdog reload value is initialized during the
* Watchdog_open() call. The reload value can also be
* set dynamically during runtime.
*
* Converts TIMEOUT_MS to watchdog clock ticks.
* This API is not applicable for all devices.
* See the device specific watchdog driver documentation
* for your device.
*/
reloadValue = Watchdog_convertMsToTicks(watchdogHandle, 10000);
/*
* A value of zero (0) indicates the converted value exceeds 32 bits
* OR that the API is not applicable for this specific device.
*/
if (reloadValue != 0) {
return Watchdog_setReload(watchdogHandle, reloadValue);
}
return 1;
}
2.5S清一次看门狗
Watchdog_clear(watchdogHandle);