User avatar
ben_nuttall
Posts: 235
Joined: Sun Aug 19, 2012 11:19 am
Location: Cambridgeshire, UK
Contact: Website Twitter

RTC not maintaining time on reboot

Mon Nov 30, 2015 7:32 pm

I've installed an RTC, the sd1307, removed the fake-hwclock package and added dtoverlay=i2c-rtc,ds1307 to my config.txt.

I can successfully write to the clock, then read it. However, after a reboot, trying to read the clock gives the following error:

Code: Select all

hwclock: The Hardware Clock registers contain values that are either invalid (e.g. 50th day of month) or beyond the range we can handle (e.g. Year 2095).
I'm on Jessie but I've tried reverting to a Wheezy image and get the same result.

Is there a trick I'm missing?
Former RPF staff. Author of gpiozero and creator of piwheels.

fruit-uk
Posts: 609
Joined: Wed Aug 06, 2014 4:19 pm
Location: Suffolk, UK

Re: RTC not maintaining time on reboot

Mon Nov 30, 2015 7:58 pm

There have been several posts since jessie introduction but see this recent thread for a start viewtopic.php?f=29&t=127039&p=850068&hi ... ie#p850068

User avatar
ben_nuttall
Posts: 235
Joined: Sun Aug 19, 2012 11:19 am
Location: Cambridgeshire, UK
Contact: Website Twitter

Re: RTC not maintaining time on reboot

Mon Nov 30, 2015 9:24 pm

Disabling ntp seemed to have done the trick.

Code: Select all

sudo update-rc.d ntp disable
Former RPF staff. Author of gpiozero and creator of piwheels.

fruit-uk
Posts: 609
Joined: Wed Aug 06, 2014 4:19 pm
Location: Suffolk, UK

Re: RTC not maintaining time on reboot

Mon Nov 30, 2015 9:43 pm

I have ntp working fine, If you want it enabled take a look at the link I posted in the same thread

Return to “Interfacing (DSI, CSI, I2C, etc.)”