File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -345,15 +345,15 @@ int rtc_set_time(struct tm *time)
345345
346346int rtc_get_time (struct tm * time )
347347{
348- #if defined(CPU_FAM_STM32WL )
349- /* after waking up from standby, the RSF flag has to be manually cleared */
348+ /* After waking up from standby, the RSF flag has to be manually cleared.
349+ * To be safe, we do it every time even though we might not have been in
350+ * standby before . */
350351 rtc_unlock ();
351- RTC -> ICSR &= ~RTC_ICSR_RSF ;
352+ RTC_REG_ISR &= ~RTC_ISR_RSF ;
352353 rtc_lock ();
353354
354355 /* waiting for the RSF bit to be set again before accessing the time */
355- while (!(RTC_REG_ISR & RTC_ICSR_RSF )) {};
356- #endif
356+ while (!(RTC_REG_ISR & RTC_ISR_RSF )) {};
357357
358358 /* save current time */
359359 uint32_t tr = RTC -> TR ;
You can’t perform that action at this time.
0 commit comments