Skip to content

Commit

Permalink
double sync when setting time
Browse files Browse the repository at this point in the history
  • Loading branch information
joeycastillo committed Jul 11, 2024
1 parent 1eeed9c commit a076b3b
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions peripherals/rtc.c
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}
Expand Down

0 comments on commit a076b3b

Please sign in to comment.