Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 18 Jul 2019 11:07:32 -0600
From:      Ian Lepore <ian@freebsd.org>
To:        Stefan Parvu <sparvu@kronometrix.org>, freebsd-arm@freebsd.org
Subject:   Re: Rasclock (PCF2127 ) Hardware Clock FreeBSD 12.0
Message-ID:  <c73afb01fca5d4bf5ceb833ab6bae48af5bb1605.camel@freebsd.org>
In-Reply-To: <A53C9BE4-B3A7-4F15-808F-AB9846674625@kronometrix.org>
References:  <41A4CA5C-B487-490F-8A19-2D51F43E1004@kronometrix.org> <95616620-bbaf-dbc3-49eb-3e2562638d49@bunyatech.com.au> <AB510253-52D9-469C-B06E-5EC73C5F188E@kronometrix.org> <fd9991c4e6aaccb812a59ff86c9c8564ebd1d767.camel@freebsd.org> <74E3E782-8481-4B5B-A0AF-A04590C27D6D@kronometrix.org> <790afcb5f0809a89b45982958a85f1539fec05c7.camel@freebsd.org> <36088812-2135-4433-BC49-0BC433EC6767@kronometrix.org> <c52f9d9ab358ac0dc09af411bf97625945579b4e.camel@freebsd.org> <86CC4711-47AC-45C6-B6D3-71C9FFDD4A91@kronometrix.org> <BE321299-8569-4B2E-98FD-FD5210E1B6AF@kronometrix.org> <A9FD7D2B-9382-4EAE-B245-5F4DE643DBB7@gromit.dlib.vt.edu> <C93E2C64-6280-464D-AB5F-B1E968690CEF@kronometrix.org> <2ec7d7f63de31065b9cab396c662fe24f0107078.camel@freebsd.org> <BD0BE075-9E69-4CB0-826A-5DF2D160E9B1@kronometrix.org> <d71fc4e3db26242ffa817814d6cd92b8899fc2ab.camel@freebsd.org> <EF94BC84-4B8D-455C-952F-4FD1CC5557CE@kronometrix.org> <2AC05799-7D11-4200-8D16-38E3718470BB@kronometrix.org> <91E26684-07A0-4F03-92BC-8D49359B1358@kronometrix.org> <5F33E59B-7EA5-4B8B-A95A-CD1FB569ACDC@kronometrix.org> <6a39f74088d2984b5426e8585b5f7e864a6766f8.camel@freebsd.org> <571EABD9-364C-4D91-9177-CC25CB382D76@kronometrix.org> <A53C9BE4-B3A7-4F15-808F-AB9846674625@kronometrix.org>

next in thread | previous in thread | raw e-mail | index | archive | help
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@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




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