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.

Using RTC crystal clock trim on TIVA TM4C129ENCPDT - ROM_HibernateRTCTrimSet() does not seem to adjust RTCCLK PIN

Hi,

We are using the TIVA TM4C129ENCPDT - and have the RTC  and have the output of the RTC clock (32,768 crystal) on the RTCCLK GPIO PIN.  We are measuring it with a frequency counter and seeing about 32,769.52.  However, we are trying to use the trim function (ROM_HibernateRTCTimeSet()) to adjust it closer to 32,768.  However we see no change on the RTCCLK pin when calling the ROM_HibernateRTCTimeSet() with various values - We always get the same reading of 32,769.52 (appx).

Are there other registers we need to set/config to support this feature?  It important in our application to have a fairly accurate clock.

Thanks,

Bill

  • Hello Bill,

    The RTCCLK GPIO Pin will output the crystal clock and not the trim adjusted counter value. So if the crystal is showing 32769.52 then the trim will not be able to help. The Trim is only supposed to correct the RTC Count being maintained by the Hibernate Module

    Regards

    Amit

  • Amit,


         Not sure I follow you.  We are using the RTC counter that resides in the hibernate module.  (we call the ROM_HibernateRTCEnable() and functions to use it).  We also have a battery connected to VBAT that maintains the RTC counter when power is removed (we have verified this and it works). 

    So does the trim value get applied to the RTC while it is running and also on battery mode?

    Is the trim value applied to the RTC or to the Crystal Oscillator (I think you are saying its just to the RTC value)?

    What would be the best way to determine how to set the trim value?

    Thanks,

    Bill

  • Hello Bill

    The Trim gets applied to the RTC. The best way is to first measure the crystal frequency (that you have done) and then apply the trim values accordingly.

    Regards

    Amit

  • Hi,

    I think the measurement is not good, and the crystal frequency is disturbed by measurement probe (what is that?). Try also to use a 10:1 oscilloscope probe but insert a 10K resistor in series with the probe's tip and this should be attached to a frequency meter. 

    Petrei