stmhal: f7: Fix recent RTC change to build on F7.
This commit is contained in:
parent
3833d3846d
commit
165734522e
@ -181,7 +181,11 @@ void rtc_init(void) {
|
|||||||
// if LTE enabled & ready --> no need to (re-)init RTC
|
// if LTE enabled & ready --> no need to (re-)init RTC
|
||||||
if ((RCC->BDCR & (RCC_BDCR_LSEON | RCC_BDCR_LSERDY)) == (RCC_BDCR_LSEON | RCC_BDCR_LSERDY)) {
|
if ((RCC->BDCR & (RCC_BDCR_LSEON | RCC_BDCR_LSERDY)) == (RCC_BDCR_LSEON | RCC_BDCR_LSERDY)) {
|
||||||
// remove Backup Domain write protection
|
// remove Backup Domain write protection
|
||||||
|
#if defined(MCU_SERIES_F7)
|
||||||
|
PWR->CR1 |= PWR_CR1_DBP;
|
||||||
|
#else
|
||||||
PWR->CR |= PWR_CR_DBP;
|
PWR->CR |= PWR_CR_DBP;
|
||||||
|
#endif
|
||||||
// Clear source Reset Flag
|
// Clear source Reset Flag
|
||||||
__HAL_RCC_CLEAR_RESET_FLAGS();
|
__HAL_RCC_CLEAR_RESET_FLAGS();
|
||||||
// provide some status information
|
// provide some status information
|
||||||
|
Loading…
x
Reference in New Issue
Block a user