Skip to content

Commit 57e00ef

Browse files
committed
stmhal: Fix RTC code to work on the F7
1 parent 7f3c0d1 commit 57e00ef

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

stmhal/rtc.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,7 @@ void rtc_init(void) {
211211
if (rtc_use_lse) {
212212
// fall back to LSI...
213213
rtc_use_lse = false;
214-
PWR->CR |= PWR_CR_DBP;
214+
HAL_PWR_EnableBkUpAccess();
215215
RTCHandle.State = HAL_RTC_STATE_RESET;
216216
if (HAL_RTC_Init(&RTCHandle) != HAL_OK) {
217217
rtc_info = 0x0100ffff; // indicate error

0 commit comments

Comments
 (0)