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.

CC2640R2F 硬件定时器定时800us程序跑飞

Expert 2260 points
Other Parts Discussed in Thread: CC2640R2F, CC1310, CC2640

CC2640R2F使用硬件定时器定时800us, 有时候几分钟就程序跑飞, 最多是一个多小时就跑飞,  硬件定时器怎么设置进行微秒级定时,  程序不跑飞.

设置了独立看门狗, 程序跑飞不是复位的吗?

  • 设置是否正确?喂狗程序要放在主循环中,喂狗时间一定要小于程序运行时间
  • 设置是否正确?喂狗程序要放在主循环中,喂狗时间一定要小于程序运行时间
  • 喂狗时间要小于程序时间? 看门狗的响应流程是怎样的?
    帮看看这个程序对不对?
    void watchdogCallback(uintptr_t handle)
    {
    Watchdog_clear(whandle);
    }
    void watchdog_Init(void)
    {
    Watchdog_Params params;
    uint32_t tickValue;
    Watchdog_init();
    Watchdog_Params_init(&params);
    params.callbackFxn = watchdogCallback;
    whandle = Watchdog_open(0, &params);
    //2.5s
    tickValue = Watchdog_convertMsToTicks(whandle, 2500);
    Watchdog_setReload(whandle, tickValue);
    }

  • 代码逻辑没什么问题,初始化做了,喂狗程序也有,调用位置放在哪的?
  • 在SimplePeripheral_init中调用watchdog_Init初始化
  • Viki Shi :你好!,我在查阅"WatchdogCC26XX.h文件参考"的时候看到这样一段话:

    Power Management

    Once started, the Watchdog will keep running in Active or Idle mode. When the device enters Standby mode, the Watchdog timer will stop counting down but the counter value will be preserved. When the device wakes up from Standby, the Watchdog timer will continue to count down from the previous counter value.

    This means that if a system goes into Standby 50% of the time and the Watchdog reload value is set to 1 second, the Watchdog timer will actually time out in 2 seconds. A system which is only in Active/Idle mode for 1% of the time, the Watchdog timer will time out in 100 seconds. However, if a bug locks up the application in Active mode, the Watchdog timer will time out in the configured time.

    那请问在低功耗CC2640产品或者低功耗CC1310产品中使用,用TI-RTOS自带的电源管理系统下,如何使用看门狗?