Skip to content

Commit

Permalink
Merge pull request #8427 from jeromecoutant/PR_L4_8343
Browse files Browse the repository at this point in the history
STM32L4 : sleep issue
  • Loading branch information
Cruz Monrreal authored Oct 16, 2018
2 parents 5c136cc + 7b605b6 commit 461d59a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions targets/TARGET_STM/sleep.c
Original file line number Diff line number Diff line change
Expand Up @@ -163,9 +163,9 @@ void hal_sleep(void)
// LPR: When this bit is set, the regulator is switched from main mode (MR) to low-power mode (LPR).
int lowPowerMode = PWR->CR1 & PWR_CR1_LPR;
if (lowPowerMode) {
HAL_PWR_EnterSLEEPMode(PWR_MAINREGULATOR_ON, PWR_SLEEPENTRY_WFI);
} else {
HAL_PWR_EnterSLEEPMode(PWR_LOWPOWERREGULATOR_ON, PWR_SLEEPENTRY_WFI);
} else {
HAL_PWR_EnterSLEEPMode(PWR_MAINREGULATOR_ON, PWR_SLEEPENTRY_WFI);
}
#else
HAL_PWR_EnterSLEEPMode(PWR_MAINREGULATOR_ON, PWR_SLEEPENTRY_WFI);
Expand Down

0 comments on commit 461d59a

Please sign in to comment.