HAL_PWR_EnterSTOPMode
void HAL_PWR_EnterSTOPMode (uint32_t Regulator, uint8_t
STOPEntry)
Regulator: Specifies the regulator state in Stop mode. This
parameter can be one of the following values:
PWR_MAINREGULATOR_ON: Stop mode with
regulator ON
PWR_LOWPOWERREGULATOR_ON: Stop mode with
low power regulator ON
STOPEntry: Specifies if Stop mode in entered with WFI or
WFE instruction. This parameter can be one of the following
values:
PWR_STOPENTRY_WFI: Enter Stop mode with WFI
instruction
PWR_STOPENTRY_WFE: Enter Stop mode with WFE
instruction
In Stop mode, all I/O pins keep the same state as in Run
mode.
When exiting Stop mode by issuing an interrupt or a wake-up
event, the HSI RC oscillator is selected as system clock.
When the voltage regulator operates in low power mode, an
additional startup delay is incurred when waking up from Stop
mode. By keeping the internal regulator ON during Stop
mode, the consumption is higher although the startup time is
reduced.
HAL_PWR_EnterSLEEPMode
void HAL_PWR_EnterSLEEPMode (uint32_t Regulator, uint8_t
SLEEPEntry)
Regulator: Specifies the regulator state in SLEEP mode.
This parameter can be one of the following values:
PWR_MAINREGULATOR_ON: SLEEP mode with
regulator ON
PWR_LOWPOWERREGULATOR_ON: SLEEP mode
with low power regulator ON
SLEEPEntry: Specifies if SLEEP mode in entered with WFI
or WFE instruction. This parameter can be one of the
following values:
PWR_SLEEPENTRY_WFI: enter SLEEP mode with WFI
instruction
PWR_SLEEPENTRY_WFE: enter SLEEP mode with
WFE instruction
In Sleep mode, all I/O pins keep the same state as in Run
mode.