mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2024-12-29 04:50:03 +01:00
Merge pull request #18150 from benpicco/cpu/sam0_common-rtc_sync
cpu/sam0_common: RTC: wait for syncbusy in rtc_get_time()
This commit is contained in:
commit
a6ac93d429
@ -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
|
||||
|
||||
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user