File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -78,7 +78,7 @@ void LowPower_EnableWakeUpPin(uint32_t pin, uint32_t mode)
7878#if !defined(PWR_WAKEUP_PIN1_HIGH )
7979 UNUSED (mode );
8080#endif
81- uint32_t wkup_pin ;
81+ uint32_t wkup_pin = 0 ;
8282 PinName p = digitalPinToPinName (pin );
8383 if (p != NC ) {
8484#ifdef PWR_WAKEUP_PIN1
@@ -151,7 +151,9 @@ void LowPower_EnableWakeUpPin(uint32_t pin, uint32_t mode)
151151 wkup_pin = PWR_WAKEUP_PIN8 ;
152152 }
153153#endif /* PWR_WAKEUP_PIN8 */
154- HAL_PWR_EnableWakeUpPin (wkup_pin );
154+ if (IS_PWR_WAKEUP_PIN (wkup_pin )) {
155+ HAL_PWR_EnableWakeUpPin (wkup_pin );
156+ }
155157 }
156158}
157159
@@ -317,7 +319,7 @@ void LowPower_EnableWakeUpUart(serial_t *serial, void (*FuncPtr)(void))
317319 WakeUpSelection .WakeUpEvent = UART_WAKEUP_ON_READDATA_NONEMPTY ;
318320 HAL_UARTEx_StopModeWakeUpSourceConfig (WakeUpUart , WakeUpSelection );
319321
320- /* Enable the UART Wake UP from STOP1 mode Interrupt */
322+ /* Enable the UART Wake UP from STOPx mode Interrupt */
321323 __HAL_UART_ENABLE_IT (WakeUpUart , UART_IT_WUF );
322324#else
323325 UNUSED (serial );
You can’t perform that action at this time.
0 commit comments