Rasclock (PCF2127 ) Hardware Clock FreeBSD 12.0

Ian Lepore ian at freebsd.org
Wed Jul 17 21:55:05 UTC 2019


On Thu, 2019-07-18 at 00:42 +0300, Stefan Parvu wrote:
> nxprtc driver results
> 
> 1. Default test - passed 
> Description: I can see the driver, NTP runs ok, after reboot system
> is ok and I can see activity from RTC via sysctl 
> I can see sometimes from dmesg the following:
> 
> local_intc0: Spurious interrupt detected
> local_intc0: Spurious interrupt detected
> local_intc0: Spurious interrupt detected
> local_intc0: Spurious interrupt detected
> 
> 
> 2. System power off 2hrs - failed 
> Description: I set correctly the time on the system, NTP was running
> and I have shutdown the system.
> After two hours I powered back the system but I see the RTC battery
> failed. 
> 
> mbox0: mbox response error
> bcm2835_cpufreq0: can't get clock rate (id=8)
> bcm2835_cpufreq0: ARM 600MHz, Core 250MHz, SDRAM -999MHz, Turbo OFF
> nxprtc0: WARNING: RTC battery failed; time is invalid
> nxprtc0: registered as a time-of-day clock, resolution 0.015625s
> Release APs...done
> 
> 
> I have changed now Varta 3V CR1220 to Energizer CR1220. Lets see. 
> 
> 

The spurious interrupt problems are fixed with this patch (it isn't
really a problem, the patch just disables the messages):

https://svnweb.freebsd.org/base/head/sys/arm/broadcom/bcm2835/bcm2835_intr.c?r1=332262&r2=346489&view=patch

But this driver is built into the kernel, not a module, so you'll have
to replace the whole kernel from 12-RELEASE with the one you build
yourself.

My RasClock battery had gone dead too.  It was no more than 2 years old
at the most, but the rasclock was running on battery all that time
(until it died), because I almost never power on the rpi boards.  I
think the rasclock may use more battery power than some other rtc
boards because the chip it uses is more accurate than most.  Part of
how it does that is to use a temperature-compensated oscillator, but
that means it uses extra power to measure the temperature.

-- Ian



More information about the freebsd-arm mailing list