Fix rtc read issue

Signed-off-by: Sadik.Ozer <Sadik.Ozer@maximintegrated.com>
pull/15263/head
Sadik.Ozer 2022-03-06 01:57:51 +03:00
parent 8a2681bf6e
commit 65e6595d7b
1 changed files with 4 additions and 4 deletions

View File

@ -319,19 +319,19 @@ int MXC_RTC_RevA_GetTime(uint32_t* sec, uint32_t* subsec)
do {
// Check if an update is about to happen.
if (!(MXC_RTC->ctrl & MXC_F_RTC_REVA_CTRL_RDY)) {
continue;
return E_BUSY;
}
// Read the seconds count.
temp_sec = MXC_RTC_RevA_GetSecond();
if (temp_sec == E_BUSY) {
continue;
return E_BUSY;
}
// Check if an update is about to happen.
if (!(MXC_RTC->ctrl & MXC_F_RTC_REVA_CTRL_RDY)) {
continue;
return E_BUSY;
}
// Read the sub-seconds count.
@ -339,7 +339,7 @@ int MXC_RTC_RevA_GetTime(uint32_t* sec, uint32_t* subsec)
// Check if an update is about to happen.
if (!(MXC_RTC->ctrl & MXC_F_RTC_REVA_CTRL_RDY)) {
continue;
return E_BUSY;
}
// Read the seconds count.