TI-RTOS for CC13xx version 2.15.00.17
SYS/BIOS version 6.45.00.20
I am attempting to use a one shot timer sequentially with different period settings. After my first timer interrupt I reconfigure as follows:
Timer_stop(timerHandle); Timer_setPeriodMicroSecs(timerHandle, 700); Timer_start(timerHandle);
The period gets changed but the timer count starts from the previous value. The API document states that Timer_start() will "Reload and start the timer". Stepping into the Timer_start() function I find the following. The comment states that step 2 is to clear the counters but there is no code to do this.
/* * ======== Timer_start ======== * 1. Hwi_disable(); * 2. Clear the counters * 3. Clear IFR * 4. Enable timer interrupt * 5. Start timer * 6. Hwi_restore() */ Void Timer_start(Timer_Object *obj) { UInt key; key = Hwi_disable(); if (obj->hwi) { Hwi_clearInterrupt(obj->intNum); Hwi_enableInterrupt(obj->intNum); } if (obj->extFreq.lo) { Hwi_nvic.STCSR |= 0x1; /* start timer, select ext clock */ } else { Hwi_nvic.STCSR |= 0x5; /* start timer, select int clock */ } Hwi_restore(key); }