Commit 16573452 authored by Dave Hylands's avatar Dave Hylands Committed by Damien George
Browse files

stmhal: f7: Fix recent RTC change to build on F7.

parent 3833d384
......@@ -181,7 +181,11 @@ void rtc_init(void) {
// 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)) {
// remove Backup Domain write protection
#if defined(MCU_SERIES_F7)
PWR->CR1 |= PWR_CR1_DBP;
#else
PWR->CR |= PWR_CR_DBP;
#endif
// Clear source Reset Flag
__HAL_RCC_CLEAR_RESET_FLAGS();
// provide some status information
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment