We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent f522276 commit a379655Copy full SHA for a379655
src/low_power.c
@@ -495,8 +495,17 @@ void LowPower_stop(serial_t *obj)
495
// STM32L4+ must keep SRAM3 content when entering STOP2 lowpower mode
496
HAL_PWREx_EnableSRAM3ContentRetention();
497
#endif /* PWR_CR1_RRSTP */
498
- // STM32L4xx supports STOP2 mode which halves consumption
+ // 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
506
507
HAL_PWREx_EnterSTOP2Mode(PWR_STOPENTRY_WFI);
508
509
} else
510
#endif
511
{
0 commit comments