Skip to content

Commit

Permalink
Merge pull request #18150 from benpicco/cpu/sam0_common-rtc_sync
Browse files Browse the repository at this point in the history
cpu/sam0_common: RTC: wait for syncbusy in rtc_get_time()
  • Loading branch information
dylad authored Jun 6, 2022
2 parents ca0e651 + d77724b commit a6ac93d
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions cpu/sam0_common/periph/rtc_rtt.c
Original file line number Diff line number Diff line change
Expand Up @@ -90,8 +90,8 @@ static void _read_req(void)
{
#ifdef RTC_READREQ_RREQ
RTC->MODE0.READREQ.reg = RTC_READREQ_RREQ;
_wait_syncbusy();
#endif
_wait_syncbusy();
}
#endif

Expand Down Expand Up @@ -644,7 +644,6 @@ void rtt_clear_overflow_cb(void)

uint32_t rtt_get_counter(void)
{
_wait_syncbusy();
_read_req();
return RTC->MODE0.COUNT.reg;
}
Expand Down

0 comments on commit a6ac93d

Please sign in to comment.