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.

LP-CC1352P7: Is it possible to create a timer object in a no-rtos build?

Part Number: LP-CC1352P7
Other Parts Discussed in Thread: SYSCONFIG, , CC1352P7, CC1352P

Tool/software:

Hi there, 

I am trying to add a timer to my no-rtos application.

I checked the documentations and found two different driver header files:

https://software-dl.ti.com/simplelink/esd/simplelink_cc13x2_26x2_sdk/4.20.00.35/exports/docs/tidrivers/doxygen/html/_timer_8h.html#ae5309d35d8dfc6b2f0b24c7eec556dec
https://software-dl.ti.com/simplelink/esd/simplelink_cc13x2_26x2_sdk/4.20.00.35/exports/docs/tidrivers/doxygen/html/dir_75307ce843f97782c6014299d4962542.html

In one, the example just includes the header and a few lines of code that results in callback upon timer timeout expiration

I tried this appraoch, I included the header file and added a timer instance in the sysconfig, but the application does not build mainly because it does not recognize the APIs such as Timer_Params_init() , ...


The second link above is talking about the fact that the driver is for TI_RTOS based application.

So, I am wondering if there is a way to create a timer in the no-rtos applications? If so, I'll be thankful to know that, especially if there is an example somewhere that I can use.  

  • First of all, you are reffering to a VERY old SDK version (4_20). Please make sure that you use the latest SDK if you are staring development now.

    You can use our dirvers even if you are not using RTOS.

    Start for example with the nortos emåty project found here:

    empty (ti.com)

    You can easily enable the timer in sysConfig, and port the TimerLed application found for TI_RTOS7:

    timerled

    Siri

  • Thanks, but the example you provided has TI_RTOS configurations in the sysconfig as

    TI RTOS(8)
      POSIX Settings
      BIOS
     CORE KERNEL(7)
     RUNTIME(8)
     HEAPS(6)
     GATES(5)
     HAL(3)
     UTILS(1)


    However, for the no-rtos application that I want to use the timer with, say the no-rtos proprietary rfPacketRx, I do not have those RTOS related configurations and perhaps that's why even with having Timer and GPTimer in the sysconfig and the driver header included, the application won't build as it does not recognize the APIs which is most likely due to the missing configuration dependencies.



    Also, for the future reference and people who have cc1352p1-7 board and may have a similar question:

    This example project is not in the CC1352P1-7 directory, but in the CC1352p1_LAUNCHXL directory of the SDK.

  • The correct link for the empty project, which you should use as your starting point, is this:

    empty (ti.com)

    This is for the CC1352P7-1 LaunchPad, and without TI-RTOS

    For the timerled example, you should use the one I linked to. It does not matter if this example is for tirtos. The way you use the driver will be the same.

    I just linked to this example, as not all of our examples has been ported to nortos version.

    Siri

  • could you explain what you mean that it does not matter if the example is for TI-RTOS.

    The sysconfig in that example includes RTOS configurations. Could you explain what you mean by "the way you use the driver will be the same".
    If the timer.h driver APIs can be used without dependency on TI RTOS? 
    Also if the timer.h driver APIs do not have any dependency on the TI RTOS, why there are related configurations int the sysconfigs.

    Also, the path to the example you provided from the online resource does not exist in the locally installed SDK. Using search in VScode I could find the similar examples in the directory called CC1352p1_LAUNCHXL, that's why I said that for the future reference. 


    Thanks

  • Yes, the driver can be used independent of you using tirot or not.

    If you do not want to use TI-RTOS, you select a project as a starting point that does not use ti-rtos:

    This is the empty example I have linked to and you will find it if you update your VERY old SDK to the newest one (as I wrote last week)

    You then look at one of the example we have that uses the driver you want to use (the timer) and then you can copy the driver spesific code from the example you have found, to your nortos example.

    Siri

  • regarding the sdk being very old, I am not sure because I installed the sdk a few month ago and I have "simplelink_cc13xx_cc26xx_sdk_7_41_00_17" which seems to be the most recent simple link sdk.

    If you brows this directory, the empty example as well as the timer led examples are in the following path:
    ... /ti-cc13xx-rf-fw/simplelink_cc13xx_cc26xx_sdk_7_41_00_17/examples/nortos/CC1352P1_LAUNCHXL/drivers/empty/empty.c

    what version of the SimpleLink SDK should I be using then?


    Snapshot of the path in my VSCode:

  • I am really consfused by your questions and do not understand what the problem is.

    The reason I assumed you used an old SDK is that you where linking to VERY old documentation (from the 4.20.00.35 version of the SDK). I assumed you did that only because you were using this SDK. 

    If you are using the 7_41_00_17 SDK, you should look at that documentation (and not the 4.20.00.35 one)

    You have written in the heading of this thread LP-CC1352P7.

    Then I assume that you are using  LP-CC1352P7 and NOT CC1352P1_LAUNCHXL.

    The empty example are availabe for ALL of our HW kits, but you need to select the one from the HW you are using.

    If you are using LP-CC1352P7, you select 

    C:\ti\simplelink_cc13xx_cc26xx_sdk_7_41_00_17\examples\nortos\LP_CC1352P7_1\drivers\empty 

    or

    C:\ti\simplelink_cc13xx_cc26xx_sdk_7_41_00_17\examples\nortos\LP_CC1352P7_4\drivers\empty

    depending on which board you have.

    If you have a CC1352P1, you need to select one of the following:

    C:\ti\simplelink_cc13xx_cc26xx_sdk_7_41_00_17\examples\nortos\CC1352P1_LAUNCHXL\drivers\empty

    or

    C:\ti\simplelink_cc13xx_cc26xx_sdk_7_41_00_17\examples\nortos\CC1352P_4_LAUNCHXL\drivers\empty

    or

    C:\ti\simplelink_cc13xx_cc26xx_sdk_7_41_00_17\examples\nortos\CC1352P_2_LAUNCHXL\drivers\empty

    What timerLed project you look at DOES NOT MATTER, as the driver API is NOT dependent on what HW you are running, or if you are using rtos or not.

  • Sorry for the confusion, regarding the link, I had done a quick search and copied the first result regardless of the sdk version as I my main concern was to mention the driver and its API.

    For some reason, the directory layout of the cloned repository was different at the time was looking for the example in my local repo.

    It is all good now. thanks.