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)
78
78
#if !defined(PWR_WAKEUP_PIN1_HIGH )
79
79
UNUSED (mode );
80
80
#endif
81
- uint32_t wkup_pin ;
81
+ uint32_t wkup_pin = 0 ;
82
82
PinName p = digitalPinToPinName (pin );
83
83
if (p != NC ) {
84
84
#ifdef PWR_WAKEUP_PIN1
@@ -151,7 +151,9 @@ void LowPower_EnableWakeUpPin(uint32_t pin, uint32_t mode)
151
151
wkup_pin = PWR_WAKEUP_PIN8 ;
152
152
}
153
153
#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
+ }
155
157
}
156
158
}
157
159
@@ -317,7 +319,7 @@ void LowPower_EnableWakeUpUart(serial_t *serial, void (*FuncPtr)(void))
317
319
WakeUpSelection .WakeUpEvent = UART_WAKEUP_ON_READDATA_NONEMPTY ;
318
320
HAL_UARTEx_StopModeWakeUpSourceConfig (WakeUpUart , WakeUpSelection );
319
321
320
- /* Enable the UART Wake UP from STOP1 mode Interrupt */
322
+ /* Enable the UART Wake UP from STOPx mode Interrupt */
321
323
__HAL_UART_ENABLE_IT (WakeUpUart , UART_IT_WUF );
322
324
#else
323
325
UNUSED (serial );
You can’t perform that action at this time.
0 commit comments