Skip to content

Commit b25fd2b

Browse files
committed
fix: enable missing RTC wakeup
Fixes stm32duino/STM32LowPower#126. Signed-off-by: Frederic Pillon <frederic.pillon@st.com>
1 parent f9b5bb4 commit b25fd2b

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/STM32RTC.cpp

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1294,7 +1294,12 @@ void STM32RTC::configForLowPower(Source_Clock source)
12941294
#ifdef __HAL_RCC_RTCAPB_CLKAM_ENABLE
12951295
__HAL_RCC_RTCAPB_CLKAM_ENABLE();
12961296
#endif
1297-
1297+
#if defined(PWR_WAKEUP_LINE7)
1298+
HAL_PWR_EnableWakeUpLine(PWR_WAKEUP_LINE7, PWR_WAKEUP_SELECT_3, PWR_WAKEUP_POLARITY_HIGH);
1299+
#endif
1300+
#if defined(PWR_WAKEUP_PIN7_HIGH_3)
1301+
HAL_PWR_EnableWakeUpPin(PWR_WAKEUP_PIN7_HIGH_3);
1302+
#endif
12981303
setClockSource(source);
12991304
begin();
13001305

0 commit comments

Comments
 (0)