1
0
mirror of https://github.com/trezor/trezor-firmware.git synced 2025-01-10 07:20:56 +00:00

fix(core): fix suspending to STOP2 mode

[no changelog]
This commit is contained in:
cepetr 2024-12-19 12:16:48 +01:00
parent ffd3179554
commit e1843873d2

View File

@ -95,6 +95,10 @@ void powerctl_suspend(void) {
// immediately after exiting STOP2 mode. // immediately after exiting STOP2 mode.
irq_key_t irq_key = irq_lock(); 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 // Enter STOP2 mode
HAL_PWREx_EnterSTOP2Mode(PWR_STOPENTRY_WFI); HAL_PWREx_EnterSTOP2Mode(PWR_STOPENTRY_WFI);