Page 1 of 1

Hypriot : RTC DS3231 installation

Posted: Thu May 03, 2018 10:14 pm
by samoud

I'm trying to use the RTC DS3231 for my Raspberry pi 3 that has Hypriot OS.

1- add dtoverlay=i2c-rtc,ds3231 to config.txt
2- remove fake-hwclock
3- edit /lib/udev/hwclock-set

Code: Select all

#if [ -e /run/systemd/system ] ; then
#   exit 0
4- add to /etc/modules
But I get two errors :

the first one when I try to run hwclock -w or -r :

Code: Select all

hwclock from util-linux 2.29.2
Using the /dev interface to the clock.
Last drift adjustment done at 1525385458 seconds after 1969
Last calibration done at 1525385458 seconds after 1969
Hardware clock is on UTC time
Assuming hardware clock is kept in UTC time.
Waiting for clock tick...
/dev/rtc does not have interrupt functions. Waiting in loop for time from /dev/rtc to change
hwclock: Timed out waiting for time change.
...synchronization failed
Time since last adjustment is -1525385458 seconds
Calculated Hardware Clock drift is 0.000000 seconds
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).
and when I run sudo echo ds1307 0x68 > /sys/class/i2c-adapter/i2c-1/new_device :

Code: Select all

echo: write error: Invalid argument
The clock stays at the shutdown time after a reboot.

Any idea ?