0

I am working on a pi hat that will cut the Pi's power in the evening when the pi isn't being used in my application. Anyways, I have a couple questions about using the DS3231 RTC.

There is a uC in the power circuit that is used as glue logic to control the load switch IC that controls the power to the pi. I need the alarm functionality of this RTC to tell the uC to apply power to the pi so that it can be turned back on. The pi will then clear the alarm, perform it's operations, then go to sleep again after setting the next alarm. Anyways, using the DS3231 as the dtoverlay, am I still able to set and clear alarms through I2C? Will this create contention between the Python I2C commands and the kernel trying to update the time of the OS? I haven't been able to find anything about this and need to determine if I need to re-design this aspect of the software.

  • To much questions for one question. You should try to reduce them to one question or create more than one question. – Ingo Oct 7 '18 at 19:59
  • @Ingo I have updated my post to reflect my true issue. Thanks for the suggestion! – nichollsg Oct 11 '18 at 21:25
2

To answer your first question the ONLY thing you have to do is include in /boot/config.txt:

dtoverlay=i2c-rtc,ds3231

DO NOT fiddle with the software or attempt to manually synchronise - it all happens AUTOMATICALLY. The DS3231 should maintain time to ±2minutes/year (according to the data sheet).

See https://raspberrypi.stackexchange.com/a/51782/8697

After you have this working ask any subsequent questions.

  • Okay, I just updated my post with my actual question. I see what you're saying, so I'm now trying to determine how to go about setting/clearing alarms with your suggestion about setting the RTC as the dtoverlay. – nichollsg Oct 9 '18 at 1:52

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.