From a076b3b496b39c1018afda4b8f50d15b75f0c208 Mon Sep 17 00:00:00 2001 From: joeycastillo Date: Wed, 10 Jul 2024 20:38:57 -0400 Subject: [PATCH] double sync when setting time --- peripherals/rtc.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/peripherals/rtc.c b/peripherals/rtc.c index a2d4ef5..29a1a63 100644 --- a/peripherals/rtc.c +++ b/peripherals/rtc.c @@ -77,6 +77,8 @@ void rtc_enable(void) { } void rtc_set_date_time(rtc_date_time date_time) { + // syncing before and after was found to increase reliability on Sensor Watch + _rtc_sync(); RTC->MODE2.CLOCK.reg = date_time.reg; _rtc_sync(); }