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.

cc2640使用这个函数重启周期性事件的时候,是直接对系统时钟的寄存器清零的吗,我查了一下,没有看到这个函数的更底层一点的代码。

Util_restartClock(&periodicClock,MR_PERIODIC_EVT_PERIOD);

这个函数的再底层一点的是直接对寄存器操作吗

void Util_restartClock(Clock_Struct *pClock, uint32_t clockTimeout)
{
uint32_t clockTicks;
Clock_Handle handle;

handle = Clock_handle(pClock);

if (Clock_isActive(handle))
{
// Stop clock first
Clock_stop(handle);
}

// Convert timeout in milliseconds to ticks.
clockTicks = clockTimeout * (1000 / Clock_tickPeriod);

// Set the initial timeout
Clock_setTimeout(handle, clockTicks);

// Start clock instance
Clock_start(handle);
}