Rasclock (PCF2127 ) Hardware Clock FreeBSD 12.0
Ian Lepore
ian at freebsd.org
Thu Jul 18 17:07:43 UTC 2019
On Thu, 2019-07-18 at 19:38 +0300, Stefan Parvu wrote:
> It seems the battery is a real pain in this model. I cant figure out
> any vendor.
> Tried already 3 models. All do not keep the time.
>
> root at k1:~ # dmesg | grep nxp
> nxprtc0: <NXP PCF2129 RTC> at addr 0xa2 on iicbus0
> nxprtc0: WARNING: RTC battery failed; time is invalid
> nxprtc0: registered as a time-of-day clock, resolution 0.015625s
> nxprtc0: RTC clock not running
>
> It seems the battery must be 36mAh. But even so some new model I got
> does not work. Damn.
>
>
There is something not-right about that. My battery had gone dead
because the rpi sat unpowered for a couple years. I replaced it with a
generic panasonic 35mAh cr1220 (not even a fresh new one, it's been in
its package on the shelf for several years), and now everything is
fine. I did an overnight power-off test last night, and this morning
it came back up and time was correct to within .025 sec.
According to the datasheet, the battery will keep the clock running
until it falls below 1.2v. I can't believe that a new cr1220, even a
cheap one that's been sitting around for years, is that dead.
I think the nxprtc driver is leaving the clock-output pin enabled on
the chip even when running on battery. That makes the chip use 2500nA
instead of 750nA. I'll look into that in more detail later today,
after $work is done. But even so, that's the kind of problem that
would drain a new battery in a couple years (instead of the 7-8 years
it should last).
-- Ian
More information about the freebsd-arm
mailing list