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.

AM3874: the precision of AM3874 CLOCK module

Part Number: AM3874
Other Parts Discussed in Thread: AM5728

Hi,

I have one question regarding AM3874 clock module.

My customer inputs 20MHz clock to AM3874's DEV_CLKIN. And the 32.768kHz CLK for RTC is made by internal clock module.

I would like to know the precision of this clock module. Becuase my customer says some AM3874 device delays tem minutes per one month.

So I would like to know the precision  of clock module. Please advise me.

I appreciate your quick reply.

Best regards,

Michi

  • Moving this to the AM387X forum.
  • Michi,

    Do you need to know the AM387x RTC module precision? If yes, refer to AM387x TRM, chapter 20 Real-Time Clock (RTC). Some extract below:

    The real-time clock is a precise timer which can generate interrupts on intervals specified by the user. Interrupts can occur every second, minute, hour, or day. The clock itself can track the passage of real time for durations of several years, provided it has a sufficient power source the whole time.

     

    The real-time clock (RTC) provides the following features:

    • 100-year calendar (xx00 to xx99)

    • Counts seconds, minutes, hours, day of the week, date, month, and year with leap year compensation

    • Binary-coded-decimal (BCD) representation of time, calendar, and alarm

    • 12-hour clock mode (with AM and PM) or 24-hour clock mode

    If you are using external pin (CLKIN32, J7) to supply 32k clock to RTC, make sure you are align with CLKIN32 timing requirements described in AM387x datasheet, Table 8-18. Timing Requirements for CLKIN32

    If you are using device oscillator (crystal) to supply 32k clock to RTC, make sure you are align with DEVOSC requirements described in AM387x datasheet, Table 8-11. Input Requirements for Crystal Circuit on the Device Oscillator (DEVOSC)

    If you are using external clock oscillator, make sure you are align with timing requirements described in AM387x datasheet, Table 8-15. Timing Requirements for DEVOSC_MXI/DEV_CLKIN

     

    See also if the below pointers will be in help:

    Regards,
    Pavel

  • Dear Pavel-san,

    Thank you for your reply.

    > If you are using external clock oscillator, make sure you are align with timing requirements described in AM387x datasheet, Table 8-15. Timing Requirements for DEVOSC_MXI/DEV_CLKIN

    Yes, my customer uses the external clock oscillator 20MHz output. For 32.768kHz clk of RTC, they don't use external crystal or oscillator. Customer uses 32.768khz clock made by internal clock module. As to my understanding, 32.768kHz clock is supplied from RTCDIVIDER.

    If 20MHz clock (external clock oscillator) has +- 1% accuracy, how accuracy does 32.768kHz clock have for RTC?

    Please advise me again.

    Best regards,
    Michi
  • Michi,

    Michi Yama said:
    If 20MHz clock (external clock oscillator) has +- 1% accuracy, how accuracy does 32.768kHz clock have for RTC?

    I have check AM387x documentation and I can NOT find info that RTCDivider add some additional inaccuracy to the clock signal, thus I assume we still have +- 1% accuracy for the 32.768KHz clock.

    Regards,
    Pavel

  • Dear Pavel-san,

    Thank you for your quick reply.

    I understood internal 32.768kHz clock keep the accuracy.

    BTW, some of my customer's AM3874 system delays 10 minutes per a month. Do you have any idea why this system such so delay ?

    I appreciate your support.

    Best regards,

    Michi

  • Michi,

    I found that we have some inaccuracy added from RTC divider in AM57x device, I assume the same is valid for AM387x device also.

    Typically the RTC reference clock is 32768 Hz which can be represented by a 15 bit binary value. 20 MHz divided by 610 is 32786.8852 Hz, which cannot be represented by a binary value. This difference represents a 576.33 PPM error which would not provide a very accurate RTC.

    This PPM error brings around 0.058% inaccuracy from the RTC divider. The reason by this 10 minutes per month delay might be caused by this 0.058% plus 1% from the external crystal.

     

    Generally, the accuracy of an RTC depends on the accuracy of the crystal. According to the datasheet the specified maximum tolerance for the RTC clock input frequency is ±200ppm (± 0.02%) (see Table 8-15. Timing Requirements for DEVOSC_MXI/DEV_CLKIN). Please take into account that this is max value. You should choose lower value for better accuracy.

    There is a crystal compensation feature of the RTC IP. Please refer to section "20.2.4.6 Crystal Compensation" of the AM387x TRM for more details.

    Regards,
    Pavel

     

  • Dear Pavel-san,

    Thank you for your quick reply. It is very helpful for me.

    I can't access three E2E link you posted. Are these site accessible for me?

    I appreciate your support.

    Best regards,
    Michi
  • Michi Yama said:
    I can't access three E2E link you posted. Are these site accessible for me?

    This link is for internal E2E forum. You can access it through your local TI FAE. I posted the main info in this e2e thread, posting it again:

    Typically the RTC reference clock is 32768 Hz which can be represented by a 15 bit binary value. 20 MHz divided by 610 is 32786.8852 Hz, which cannot be represented by a binary value. This difference represents a 576.33 PPM error which would not provide a very accurate RTC.

  • Dear Pavel-san,

    Thank you for your continuos cooperation.

    I would like to confirm some points. Please see the below.

    1) Regarding " 576.33 PPM error " : You pointed out the difference between 32786.8852Hz and 32768Hz is 576.33PPM. Is this value made by the below equation?

       32786.8852 / 32768 = 1.000576330564 ---> 576.33 ppm

    2) Is thi error always added? In other wards, is RTC always delayed?

    3) If Input clock 20MHz is +-0 ppm, how error is per month? The below is my estimation. I think two ways.

          a)32768Hz :   1sec. = 32768 * 1 / 32768 = 0.99999973376 sec.

             32786Hz :   1sec. = 32768 * 1 / 32786 = 0.99945086976 sec.

             0.99999973376 - 0.99945086976 = 0.00054886784 ----> 549us delayed / sec.

             549us x (60 x 60 x 24 )  = 47.4336  delayed / day

             47.4336 x 30 = 1423.008 sec. = 23.7168 minute delayed/ month  ------> approximately 24 minute delayed / month.

           b) The difference per one second is 576.33 ppm -----> 576.33 x 10(^-6) x 60 x 60 x 24 x 30 = 1493. 84736 sec. = 24. 897456  minute -----> approximately 24 minute delayed /month

    4) You said this information is found in internal E2E of AM5728. This means AM5728 has same issue. Is my understanding right?

    5) According to the TRM of AM3874, AM3874 has Compensation (LSB or MSB) Register. Does this regigser help to disappear 576.33ppm error?

    6) According to the TRM of AM3874, RTCDIVIDER can generate 32768Hz from 20MHz input. But, in fact, it is 32786Hz, not 32768Hz. Is this typo of TRM?

    I appreciate your continuous support.

    Best regards,

    Michi

  • Michi Yama said:

    1) Regarding " 576.33 PPM error " : You pointed out the difference between 32786.8852Hz and 32768Hz is 576.33PPM. Is this value made by the below equation?

       32786.8852 / 32768 = 1.000576330564 ---> 576.33 ppm

    No, this is not correct. Let me double check and come back to you with the correct formula.

    Michi Yama said:
    2) Is thi error always added? In other wards, is RTC always delayed?

    Yes

    Michi Yama said:
    3) If Input clock 20MHz is +-0 ppm, how error is per month? The below is my estimation. I think two ways.

    When input 20MHz clock is +- 0ppm, you will have delay only from RTCDivider, +- 0.058% (+- 576.33 ppm)

    Michi Yama said:
    4) You said this information is found in internal E2E of AM5728. This means AM5728 has same issue. Is my understanding right?

    The AM57x has this issue, and I suspect AM387x has this issue also

    Michi Yama said:
    5) According to the TRM of AM3874, AM3874 has Compensation (LSB or MSB) Register. Does this regigser help to disappear 576.33ppm error?

    Yes, at least to some extend

    Michi Yama said:
    6) According to the TRM of AM3874, RTCDIVIDER can generate 32768Hz from 20MHz input. But, in fact, it is 32786Hz, not 32768Hz. Is this typo of TRM?

    No. This is on purpose with the note that if you need precise RTC timer, you should supply external 32768Hz clock, not using RTCDivider.

    Michi Yama said:
       b) The difference per one second is 576.33 ppm -----> 576.33 x 10(^-6) x 60 x 60 x 24 x 30 = 1493. 84736 sec. = 24. 897456  minute -----> approximately 24 minute delayed /month

    Correct

    Regards,
    Pavel

  • Michi,

    See also AM335x datasheet, table Table 6-5. OSC1 Crystal Circuit Requirements

    We have calculations for +-20ppm and +-50ppm

    +-20ppm: Maximum RTC error = 10.512 minutes per year

    +- 50ppm: Maximum RTC error = 26.28 minutes per year


    Regards,
    Pavel
  • Michi Yama said:

    1) Regarding " 576.33 PPM error " : You pointed out the difference between 32786.8852Hz and 32768Hz is 576.33PPM. Is this value made by the below equation?

       32786.8852 / 32768 = 1.000576330564 ---> 576.33 ppm

    32786.8852 - 32768 = 18.8852

    18.8852/32768 = 0.000576331

    0.000576331 * 10E-6 = 576.33