File tree Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -495,8 +495,17 @@ void LowPower_stop(serial_t *obj)
495495 // STM32L4+ must keep SRAM3 content when entering STOP2 lowpower mode
496496 HAL_PWREx_EnableSRAM3ContentRetention ();
497497#endif /* PWR_CR1_RRSTP */
498- // STM32L4xx supports STOP2 mode which halves consumption
498+ // STM32L4xx and STM32H7xx supports STOP2 mode which halves consumption
499+ #if defined(STM32H7xx )
500+ #if defined(PWR_LOWPOWERREGULATOR_ON )
501+ HAL_PWREx_EnterSTOP2Mode (PWR_LOWPOWERREGULATOR_ON , PWR_STOPENTRY_WFI );
502+ #else
503+ HAL_PWREx_EnterSTOP2Mode (PWR_MAINREGULATOR_ON , PWR_STOPENTRY_WFI );
504+ #endif
505+ HAL_PWREx_EnterSTOP2Mode (PWR_LOWPOWERREGULATOR_ON , PWR_STOPENTRY_WFI );
506+ #else
499507 HAL_PWREx_EnterSTOP2Mode (PWR_STOPENTRY_WFI );
508+ #endif
500509 } else
501510#endif
502511 {
You can’t perform that action at this time.
0 commit comments