alphanumeric
Posts: 1897
Joined: Tue Jan 19, 2016 2:17 pm
Location: Sydney, Nova Scotia, Canada

DS1307 RTC no longer works in Stretch.

Fri Aug 18, 2017 4:00 pm

My DS-1307 RTC no longer works. Followed the same tutorial that worked with Jessie but the Pi won't pull the time from it. It has the correct time stored in it though. If I do a read its correct. Not sure what's going on? Tutorial I used is here, https://learn.adafruit.com/adding-a-rea ... pberry-pi I've gone over it three times looking for typo's etc. sudo hwclock -r shows the correct date and time. i2c detect shows UU where its supposed to be. I didn't see the 68 there initially though? Fresh image of Stretch, not an upgrade from Jessie. RTC worked just fine in Jessie following that tutorial. I didn't touch any of the wiring.

alphanumeric
Posts: 1897
Joined: Tue Jan 19, 2016 2:17 pm
Location: Sydney, Nova Scotia, Canada

Re: DS1307 RTC no longer works in Stretch.

Fri Aug 18, 2017 4:23 pm

I ran dmesg | grep ds1307 and got this.
rtc-ds1307 1-0068: rtc core: registered ds1307 as rtc0
rtc-ds1307 1-0068; 56 bytes nvram
I'm no expert but it looks correct to me? I disconnected from the Internet, shut down for a while, then booted up again. The DS-1307 has the correct time in it so its battery is good. Pi shows the time when I shut down though? And never syncs with the DS-1307. If I can read and write to the DS=1307 that means i2c is working right, correct?

alphanumeric
Posts: 1897
Joined: Tue Jan 19, 2016 2:17 pm
Location: Sydney, Nova Scotia, Canada

Re: DS1307 RTC no longer works in Stretch.

Fri Aug 18, 2017 9:18 pm

Started all over again from scratch and my RTC is now working. Must have been a glitch the first time around.

Return to “Raspbian”