diff --git a/core/embed/sys/powerctl/stm32u5/powerctl_suspend.c b/core/embed/sys/powerctl/stm32u5/powerctl_suspend.c index d3d0cdf40d..72188d94f6 100644 --- a/core/embed/sys/powerctl/stm32u5/powerctl_suspend.c +++ b/core/embed/sys/powerctl/stm32u5/powerctl_suspend.c @@ -95,9 +95,16 @@ void powerctl_suspend(void) { // immediately after exiting STOP2 mode. irq_key_t irq_key = irq_lock(); - // Enter STOP2 mode + // The PWR clock is disabled after system initialization. + // Re-enable it before writing to PWR registers. + __HAL_RCC_PWR_CLK_ENABLE(); + + // Enter STOP2 low-power mode HAL_PWREx_EnterSTOP2Mode(PWR_STOPENTRY_WFI); + // Disable PWR clock after use + __HAL_RCC_PWR_CLK_DISABLE(); + // Recover system clock SystemInit(); diff --git a/core/site_scons/models/T3W1/trezor_t3w1_revA0.py b/core/site_scons/models/T3W1/trezor_t3w1_revA0.py index 92697f412d..b247b6bafe 100644 --- a/core/site_scons/models/T3W1/trezor_t3w1_revA0.py +++ b/core/site_scons/models/T3W1/trezor_t3w1_revA0.py @@ -129,6 +129,7 @@ def configure( ] features_available.append("usb") paths += ["embed/io/usb/inc"] + defines += [("USE_USB", "1")] defines += [ "FRAMEBUFFER",