mirror of
https://github.com/trezor/trezor-firmware.git
synced 2025-01-15 18:00:59 +00:00
fix(core): fix suspending to STOP2 mode
[no changelog]
This commit is contained in:
parent
4fda1c4dfb
commit
22f132c935
@ -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();
|
||||
|
||||
|
@ -129,6 +129,7 @@ def configure(
|
||||
]
|
||||
features_available.append("usb")
|
||||
paths += ["embed/io/usb/inc"]
|
||||
defines += [("USE_USB", "1")]
|
||||
|
||||
defines += [
|
||||
"FRAMEBUFFER",
|
||||
|
Loading…
Reference in New Issue
Block a user