From e1843873d2cdb7bdf7635688509537a4a5a04bdd Mon Sep 17 00:00:00 2001 From: cepetr Date: Thu, 19 Dec 2024 12:16:48 +0100 Subject: [PATCH] fix(core): fix suspending to STOP2 mode [no changelog] --- core/embed/sys/powerctl/stm32u5/powerctl_suspend.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/core/embed/sys/powerctl/stm32u5/powerctl_suspend.c b/core/embed/sys/powerctl/stm32u5/powerctl_suspend.c index d3d0cdf40d..4a3f88865e 100644 --- a/core/embed/sys/powerctl/stm32u5/powerctl_suspend.c +++ b/core/embed/sys/powerctl/stm32u5/powerctl_suspend.c @@ -95,6 +95,10 @@ void powerctl_suspend(void) { // immediately after exiting STOP2 mode. irq_key_t irq_key = irq_lock(); + // Enable PWR peripheral clock + // (required by the following HAL_PWREx_EnterSTOP2Mode) + __HAL_RCC_PWR_CLK_ENABLE(); + // Enter STOP2 mode HAL_PWREx_EnterSTOP2Mode(PWR_STOPENTRY_WFI);