From d8570780ec77c1fb394ece3cadc4e79bbc0401aa Mon Sep 17 00:00:00 2001 From: Alexandre Bourdiol Date: Mon, 7 Nov 2022 14:36:56 +0100 Subject: [PATCH] fix: 1 RTC vector for both HAL IRQHandler Alarm and WakeUpTimer Sometimes, both HAL IRQ handler should be call from RTC vector * HAL_RTC_AlarmIRQHandler() * HAL_RTCEx_WakeUpTimerIRQHandler() Signed-off-by: Alexandre Bourdiol --- src/rtc.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/rtc.c b/src/rtc.c index adaf1d2..662aa80 100644 --- a/src/rtc.c +++ b/src/rtc.c @@ -863,6 +863,12 @@ void HAL_RTC_AlarmAEventCallback(RTC_HandleTypeDef *hrtc) void RTC_Alarm_IRQHandler(void) { HAL_RTC_AlarmIRQHandler(&RtcHandle); + +#if defined(STM32F0xx) || defined(STM32G0xx) || defined(STM32L0xx) || defined(STM32L5xx) || defined(STM32U5xx) + // In some cases, the same vector is used to manage WakeupTimer, + // but with a dedicated HAL IRQHandler + HAL_RTCEx_WakeUpTimerIRQHandler(&RtcHandle); +#endif } #ifdef ONESECOND_IRQn