Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision | |||
ntp:ds3231_pi [2021/02/25 12:58] john removed |
— (current) | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== DS3231 on Raspberry Pi ====== | ||
- | ===== Enable i2c ===== | ||
- | in / | ||
- | |||
- | < | ||
- | dtparam=i2c_arm=on | ||
- | </ | ||
- | |||
- | reboot | ||
- | |||
- | ===== Install Requirements ===== | ||
- | < | ||
- | sudo apt-get install python-smbus i2c-tools | ||
- | </ | ||
- | |||
- | ===== Confirm Presence ===== | ||
- | < | ||
- | sudo i2cdetect -y 1 | ||
- | </ | ||
- | |||
- | < | ||
- | | ||
- | 00: -- -- -- -- -- -- -- -- -- -- -- -- -- | ||
- | 10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- | ||
- | 20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- | ||
- | 30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- | ||
- | 40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- | ||
- | 50: -- -- -- -- -- -- -- 57 -- -- -- -- -- -- -- -- | ||
- | 60: -- -- -- -- -- -- -- -- 68 -- -- -- -- -- -- -- | ||
- | 70: -- -- -- -- -- -- -- -- | ||
- | </ | ||
- | |||
- | ===== Add Overlay ===== | ||
- | to / | ||
- | |||
- | < | ||
- | dtoverlay=i2c-rtc, | ||
- | </ | ||
- | |||
- | reboot | ||
- | |||
- | |||
- | ===== Confirm Use ===== | ||
- | < | ||
- | sudo i2cdetect -y 1 | ||
- | </ | ||
- | |||
- | < | ||
- | | ||
- | 00: -- -- -- -- -- -- -- -- -- -- -- -- -- | ||
- | 10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- | ||
- | 20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- | ||
- | 30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- | ||
- | 40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- | ||
- | 50: -- -- -- -- -- -- -- 57 -- -- -- -- -- -- -- -- | ||
- | 60: -- -- -- -- -- -- -- -- UU -- -- -- -- -- -- -- | ||
- | 70: -- -- -- -- -- -- -- -- | ||
- | </ | ||
- | |||
- | ===== Disable Fake hwclock ===== | ||
- | |||
- | < | ||
- | sudo apt-get -y remove fake-hwclock \ | ||
- | sudo update-rc.d -f fake-hwclock remove \ | ||
- | sudo systemctl disable fake-hwclock | ||
- | </ | ||
- | |||
- | ===== Re-Enable Real hwclock ===== | ||
- | edit | ||
- | |||
- | < | ||
- | |||
- | |||
- | comment these lines: | ||
- | |||
- | (7,8, 9) | ||
- | |||
- | < | ||
- | if [ -e / | ||
- | exit 0 | ||
- | fi | ||
- | </ | ||
- | |||
- | 29: | ||
- | |||
- | < | ||
- | |||
- | 32: | ||
- | |||
- | < | ||
- | |||
- | reboot | ||
- | |||