Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 26 Nov 2019 15:41:10 -0700
From:      Ian Lepore <ian@freebsd.org>
To:        Stefan Parvu <sparvu@kronometrix.org>
Cc:        "freebsd-arm@freebsd.org" <freebsd-arm@freebsd.org>
Subject:   Re: rpi3 clock drift
Message-ID:  <84328c3ce2cf3cc73ff4f54a466f70c3bdd3b759.camel@freebsd.org>
In-Reply-To: <702EA0B2-5EA4-41C9-8E8A-D6A2BF634465@kronometrix.org>
References:  <MWHPR06MB3134CD05551D36CC3B45D368AA450@MWHPR06MB3134.namprd06.prod.outlook.com> <702EA0B2-5EA4-41C9-8E8A-D6A2BF634465@kronometrix.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, 2019-11-27 at 00:18 +0200, Stefan Parvu wrote:
> > I was thinking of ordering an I2C RTC but I'm unsure how to make
> > FreeBSD aware of the clock.
> 
> We are currently using and heavily testing this RTC: 
> https://afterthoughtsoftware.com/products/rasclock 
> 
> based on NXP PCF2129. See here complete description of a product
> based on FreeBSD 12 and RPI3+
> https://kronometrix.com/wp-content/uploads/2019/11/Kronometrix-K1.pdf
>  
> 
> Follow this thread for more instructions and hints how to get this
> RTC working with FreeBSD 12.
> 
http://freebsd.1045724.x6.nabble.com/Rasclock-PCF2127-Hardware-Clock-FreeBSD-12-0-td6339218.html
>  
> 

I don't see that I ever followed up in that thread about the rasclock,
but I eventually updated the driver to init the chip into a lower power
mode and basically doubled the running-on-battery lifetime (cut the
power draw in half).  I also added a sysctl that lets you set the
chip's oscillator drift tuning, and I found that by doing so you could
reduce the drift to about 1ppm (which is damn good for a cheap crystal
rtc).

You can just grab the code from the driver on head and recompile it on
whichever branch you're using to get those features.

-- Ian





Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?84328c3ce2cf3cc73ff4f54a466f70c3bdd3b759.camel>