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.

Beaglebone Black + JB 4.2.2 System Time jumps

Hi Guys!

I have some trouble with system time on multiple Beaglebone Black boards including Rev A5A, A5C and A6.

The use case is, that after successful NTP sync time randomly jumps up from 1 hour to a whole day. Then NTP sets it back and it is going around.... I wanted to be sure that it is not NTP service who messes up so I disconnected my bone from the Internet, and the outcome was the expected it jumped randomly up and up and after a day it was ahead 4 days. So in my opinion the problem is on kernel level but the most suspicious part could be again some hw part which causes noise... similarly like it is described in this thread:

http://e2e.ti.com/support/arm/sitara_arm/f/791/t/303825.aspx

Have anyone experienced a similar issue? I tried to run the bone on its own without any custom peripheral and the issue is there too.

I'm attaching some logs I'm now planning to enable some logging in kernel/arch/arm/mach-omap2/timer.c and wait if I see something...

Could anyone help me where and how to start? Thanks!

1207.systime.log

Best Regards,

sodjas

  • Hi Sodjas,

    The wall clock is based on clocksource. The timer for clocksource is DMTIMER1_1MS in am335x. The DMTIMER1_1MS input source currently is RTC32K which is configured to use external oscillator.

    Can we see changing DMTIMER1_1MS source to main oscillator and see if the issue exists?

    --- a/arch/arm/mach-omap2/timer.c
    +++ b/arch/arm/mach-omap2/timer.c
    @@ -420,7 +420,7 @@ OMAP_SYS_TIMER(3)
     OMAP_SYS_TIMER_INIT(3_secure, OMAP3_SECURE_TIMER, OMAP3_CLKEV_SOURCE,
                            2, OMAP3_MPU_SOURCE)
     OMAP_SYS_TIMER(3_secure)
    -OMAP_SYS_TIMER_INIT(3_am33xx, 2, OMAP4_MPU_SOURCE, 1, AM33XX_RTC32K_SOURCE)
    +OMAP_SYS_TIMER_INIT(3_am33xx, 2, OMAP4_MPU_SOURCE, 1, OMAP4_MPU_SOURCE)
     OMAP_SYS_TIMER(3_am33xx)
     #endif

    Regards,

    Arun

  • Dear Arun,

    Thanks very much, patch applied, test running, I will come back to you with the updates!

    Cheers,

    sodjas

  • Hey Arun!

    This solved the issue! I have now corrected time without jumps for 3 days! Thank you very much!!

    Best Regards,

    sodjas

  • Hai dear Arun ... I have the same problem Clock jumping after long run issue. I am working am335xevm beaglebone (white) board with Android JellyBean4.1.2 . The mentioned patch file can solve the issue ? I have already tried it & now it's under testing . Lot of thanks Arun.