CC2640R2F GPTimerCC26XX_setLoadValue怎么计算时间
GPTimerCC26XX_Params_init(¶ms);
params.width = GPT_CONFIG_16BIT;
params.mode = GPT_MODE_PERIODIC;
params.direction = GPTimerCC26XX_DIRECTION_UP;
params.debugStallMode = GPTimerCC26XX_DEBUG_STALL_OFF;
hTimer = GPTimerCC26XX_open(CC2640R2_LAUNCHXL_GPTIMER0A, ¶ms);
if
(hTimer == NULL) {
Task_exit();
}
xdc_runtime_Types_FreqHz freq;
BIOS_getCpuFreq(&freq);
//1ms
GPTimerCC26XX_Value loadVal = freq.lo / 1000 - 1;//47999
怎么修改定时器1s中断,GPTimerCC26XX_Value loadVal 怎么计算
Viki Shi:
参考这边类似帖:e2e.ti.com/.../2234068
WK C:
回复 Viki Shi:
是不是params.width = GPT_CONFIG_16BIT;这限制了GPTimerCC26XX_Value loadVal只有16位, 按上面的帖子设置了没有能实现1s定时器
用GPTimer怎么设置分频数, 找不到接口函数