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.

CC2650 Clock vs Timestamp clocks

Other Parts Discussed in Thread: SYSBIOS, CC2650

According to what I have seen in other posts and the documentation:

- TI-RTOS Clock module uses RTC clock running at 32kHz as its source

- TI-RTOS TImestamp default clock is SysTick which runs at CPU clock

I didn't think they were combined as the default setting, but when I add Timestamp Provider (target specific) to my .cfg file, it has "Use Clock's timer" greyed out and CHECKED. This leads me to believe that Timestamp and Clock timers are combined as default. While this would save power which is great, timestamp wouldn't provide very accurate timing.

So my questions are these:

1. Verify that RTC is used as Clock module's timer (I assume yes)

2. The default Clock source is shown as "Timer 0", which is confusing when you have GPT0 available also. What does "TImer Id 0" mean in relation to the Clock Module? I assume it means RTC clock, but again, this is confusing because of the presence of a GP timer 0 on the device.

3. Is Timestamp's default clock Systick running at CPU rate? If the two sources are tied together as default, it would mean that "RTC" is used for both as default.

4. Are these two clocks combined as default? It seems like they are.

5. If I wanted to assign Timer 1 (GPT1) to the Clock source, it seems like I can do that via the RTOS GUI. Right?

6. However, regarding Timestamp, it seems that if I choose "Use Clock's timer", the only ID that is available is "0" which pops up when I choose to NOT use Clock's timer. Not much flexibility here which is ok, just a bit confusing. More confusion is added by the sticky ID of "zero" meaning RTC or GPT0.

Thanks for your help,

  • Thanks to Janet's responses to my other posts, I think I can answer my own questions. She will need to read this and verify my answers so I know I got them right. ;-)

    Answers:

    1. RTC is used as the Clock module's source clock running at 32kHz.

    2. I still agree this "Id = 0" is confusing because of the presence of GPT0, but I do NOT believe you can change the clock source for the Clock module. It is RTC or nothing. This was most likely chosen due to the fact this is the only clock still alive in standby on this device.

    3. The default Timestamp clock source is the same as Clock's - it is RTC running at 32kHz. They are tied together as default. However, you can choose to use the M3's SysTick timer as the source of Timestamp running at CPU Clock (48MHz) instead of RTC at 32kHz. This is helpful if you want to benchmark code because a 32kHz clock is way too slow to count 48MHz cycles.

    Simply add the following line of code to your CFG script (.cfg file):

    var Timestamp = xdc.useModule('xdc.runtime.Timestamp');
    Timestamp.SupportProxy = xdc.useModule('ti.sysbios.family.arm.m3.TimestampProvider');

    4. Yes, Clock and Timestamp, by default, both use the 32kHz RTC clock as their source.

    5. I am not sure about this, but I think NO. Clock uses RTC period (as Id = 0) and there is no way to change that.

    6. There is no way, that I have found, to modify the Timestamp clock source via the GUI. The only way (and it works) is to add the two lines of script code above to allow Timestamp to use the M3's Systick timer (running at CPU Clk) as the source. I doubt any other source is possible.

    I hope someone at TI can verify my answers above.

    Thanks,
  • Hi Eric,

    Your answers look correct to me.

    Regarding your question #5, I was not able to change the Clock timer proxy through XGConf.  You would change it by editing the .cfg file, for example:

    var Clock = xdc.useModule('ti.sysbios.knl.Clock');
    Clock.TimerProxy = xdc.useModule("ti.sysbios.family.arm.cc26xx.Timer");

    But for CC2650, you probably shouldn't change Clock.TimerProxy if you have the Power policy enabled.

    Best regards,

        Janet

  • Thanks Janet. I agree. But it is good to know HOW to do it anyway. ;-) Thanks for your quick attention to all of my questions. I have now added the CC2650 target to the TI-RTOS workshop. Much appreciated.
  • Yes, always good to know how to do this. I'm glad you're writing these labs, they are very helpful!
    Best regards,
    Janet
  • Hi Eric,

    You may want to use the lm4 TimestampProvider instead of the m3 TimestampProvider.  Please see this post:

    There are problems with the m3 TimestampProvider when you log Hwi events.

    Best regards,

        Janet