Other Parts Discussed in Thread: CC2541
Tool/software: TI-RTOS
When Bluetooth advertising is started, if no one connects within 45 seconds, I want to disable advertising again. So I just need a basic one-shot software timer that lets me do something when it expires a long (by processor standards) time later with an accuracy that only needs to be good enough for human perception; I definitely don't want to commandeer an actual hardware timer every time I want to do something like this.
So what's the difference between all the different ways there are to create a timer?
- Timer Module (http://dev.ti.com/tirex/explore/content/simplelink_cc13x2_26x2_sdk_3_10_00_53/docs/tirtos/sysbios/docs/Bios_User_Guide.pdf, section 5.4
- This seems like exactly what I DON'T want, because it grabs a hardware resource.
- Clock Module (http://dev.ti.com/tirex/explore/content/simplelink_cc13x2_26x2_sdk_3_10_00_53/docs/tirtos/sysbios/docs/cdoc/index.html#ti/sysbios/knl/Clock.html)
- This looks like once it's set up, you can create multiple software clock objects based on it, but does it still require you to grab a hardware timer first, or does TI_RTOS already have one for its system tick that it would just use?
- Util_constructClock() (util.c, included in SimplePeripheral example project)
- This appears to just be a sample procedure for the Clock Module above.
- GPTimerCC26XX (http://dev.ti.com/tirex/content/simplelink_cc13x2_26x2_sdk_3_10_00_53/docs/tidrivers/doxygen/html/_g_p_timer_c_c26_x_x_8h.html)
- This... I don't know; yet another timer.
I'm basically looking for something like the old osal_start_timerEx() from the CC2541. Which of these should I use, or is there something else out there that I'm missing? And what are the others for?