File tree Expand file tree Collapse file tree 1 file changed +4
-0
lines changed Expand file tree Collapse file tree 1 file changed +4
-0
lines changed Original file line number Diff line number Diff line change @@ -288,6 +288,7 @@ int rtc_isenabled(void)
288
288
289
289
void rtc_synchronize (void )
290
290
{
291
+ RtcHandle .Instance = RTC ;
291
292
if (HAL_RTC_WaitForSynchro (& RtcHandle ) != HAL_OK ) {
292
293
error ("rtc_synchronize error\n" );
293
294
}
@@ -298,6 +299,7 @@ void rtc_synchronize(void)
298
299
static void RTC_IRQHandler (void )
299
300
{
300
301
/* Update HAL state */
302
+ RtcHandle .Instance = RTC ;
301
303
HAL_RTCEx_WakeUpTimerIRQHandler (& RtcHandle );
302
304
/* In case of registered handler, call it. */
303
305
if (irq_handler ) {
@@ -339,13 +341,15 @@ void rtc_set_wake_up_timer(uint32_t delta)
339
341
NVIC_SetVector (RTC_WKUP_IRQn , (uint32_t )RTC_IRQHandler );
340
342
NVIC_EnableIRQ (RTC_WKUP_IRQn );
341
343
344
+ RtcHandle .Instance = RTC ;
342
345
if (HAL_RTCEx_SetWakeUpTimer_IT (& RtcHandle , 0xFFFF & WakeUpCounter , WakeUpClock [DivIndex - 1 ]) != HAL_OK ) {
343
346
error ("rtc_set_wake_up_timer init error (%d)\n" , DivIndex );
344
347
}
345
348
}
346
349
347
350
void rtc_deactivate_wake_up_timer (void )
348
351
{
352
+ RtcHandle .Instance = RTC ;
349
353
HAL_RTCEx_DeactivateWakeUpTimer (& RtcHandle );
350
354
}
351
355
You can’t perform that action at this time.
0 commit comments