mirror of https://github.com/ARMmbed/mbed-os.git
Merge pull request #1559 from adustm/b_stm32f7_rtcfix
[STM32F7 family] fix issue with RTC initpull/1567/head
commit
5b9a91ed96
|
@ -77,7 +77,8 @@ void rtc_init(void)
|
|||
rtc_freq = LSI_VALUE;
|
||||
}
|
||||
|
||||
if((RTC->ISR & RTC_ISR_INITS) == RTC_ISR_INITS) { // RTC initialization and status register (RTC_ISR), cold start (with no backup domain power) RTC reset value
|
||||
// Check if RTC is already initialized
|
||||
if ((RTC->ISR & RTC_ISR_INITS) == RTC_ISR_INITS) return;
|
||||
|
||||
// Enable RTC
|
||||
__HAL_RCC_RTC_ENABLE();
|
||||
|
@ -92,8 +93,6 @@ void rtc_init(void)
|
|||
if (HAL_RTC_Init(&RtcHandle) != HAL_OK) {
|
||||
error("RTC error: RTC initialization failed.");
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
void rtc_free(void)
|
||||
|
|
Loading…
Reference in New Issue