Skip to content
Snippets Groups Projects
Commit 10eeff30 authored by Gregory Nutt's avatar Gregory Nutt
Browse files

STM32 F1 RTC Counter: Now need to enable backup domain write access when...

STM32 F1 RTC Counter:  Now need to enable backup domain write access when setting the time.  From Darcy Gong
parent 175a9387
No related branches found
No related tags found
No related merge requests found
......@@ -594,6 +594,10 @@ int up_rtc_settime(FAR const struct timespec *tp)
stm32_rtc_breakout(tp, &regvals);
/* Enable write access to the backup domain */
(void)stm32_pwr_enablebkp(true);
/* Then write the broken out values to the RTC counter and BKP overflow register
* (hi-res mode only)
*/
......@@ -608,6 +612,8 @@ int up_rtc_settime(FAR const struct timespec *tp)
putreg16(regvals.ovf, RTC_TIMEMSB_REG);
#endif
irqrestore(flags);
(void)stm32_pwr_enablebkp(false);
return OK;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment