Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hook into the Synch Event to update a DS3231 RTC? #52

Open
tfcroft4 opened this issue Nov 15, 2023 · 0 comments
Open

Hook into the Synch Event to update a DS3231 RTC? #52

tfcroft4 opened this issue Nov 15, 2023 · 0 comments

Comments

@tfcroft4
Copy link

My device is a real time clock that can be configured at base where there my be an internet connection and then deployed 'in the field' where there will not be an internet connection available. I would like to use the NTP synchronise event on the ESP32 to update the external DS3231 RTC. The RTC gives an accurate time reference and is battery backed so is available through power cycles. When NTP is available then I can get time synchronisation via the internet.

The ESP code base has the NTP sync callback: sntp_set_time_sync_notification_cb(cbSyncTime); which can be used to trigger an DS3231 update.

What would be the equivalent in the ESPNtpClient system to get a tight synchronisation of the System Time and the DS3231. After the 'event' I would wait for a second rollover to set the DS3231 time as close as possible to the system time.
Thanks
Ted

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant