0

I want to interface precision RTC DS3231 with Raspberry Pi3, so that my PI will get accurate time (even in the absence of network). I am using the latest raspbian image 2016-05-27-raspbian-jessie. I could be able to interface DS3231 with raspberry pi. I gets the correct timing when i hwclock -r. But the problems arise, when i reboots. RTC is getting corrupted to 2066-01-01 after reboots. And i cross checked the RTC with Atmega32 and confirmed that it is working properly. I have tried various methods available in net. I could not make it. Please help. I have connected RPi3 with DS3231 RTC as given below.

BCM 2 (SDA) to SDA

BCM 3 (SCL) to SCL

3.3 to VCC

GND to GND

i2cdetect output

sudo i2cdetect -y 1 output is this

enter image description here

  • 1
    What have you tried? Please edit your question and include the code you are using, pictures showing all the connections and the output of the following command: sudo i2cdetect -y 1 – Steve Robillard Aug 24 '16 at 12:12
  • 1
    Also what are you trying to do? What are you using the DS3231 for? – joan Aug 24 '16 at 12:51
  • 1
    As per joan's comment "I could not make it" assumes we are mind readers with regard to what you could not make "it" do. It appears the RTC is correctly connected and recognized at address 0x68, so what is your actual problem? Please explain 1) What you are trying to do with the clock, 2) How you tried to do it, and 3) What happened that did not meet your expectations. – goldilocks Aug 24 '16 at 13:25
  • 1
    Do not: 1) Expect other people to bother reading the tutorial material you have read; either cut n' paste the relevant bits or use your own words, 2) Add the material in comments here. Edit it into the question as you did before (Steve did ask you to include this all this information in the first place, not just i2cdetect output). – goldilocks Aug 24 '16 at 13:28
  • You still are not doing what I and others ask you to. 1) you are still using the comments to provide additional info when you were asked to edit your question and add those details to your question. 2) where is your code? It should be included above. Without seeing the code you are using we can't help. And your question will never be reopened. – Steve Robillard Aug 24 '16 at 23:08
0

I disabled NTP server. Even though RTC won't get updated when connected to network, RTC is not getting corrupted. I disabled NTP with this command.

update-rc.d ntp disable

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.