请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。
器件型号:CC1310 大家好、
以下是客户的请求:
SDK 为 simplelink_cc13x0_sdk_4_20_02_07、示例为 rfPacketRx 和 rfPacketTx。
- 如何 解决 PROP_ERROR_RXBUF 的错误? RF_ CmdPropRx.maxPktLen 已修改为正常通信的两倍、但仍然存在错误。
- 如何重置其状态? 调用后卡住 RFC_CMD_CLEAR_RX_t 命令 与 RF_ runCmd 。
- 在看门狗计时器结束并调用 SysCtrlSystemReset 功能也无法复位。
#include "bsp_watchdog.h" #define TIMEOUT_MS 1000 #define SLEEP_US 500000 /* * ======== watchdogCallback ======== */ void watchdogCallback(uintptr_t watchdogHandle) { /* * If the Watchdog Non-Maskable Interrupt (NMI) is called, * loop until the device resets. Some devices will invoke * this callback upon watchdog expiration while others will * reset. See the device specific watchdog driver documentation * for your device. */ myPrintf("Watchdog reset!\r\n"); usleep(SLEEP_US); SysCtrlSystemReset(); while (1) {} } /* * ======== gpioButtonIsr ======== */ void gpioButtonIsr(uint_least8_t index) { // GPIO_write(Board_GPIO_LED0, Board_GPIO_LED_ON); /* * Simulate the application being stuck in an ISR. This ISR can be * preempted by the watchdog Non-Maskable Interrupt (NMI). */ while (1) {} } void WatchdogTask(UArg arg0, UArg arg1) { Watchdog_Handle watchdogHandle; Watchdog_Params params; uint32_t reloadValue; /* Call driver init functions */ 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, TIMEOUT_MS); /* * 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) { Watchdog_setReload(watchdogHandle, reloadValue); } Power_disablePolicy(); while (1) { /* * Disabling power policy will prevent the device from entering * low power state. The device will stay awake when the CPU is * idle. */ // Power_disablePolicy(); /* Sleep for SLEEP_US before clearing the watchdog */ usleep(SLEEP_US); Watchdog_clear(watchdogHandle); // GPIO_toggle(Board_GPIO_LED0); /* * Enabling power policy will allow the device to enter a low * power state when the CPU is idle. How the watchdog peripheral * behaves in a low power state is device specific. */ // Power_enablePolicy(); // // /* Sleep for SLEEP_US before clearing the watchdog */ // usleep(SLEEP_US); // Watchdog_clear(watchdogHandle); // GPIO_toggle(Board_GPIO_LED0); } }
您能检查一下这些案例吗? 谢谢。
谢谢。此致、
尼克