From e0025df7d1a24fc7e7ae8cb13421a1eb7621691f Mon Sep 17 00:00:00 2001 From: Frederic Pillon Date: Mon, 7 Jul 2025 16:55:48 +0200 Subject: [PATCH] fix: enable missing RTC wakeup Fixes https://github.com/stm32duino/STM32LowPower/issues/126. Signed-off-by: Frederic Pillon --- src/STM32RTC.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/STM32RTC.cpp b/src/STM32RTC.cpp index 32e24ba..1aa3a56 100644 --- a/src/STM32RTC.cpp +++ b/src/STM32RTC.cpp @@ -1294,7 +1294,12 @@ void STM32RTC::configForLowPower(Source_Clock source) #ifdef __HAL_RCC_RTCAPB_CLKAM_ENABLE __HAL_RCC_RTCAPB_CLKAM_ENABLE(); #endif - +#if defined(PWR_WAKEUP_LINE7) + HAL_PWR_EnableWakeUpLine(PWR_WAKEUP_LINE7, PWR_WAKEUP_SELECT_3, PWR_WAKEUP_POLARITY_HIGH); +#endif +#if defined(PWR_WAKEUP_PIN7_HIGH_3) + HAL_PWR_EnableWakeUpPin(PWR_WAKEUP_PIN7_HIGH_3); +#endif setClockSource(source); begin();