团队成员
eep 函数的范围?
RF_runCmd 函数被阻止、如何强制阻止结束?

如何填写 RF_CmdHandle? rf_runCmd ()没有返回这个参数?
CC1310 RTC 计时示例
您需要实现一天到一天的时间来在不时的时间之后自动唤醒器件、如何配置它
此致
亚历克斯
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.
您好,Alex
1) 1) eep 函数是什么? 请参阅此函数的位置
2) 2)如果您希望能够手动取消激活的 RX、则需要使用 RF_postCmd 而不是 RF_runCmd。
您可以执行以下操作:
/* Enter RX mode and stay forever in RX. pktConf.bRepeatOk and pktConf.bRepeatNok = 1 */
RF_CmdHandle rxHandle = RF_postCmd(rfHandle, (RF_Op*)&RF_cmdPropRx, RF_PriorityNormal, &callback, RF_EventRxEntryDone);
/* Wait for a button press */
Semaphore_pend(buttonSemaphoreHandle, BIOS_WAIT_FOREVER);
/* Cancel the RX command */
RF_cancelCmd(rfHandle, rxHandle, 0);
3)不确定我是否理解您在这里要求的内容。
RTC 会在大约18分钟后恢复工作、因此您无法将其用于使器件休眠一整天、然后在中断时唤醒。
如果您的某些设备每天只需要运行一次、而器件在其余时间应该睡眠、则仍需要更频繁地唤醒、然后在唤醒 x 次后、完成所需的操作。
Siri
您好
很抱歉我回复晚了
) eep 函数是什么? 请参考此函数的位置[/引号]睡眠功能的满量程范围?
您好,Alex
SLEEP 函数是 task_sleep 函数的包装器、两者都将0xFFFFFFFF 作为最大输入参数。
SLEEP 函数将再次调用 task_sleep 函数。
对于 sleep 函数、您需要给出睡眠的秒数;对于 task_sleeo、您需要给出周期数。
1个节拍为10us。
这也意味着、当为 Task_sleep (0xFFFFFFFF)提供最大输入时、可以在0xFFFFFFFF x 10us = 42949s (11.9小时)内休眠
这意味着如果您调用值大于 42949 (例如45000)的 sleep ()、器件将睡眠42949秒、然后 SLEEP 函数以2051 (45000 - 42949 = 2051)返回。
然后、您可以使用2051再次调用睡眠函数。
从 sleep.c 中删除
/* The maximum number of ticks before the tick count rolls over. We use
* 0xFFFFFFFF instead of 0x100000000 to avoid 64-bit math.
*/
#define MAX_TICKS 0xFFFFFFFFL
#define TICKS_PER_SEC (1000000L / Clock_tickPeriod)
/* integral number of seconds in a period of MAX_TICKS */
#define MAX_SECONDS (MAX_TICKS / TICKS_PER_SEC)
unsigned sleep(unsigned seconds)
{
unsigned long secs, ticks; /* at least 32-bit */
unsigned max_secs, rval; /* native size, might be 16-bit */
max_secs = MAX_SECONDS;
if (seconds < max_secs) {
secs = seconds;
rval = 0;
}
else {
secs = max_secs;
rval = seconds - max_secs;
}
/* must use 64-bit math to compute tick value */
ticks = ((uint64_t)secs * 1000000L) / (uint64_t)Clock_tickPeriod;
/* must add one tick to ensure a full duration of requested ticks */
Task_sleep((UInt32)(ticks + 1));
return (rval);
}
Br
Siri