File tree 1 file changed +10
-1
lines changed
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)
495
495
// STM32L4+ must keep SRAM3 content when entering STOP2 lowpower mode
496
496
HAL_PWREx_EnableSRAM3ContentRetention ();
497
497
#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
499
507
HAL_PWREx_EnterSTOP2Mode (PWR_STOPENTRY_WFI );
508
+ #endif
500
509
} else
501
510
#endif
502
511
{
You can’t perform that action at this time.
0 commit comments