1
0
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:
Dylan Laduranty 2022-06-06 22:45:42 +02:00 committed by GitHub
commit a6ac93d429
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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;
}