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.

Tiva TM4C123GH6PM microcontroller timestamp clock source

Other Parts Discussed in Thread: TM4C123GH6PM

Hello,

I am looking to collect timestamps from two different clocks onboard the Tiva TM4C123GH6PM microcontroller (precision internal oscillator and main oscillator, for example). Is it possible to operate two clocks at the same time and run them simultaneously while collecting their timestamps? I wish to see the drift between the two over a period of time. 

Not sure where to start beyond the data sheet, thanks in advance. 

  • Hello Ala

    The TM4C123x does not support dual clocks for peripherals. The only place it would be possible would be with the WatchDog timer, with one watchdog timer running on the System Clock (Which is the main oscillator) and another watchdog timer running with the PIOSC. In this case the only thing you can get is the count value

    There would be delay in readout of the current count value, so I am not sure what type of timestamping information you would be able to get.
  • I see, thanks Amit! That's unfortunate. I need to get timestamps from two clocks at the same time. What about the MSP430 launchpad? I believe it has a crystal oscillator and a DCO..
  • Hello Ala

    I guess you would need to ask that question to the MSP Forum...
  • Ala Shaabana said:
    I need to get timestamps from two clocks at the same time.

    Would you care to explain a bit further what you need to do?

    Do you really need timestamps from two completely independently based clocks? Or do you need to maybe time two different events? It appears that your proposed challenge ain't the only solution for your end requirement...

    Bruno

  • Hi Bruno,

    I am trying to measure the clock drift between two oscillators onboard the microcontroller over a period of time. For example, if have an accelerometer attached to the board with the DCO as its clock source, I want to measure its clock drift relative to the crystal oscillator which is a more accurate clock source..

    So far it seems like the MSP430 with its 3 clocks (MCLK, ACLK, and SMCLK) is a better choice than my current Tiva tm4C123gxl

  • Ala Shaabana said:
    if have an accelerometer attached to the board with the DCO as its clock source

    Ala,

    Sorry, I still did not understand. What does this mean? You accelerometer is outside the MCU, and the MCU clock does not impact the external sensor -  or I fail to see how. From the input that you've given so far, I believe you can obtain all your acceleration measurements with a TM4C123x clocked either by the internal oscillator or, such as it is on the launchpad, using an external 16MHz crystal. But I'll be glad to try and help further if you enlighten a bit.

    Crystal oscillator: not as accurate as you'd hope - but it all depends on what sort of precision you need. There are VERY expensive crystals that are more precise, but still does not guarantee much. This is a different subject, but you are likely to obtain a better system time precision (for a limited amount of money) using "good quality" crystals (as opposed to the special extra-expensive ones) associated to a dedicated IC with dedicated internal clock calibration hardware - and a temperature sensor will also be needed.

    Cheers

    Bruno