设置了一个5S的定时器,如何进入空闲的低功耗模式。
GPTimerCC26XX_Params timeParams;
GPTimerCC26XX_Params_init(&timeParams);
timeParams.width = GPT_CONFIG_32BIT;
timeParams.mode = GPT_MODE_PERIODIC_UP;
timeParams.matchTiming = GPTimerCC26XX_SET_MATCH_NEXT_CLOCK;
timeParams.direction = GPTimerCC26XX_DIRECTION_UP;
timeParams.debugStallMode = GPTimerCC26XX_DEBUG_STALL_OFF;
gptime = GPTimerCC26XX_open(CC1310_LAUNCHXL_GPTIMER0A,&timeParams);
ClockP_FreqHz freq;
ClockP_getCpuFreq(&freq);
GPTimerCC26XX_Value loadVal = freq.lo *5 – 1; //5s
GPTimerCC26XX_setLoadValue(gptime, loadVal);
GPTimerCC26XX_registerInterrupt(gptime,interruptTimer_5s,GPT_INT_TIMEOUT);
GPTimerCC26XX_start(gptime);
Viki Shi:
已在e2echina.ti.com/…/555458
中回复