[SOLVED] [Raspberry_Pi] RTC Clock Support?
July 26, 2013 at 14:09 #6621
Hello, and again thank you for porting to the Raspberry Pi.
Is there any way to get a kernel build that will support a Real Time Clock (RTC)?
I have a pcf2127a clock and would love to make it work instead of the ntp.
The npt requests are filling my firewall logs in my router-server (Smoothwall.org).
I had built a kernel module for the RTC for rasbian, but I don’t see any provision for
the module under /lib/modules/18.104.22.168/kernel/driver/. Am I missing something?
LGJuly 27, 2013 at 03:48 #6622
We recently added support for this module. It features a PCF2129A in I2C mode (address 0×51). If the PCF2127A on your module is also connected to I2C (and not to SPI), you might want to try snapshot r16285 or later. With this, the “hwclock” command on the console should work. In order to let the system make use of that you need to run “systemctl unmask hwclock-sync” once.
BTW, which kernel module did you use on Raspbian ?
July 30, 2013 at 20:38 #6644
- This reply was modified 1 year, 1 month ago by Warped Rudi.
I am currently running r16294.
The RTC kernel module I built from the latest rpi-3.6.y source (22.214.171.124) from Raspberry Pi
I have the RTC connected via I2C.
The RTC is from ModMyPi….they got it from:
instead of downloading a new image for the kernel, I built the module and inmod
as was suggested in one of the replies by user OE3SUW. There was an error with his instructions
however another user had a one line fix.
The RTC ran fine under raspbian. and I could see there were many kernel modules in the rtc directory
(/lib/modules/126.96.36.199/kernel/driver/rtc), however i don’t have an rtc directory using geexbox.
I am assuming the rtc was never built for it.
Thank you for your reply.July 31, 2013 at 02:29 #6646
Since the only difference between the PCF2129A and PCF2127A appears to be the lack/presence of 512 bytes of battery-backed RAM, your device should work with the kernel we supply in r16294 “out of the box”. I.e. no need to compile anything. There are no modules in the rtc directory, because the one and only RTC driver we have configured (i.e. AbioRTC/PCF2129) is built directly into the kernel. It *should* auto-detect the device no matter which revision of the RPi hardware is used.
Did you check, if your RTC is recognized ? I.e. run “hwclock” from a console (telnet, ssh or serial) ? Does /sys/class/rtc/rtc0 exist ?July 31, 2013 at 04:04 #6649
I had time this morning to run the “systemctl unmask hwclock-sync” and “hwclock’. I set the date and used hwclock to set the hardware time.
now for the silly question, I was under the impression that I should see the rtc module when I typed lsmod.
but I don’t see it listed. How can I be sure it is there?
LGJuly 31, 2013 at 04:11 #6651
Sorry I missed your last post, yes it is there.
rtc0 -> ../../devices/platform/bcm2708_i2c.1/i2c-1/1-0051/rtc/rtc0
so I guess it is working.
I was put off a bit by the seconds column being all zeros.
“Wed Jul 31 04:45:01 2013 0.000000 seconds”
as on the raspbian build I have it shows numbers in the seconds columns.
“Wed Jul 31 04:39:20 2013 0.231923 seconds”
Thank you for you help and explaining it to me, even after using Linux for 15 years,
I can still learn new tricks. I am still having fun.
I guess we can mark this as solved.
You must be logged in to reply to this topic.