This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

CC2340R5: Is the Timer Driver missing from the SDK?

Part Number: CC2340R5
Other Parts Discussed in Thread: SYSCONFIG

I was porting code over from the CC1352 and noticed that the Timer driver is (partially) missing for the CC2340. While the LGPTimer implementation appears to exist in the "timer", the Timer driver itself (Timer.c, Timer.h) are missing.

  • Is this functionality planned but just hasn't been implemented, yet?
  • Are there any plans for a Timer driver?
  • Is there a Driverlib example - or any other example - showing how to use the GP Timers on the CC2340?
    • If not, what is TI's recommendation for using timers on the CC2340?

Thanks Much,
Scott 

  • Hello Scott,

    We have four type of timers you can use the LGPT, Watchdog, RTC, and System Timer. 

    The LGPT timer should use the LGPTimerLPF3.c/.h file. You can find these within the timer folder in your SDK (just search "Timer" in where you downloader your SDK)

    There is a timer.c file, but it is located within FreeRTOS posix (different that TI-RTOS kernel). 

    For the Driverlib example, or more examples on how to use timers please navigate to your syscfg, into LGPTimer and select "Example" which will bring you to a local website with more details on how to configure and use the timer. 

    Thanks,
    Alex F

  • Thanks for the pointer to the Driverlib examples. I'd only been looking in the examples folder and hadn't realized there were some in the documentation itself. Hopefully using these will be easier than adapting my CC1352 GPTimer example.

    With regards to the Timer driver. This is still a departure from other SDKs. Previous SDKs included a POSIX Timer driver... but they also included a "standard" TI Driver example. 

    Is the long-term plan to eliminate the TI Driver from future SDKs? If so, what does TI recommend for FreeRTOS users (or NoRTOS users) who do not plan to use POSIX? 

    Sorry to be a pain. We just want to make sure that we fully understand TI's strategy so we can guide folks in the right direction.

    Take Care,
    Scott 

  • Hello Scott,

    I forgot to specify that the SDK I was using was the 7_40_00_64 SDK. 

    Customers should reference the LGPTimer, and GP timer to achieve timer needs generally (for 7.40 SDK). Unfortunately, there is not a current example in the SDK itself that displays how to use the timer, but the examples in the separate local webpage should help getting started. 

    Thanks,
    Alex F

  • Thanks again for the feedback. Based on your feedback, we will generally recommend the LGPTimer driver. 

    Note that it's very hard to find the documentation example that you pointed out. Well, it's easy if you click the link in the SYSCONFIG tool. But very difficult otherwise. FWIW, it's nearly impossible to find online or when starting from the "Documentation Overview" webpage.