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.

CC2745R10-Q1: Challenges in Using Timer (CC2745R10) for UDS Implementation.

Part Number: CC2745R10-Q1

Hello TI Team,

We are facing some challenges while implementing timers for UDS.
The CC2745 device provides 4 LGPT timers, but our UDS implementation requires 6 independent timers running in parallel for their respective tasks.

Could you please guide us on how to achieve this requirement with the available timers?

Thanks & Regards
Ratan D.

  • Dear TI Team,

    I hope this message finds you well. I wanted to kindly follow up as I have not yet received a response regarding my query. Could you please confirm whether it is possible? If so, I would appreciate your guidance on how we can proceed.

    Thanks & Regards

    Ratan D.

  • Hello Ratan,

    Apologies for the delayed response. May I ask what is your use case for 6 independent timers running in parallel? We usually recommend using events since running 6 independent timers is not very ideal since all of our time drivers have different behaviors. That being said, there are additional timers available: RTC Clock and the ClockP module, which is based on SYSTIM. You can look into those options to see if it meets your needs.

    One thing to note is all of these drivers are not the same, and even the 4 LGPT timers have different behavior from one another, so if you are running them in parallel, you will have to account for different conditions. I have attached the TRM below, that will provide more information on available timers and their behaviors:CC27xx Technical Reference Manual (Rev. A).

    Thank you,

    Eshaan

  • Hi Eshaan,

    We do not want to use 4 LGPT timers. Since a single timer has 3 channels, we expect that all three channels should work independently and each channel should have its own callback.

    For example:

    • Channel 0 - 1 mS
    • Channel 1 - 5 mS
    • Channel 2 - 100 mS

    Each channel should operate according to its own configured period, but we are unable to achieve this behavior.
    Could you please suggest a method to make all three channels work independently with separate callbacks?

    If this works, we can meet our requirement using only two timers.

    Thanks & Regards

    Ratan Dalei

  • Hello Ratan,

    I am looking into the timer channels, but it will take some time. Please expect delayed responses as our team is on holiday for the remainder of the week for Thanksgiving. In the meantime, the TRM has detailed information about channel configurations for LGPT (Chapter 12). Thank you.

    Eshaan

  • Hello Ratan,

    I wanted to follow up since I am back from holiday. Were you able to resolve the issue using the TRM or do you still need assistance?


    Eshaan

  • Hi Eshaan,

    The issue is still not resolved, and we are waiting for your support. Previously, you mentioned using the LGPT timer on chapter 12, but we are using your SDK and not accessing the MCU registers directly. Since we are using your SDK and not accessing MCU registers directly, could you please guide us on how to configure this using the TI library?

    I noticed that a single LGPT timer has three channels, and I would like to use all three channels with different time values so that I can achieve three separate timings and callbacks using one LGPT timer. 

    I am not sure if this is possible, but I expect it should be. Please confirm or provide a better suggestion to achieve the same result.

    Thanks and Regards.

    Ratan D.

  • Hello Ratan,

    The code snippet below shows how a singular channel is initialized. If you follow a similar structure for all three channels, you should be able to configure it needed. The link below takes you to our User Guide, where you will find the TI Drivers API reference. In that the "LGPTimerLPF3.h File Reference" section has more information regarding the LGPTimer module and how to configure it. Thanks.

    void* taskFxn(void* arg) {
      LGPTimerLPF3_Handle lgptHandle;
      LGPTimerLPF3_Params params;
      uint32_t cntTargetVal = 1500/2;
      uint32_t chCompVal    = cntTargetVal/2;
      // Configure channel 2 action
      LGPTimerLPF3_Params_init(&params);
      params.channelProperty[2].action = LGPTimerLPF3_CH_TOGGLE_ON_COMPARE_PERIODIC;
      // Open driver
      lgptHandle = LGPTimerLPF3_open(0, &params);
      // Set channel output signal period
      LGPTimerLPF3_setInitialCounterTarget(lgptHandle, cntTargetVal, false);
      // Set channel output signal duty cycle
      LGPTimerLPF3_setInitialChannelCompVal(lgptHandle, LGPTimerLPF3_CH_NO_2, chCompVal, false);
      // Start the LGPTimer in up-down-periodic mode
      LGPTimerLPF3_start(lgptHandle, LGPTimerLPF3_CTL_MODE_UPDWN_PER);
      // Output signal forever
      while(1);
    }


    BLE Stack User's Guide

    Eshaan

  • Hello Eshaan,

    I have already tested it in this way, but I am unable to get different time values using different channels. I will further check using your code to see if it might help solve my problem. Right now, we are using one timer for different timings. We have set a 1 ms callback timer, and we are increasing a counter and comparing the counter values for different timings. I will get back to you soon with the tested code.

    Thanks & Regards
    Ratan D.