CC2640R2F GPTimerCC26XX_setLoadValue怎么计算时间

举人 1360 points

CC2640R2F  GPTimerCC26XX_setLoadValue怎么计算时间

GPTimerCC26XX_Params_init(&params);
    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, &params);
    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 怎么计算

2 个回复