mirror of https://github.com/ARMmbed/mbed-os.git
Workaround to fix RTC-reset issue on the EFM32GG11_STK3701
parent
41975a27ea
commit
e37aeb0c74
|
@ -55,7 +55,7 @@ void rtc_init(void)
|
||||||
/* Save time if it has been set */
|
/* Save time if it has been set */
|
||||||
time_t t = 0;
|
time_t t = 0;
|
||||||
if (RTCC->RET[1].REG == 0) {
|
if (RTCC->RET[1].REG == 0) {
|
||||||
t = rtc_read();
|
t = rtc_read();
|
||||||
}
|
}
|
||||||
|
|
||||||
RTCC_Reset();
|
RTCC_Reset();
|
||||||
|
@ -66,9 +66,9 @@ void rtc_init(void)
|
||||||
|
|
||||||
/* Update time */
|
/* Update time */
|
||||||
if (RTCC->RET[1].REG == 0) {
|
if (RTCC->RET[1].REG == 0) {
|
||||||
rtc_write(t);
|
rtc_write(t);
|
||||||
} else {
|
} else {
|
||||||
RTCC->RET[0].REG = 0;
|
RTCC->RET[0].REG = 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue