rpi3 clock drift

Ian Lepore ian at freebsd.org
Tue Nov 26 22:43:46 UTC 2019


On Tue, 2019-11-26 at 14:29 -0800, Bakul Shah wrote:
> On Tue, 26 Nov 2019 22:03:30 +0000 James Shuriff <james at opentech.cc> wrote:
> > My Raspberry Pi 3 Model B is having some serious clock drift issues. Ntpd doe
> > sn't function even with ntpd_sync_on_start, which calls ntpd with -g and allo
> > ws the initial adjustment to exceed the panic threshold. This doesn't help me
> >  much because the system will continue to drift very quickly and that option 
> > only helps for the initial adjustment.
> > 
> > I was thinking of ordering an I2C RTC but I'm unsure how to make FreeBSD awar
> > e of the clock.
> > 
> > There is a file in the Raspberry Pi firmware repo called i2c-rtc.dtbo and it 
> > contains defs for clocks like DS1307 so I am assuming I can add this to confi
> > g.txt, build U-Boot with CONFIG_RTC_DS1307 (or whatever model), and build the
> >  kernel with device support for the clock but I'm not completely sure if I'm 
> > going about this the right way. Beyond just getting FreeBSD to see the clock 
> > I'm unsure how to tell FreeBSD to use it. Any advice?
> 
> Is the clock really drifting or is this due the initial time
> being waaay off from the current time due to a lack of RTC? If
> the latter do the initial time setup using ntpdate. Add
> 
> ntpdate_enable="YES"
> 
> to /etc/rc.conf.
> 
> If you can already use ntpd, there is not much point in using a local
> rtc.
> 

Using ntpd_sync_on_start=YES is effectively the same as using
ntpdate_enable=YES... it gives ntpd permission to step the clock any
amount, one time at startup.

-- Ian



More information about the freebsd-arm mailing list