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 @@ -291,6 +291,7 @@ int rtc_isenabled(void)
291
291
292
292
void rtc_synchronize (void )
293
293
{
294
+ RtcHandle .Instance = RTC ;
294
295
if (HAL_RTC_WaitForSynchro (& RtcHandle ) != HAL_OK ) {
295
296
error ("rtc_synchronize error\n" );
296
297
}
@@ -301,6 +302,7 @@ void rtc_synchronize(void)
301
302
static void RTC_IRQHandler (void )
302
303
{
303
304
/* Update HAL state */
305
+ RtcHandle .Instance = RTC ;
304
306
HAL_RTCEx_WakeUpTimerIRQHandler (& RtcHandle );
305
307
/* In case of registered handler, call it. */
306
308
if (irq_handler ) {
@@ -342,13 +344,15 @@ void rtc_set_wake_up_timer(uint32_t delta)
342
344
NVIC_SetVector (RTC_WKUP_IRQn , (uint32_t )RTC_IRQHandler );
343
345
NVIC_EnableIRQ (RTC_WKUP_IRQn );
344
346
347
+ RtcHandle .Instance = RTC ;
345
348
if (HAL_RTCEx_SetWakeUpTimer_IT (& RtcHandle , 0xFFFF & WakeUpCounter , WakeUpClock [DivIndex - 1 ]) != HAL_OK ) {
346
349
error ("rtc_set_wake_up_timer init error (%d)\n" , DivIndex );
347
350
}
348
351
}
349
352
350
353
void rtc_deactivate_wake_up_timer (void )
351
354
{
355
+ RtcHandle .Instance = RTC ;
352
356
HAL_RTCEx_DeactivateWakeUpTimer (& RtcHandle );
353
357
}
354
358
You can’t perform that action at this time.
0 commit comments