Skip to content

feat(u3): deepSleep #121

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 12, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/low_power.c
Original file line number Diff line number Diff line change
Expand Up @@ -495,14 +495,14 @@ void LowPower_stop(serial_t *obj)
// STM32L4+ must keep SRAM3 content when entering STOP2 lowpower mode
HAL_PWREx_EnableSRAM3ContentRetention();
#endif /* PWR_CR1_RRSTP */
// STM32L4xx and STM32H7xx supports STOP2 mode which halves consumption
#if defined(STM32H7xx)
#if defined(PWR_LOWPOWERREGULATOR_ON)
HAL_PWREx_EnterSTOP2Mode(PWR_LOWPOWERREGULATOR_ON, PWR_STOPENTRY_WFI);
#else
HAL_PWREx_EnterSTOP2Mode(PWR_MAINREGULATOR_ON, PWR_STOPENTRY_WFI);
#endif
HAL_PWREx_EnterSTOP2Mode(PWR_LOWPOWERREGULATOR_ON, PWR_STOPENTRY_WFI);
#elif defined(STM32U3xx)
HAL_PWR_EnterSTOPMode(PWR_LOWPOWERMODE_STOP2, PWR_STOPENTRY_WFI);
#else
HAL_PWREx_EnterSTOP2Mode(PWR_STOPENTRY_WFI);
#endif
Expand Down