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.

RTC Counter Register Access

Other Parts Discussed in Thread: OMAPL138

Hi,

I require sub-second accurate time keeping on my OMAPL138. The RTC module can only give me time down to a second; ideally I would like to be able to read the RTC-counter register in addition to the seconds register, but I cannot find any documentation that shows whether this is possible and if so, how? Can anyone give me clarification on this?

If it is not possible, I could implement a timer to keep track of time between seconds. The problem with this is that the timer must either be fed from the internal auxiliary clock or an external clock. There is no space to connect another crystal and I am not sure how fixed the frequency of the auxiliary clock is. This leads me to two questions:

How fixed is the frequency of the auxiliary clock feeding the timers?

Is there a way through internal multiplexing to duplicate the RTC 32kHz clock signal to also feed the timers?

Any answers/suggestions will be appreciated.

Regards,

Reino

  • Hi Reino,

    Thanks for your post.

    In general, timers are fixed frequency peripherals and do not have fixed CPU clock ratio. PLL0_AUXCLK is usually derived from PLL0 controller oscillator input frequency (OSCIN) and the possible fixed frequencies could be as follows:

    12, 24, 48, 19.2,38.4, 13, 26, 20, or 40 MHz.

    Also, there are only 2 possible clock sources either Internal clock or External clock/event input via timer input pins. So, it is not possible for internal multiplexing to duplicate the RTC 32kHz clock signal to feed the timers.

    Please check Section 31.3.5 Timer Counter Registers (TIM12 and TIM34) & Section 28.3.14 Control Register  (CTRL) for RTC 32-kHz counter to stop/run the counter in the OMAPL138 TRM doc. below:

    http://www.ti.com/lit/ug/spruh77a/spruh77a.pdf

    Also, please check Section 7.1 in the above doc. to understand the overview of all peripheral device clocking and also refer table 7.1 & 7.2, Fig. 7.1

    Thanks & regards,

    Sivaraj K

    ------------------------------------------------------------------------------------------------------- 
    Please click the Verify Answer button on this post if it answers your question.
    --------------------------------------------------------------------------------------------------------

  • Hi Sivaraj,

    Thanks for the reply.

    Thank for confirming that there is no possibility of routing the RTC clock signal to the timers. 

    I am aware of how the PLL controller works, my question with regards to fixed frequencies refers to the accuracy and consistency of the frequencies. For example: is there a guarantee on what the true frequency will be such as 24 MHz +- 0.1% or so?

    Regards,

    Reino 

  • Reino,

    Thanks for your update.

    Yes, it is fixed and you will get the true frequency.

    Regards,

    Sivaraj K

    ------------------------------------------------------------------------------------------------------- 
    Please click the Verify Answer button on this post if it answers your question.
    --------------------------------------------------------------------------------------------------------
  • Hi Sivaraj,

    I am concerned about the frequency accuracy, surely nothing could possibly be 100% accurate. I will try to find the specification of the crystal somewhere.

    Regards,

    Reino

  • Hi

    In general we do not recommend using output from PLL as a clock source, when you are striving for high accuracy *however* in this case the timer 0/1 in the device design are sourced by the AUXCLK, which bypasses the PLL. So really the frequency accuracy of this is going solely going to depend on the accuracy of your clock source.

    Regards

    Mukul

  • Hi Mukul,

    Thanks for clarifying.

    Regards,

    Reino