0

Trying to get an RTC to load at boot. I've enabled i2c, that works fine for other components.

/etc/modules contains:

snd-bcm2835
i2c-bcm2835
i2c-dev 
rtc-ds3231

/etc/rc.local contains:

echo ds3231 0x68 > /sys/class/i2c-adapter/i2c-1/new_device
hwclock -s

i2cdetect -y 1 shows UU in the 68 slot

I can set the date using hwclock with -r, '-w', and -s successfully

if I reboot, I get from hwclock -r

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 can then write, read and sync with it again fine.

Any suggestions?! I've tried replacing the RTC module, but the same thing happens. Same if I remove the battery from the RTC.

If I remove the battery, the first time I boot it will show the date in the year 2000, but after that it'll go back to the error.

  • Solved by following the instruction here: raspberrypi.org/forums/viewtopic.php?t=161133 – zotty Jul 19 '18 at 12:05
  • You know self answering is allowed? So if you can expand what is in that link with your own experience that worked for the context you describe, it would be a reasonable answer, no? – rene Jul 19 '18 at 15:35

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.