Skip to content

Commit 9e7829f

Browse files
ABOSTMfpistm
authored andcommitted
Restore PWR clock at wakeup
This avoid to miss it in system clock configuration, as it is not systematically done by cubeMX Signed-off-by: Alexandre Bourdiol <[email protected]>
1 parent e1c7372 commit 9e7829f

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/low_power.c

+5
Original file line numberDiff line numberDiff line change
@@ -347,6 +347,11 @@ void LowPower_EnableWakeUpUart(serial_t *serial, void (*FuncPtr)(void))
347347
*/
348348
WEAK void SystemClock_ConfigFromStop(void)
349349
{
350+
#if defined(__HAL_RCC_PWR_CLK_ENABLE)
351+
/* Enable PWR clock, needed for example: voltage scaling */
352+
__HAL_RCC_PWR_CLK_ENABLE();
353+
#endif
354+
350355
SystemClock_Config();
351356
}
352357

0 commit comments

Comments
 (0)