STM32L486xx HAL User Manual
Functions
Extended Peripheral Control functions
PWR Extended Exported Functions

Extended Peripheral Control functions. More...

Functions

uint32_t HAL_PWREx_GetVoltageRange (void)
 Return Voltage Scaling Range.
HAL_StatusTypeDef HAL_PWREx_ControlVoltageScaling (uint32_t VoltageScaling)
 Configure the main internal regulator output voltage.
void HAL_PWREx_EnableBatteryCharging (uint32_t ResistorSelection)
 Enable battery charging.
void HAL_PWREx_DisableBatteryCharging (void)
 Disable battery charging.
void HAL_PWREx_EnableVddUSB (void)
 Enable VDDUSB supply.
void HAL_PWREx_DisableVddUSB (void)
 Disable VDDUSB supply.
void HAL_PWREx_EnableVddIO2 (void)
 Enable VDDIO2 supply.
void HAL_PWREx_DisableVddIO2 (void)
 Disable VDDIO2 supply.
void HAL_PWREx_EnableInternalWakeUpLine (void)
 Enable Internal Wake-up Line.
void HAL_PWREx_DisableInternalWakeUpLine (void)
 Disable Internal Wake-up Line.
HAL_StatusTypeDef HAL_PWREx_EnableGPIOPullUp (uint32_t GPIO, uint32_t GPIONumber)
 Enable GPIO pull-up state in Standby and Shutdown modes.
HAL_StatusTypeDef HAL_PWREx_DisableGPIOPullUp (uint32_t GPIO, uint32_t GPIONumber)
 Disable GPIO pull-up state in Standby mode and Shutdown modes.
HAL_StatusTypeDef HAL_PWREx_EnableGPIOPullDown (uint32_t GPIO, uint32_t GPIONumber)
 Enable GPIO pull-down state in Standby and Shutdown modes.
HAL_StatusTypeDef HAL_PWREx_DisableGPIOPullDown (uint32_t GPIO, uint32_t GPIONumber)
 Disable GPIO pull-down state in Standby and Shutdown modes.
void HAL_PWREx_EnablePullUpPullDownConfig (void)
 Enable pull-up and pull-down configuration.
void HAL_PWREx_DisablePullUpPullDownConfig (void)
 Disable pull-up and pull-down configuration.
void HAL_PWREx_EnableSRAM2ContentRetention (void)
 Enable SRAM2 content retention in Standby mode.
void HAL_PWREx_DisableSRAM2ContentRetention (void)
 Disable SRAM2 content retention in Standby mode.
void HAL_PWREx_EnablePVM1 (void)
 Enable the Power Voltage Monitoring 1: VDDUSB versus 1.2V.
void HAL_PWREx_DisablePVM1 (void)
 Disable the Power Voltage Monitoring 1: VDDUSB versus 1.2V.
void HAL_PWREx_EnablePVM2 (void)
 Enable the Power Voltage Monitoring 2: VDDIO2 versus 0.9V.
void HAL_PWREx_DisablePVM2 (void)
 Disable the Power Voltage Monitoring 2: VDDIO2 versus 0.9V.
void HAL_PWREx_EnablePVM3 (void)
 Enable the Power Voltage Monitoring 3: VDDA versus 1.62V.
void HAL_PWREx_DisablePVM3 (void)
 Disable the Power Voltage Monitoring 3: VDDA versus 1.62V.
void HAL_PWREx_EnablePVM4 (void)
 Enable the Power Voltage Monitoring 4: VDDA versus 2.2V.
void HAL_PWREx_DisablePVM4 (void)
 Disable the Power Voltage Monitoring 4: VDDA versus 2.2V.
HAL_StatusTypeDef HAL_PWREx_ConfigPVM (PWR_PVMTypeDef *sConfigPVM)
 Configure the Peripheral Voltage Monitoring (PVM).
void HAL_PWREx_EnableLowPowerRunMode (void)
 Enter Low-power Run mode.
HAL_StatusTypeDef HAL_PWREx_DisableLowPowerRunMode (void)
 Exit Low-power Run mode.
void HAL_PWREx_EnterSTOP0Mode (uint8_t STOPEntry)
 Enter Stop 0 mode.
void HAL_PWREx_EnterSTOP1Mode (uint8_t STOPEntry)
 Enter Stop 1 mode.
void HAL_PWREx_EnterSTOP2Mode (uint8_t STOPEntry)
 Enter Stop 2 mode.
void HAL_PWREx_EnterSHUTDOWNMode (void)
 Enter Shutdown mode.
void HAL_PWREx_PVD_PVM_IRQHandler (void)
 This function handles the PWR PVD/PVMx interrupt request.
__weak void HAL_PWREx_PVM1Callback (void)
 PWR PVM1 interrupt callback.
__weak void HAL_PWREx_PVM2Callback (void)
 PWR PVM2 interrupt callback.
__weak void HAL_PWREx_PVM3Callback (void)
 PWR PVM3 interrupt callback.
__weak void HAL_PWREx_PVM4Callback (void)
 PWR PVM4 interrupt callback.

Detailed Description

Extended Peripheral Control functions.

 ===============================================================================
              ##### Extended Peripheral Initialization and de-initialization functions #####
 ===============================================================================
    [..]


Function Documentation

HAL_StatusTypeDef HAL_PWREx_ConfigPVM ( PWR_PVMTypeDef sConfigPVM)

Configure the Peripheral Voltage Monitoring (PVM).

Parameters:
sConfigPVM,:pointer to a PWR_PVMTypeDef structure that contains the PVM configuration information.
Note:
The API configures a single PVM according to the information contained in the input structure. To configure several PVMs, the API must be singly called for each PVM used.
Refer to the electrical characteristics of your device datasheet for more details about the voltage thresholds corresponding to each detection level and to each monitored supply.
Return values:
HALstatus

Definition at line 892 of file stm32l4xx_hal_pwr_ex.c.

References __HAL_PWR_PVM1_EXTI_DISABLE_EVENT, __HAL_PWR_PVM1_EXTI_DISABLE_FALLING_EDGE, __HAL_PWR_PVM1_EXTI_DISABLE_IT, __HAL_PWR_PVM1_EXTI_DISABLE_RISING_EDGE, __HAL_PWR_PVM1_EXTI_ENABLE_EVENT, __HAL_PWR_PVM1_EXTI_ENABLE_FALLING_EDGE, __HAL_PWR_PVM1_EXTI_ENABLE_IT, __HAL_PWR_PVM1_EXTI_ENABLE_RISING_EDGE, __HAL_PWR_PVM2_EXTI_DISABLE_EVENT, __HAL_PWR_PVM2_EXTI_DISABLE_FALLING_EDGE, __HAL_PWR_PVM2_EXTI_DISABLE_IT, __HAL_PWR_PVM2_EXTI_DISABLE_RISING_EDGE, __HAL_PWR_PVM2_EXTI_ENABLE_EVENT, __HAL_PWR_PVM2_EXTI_ENABLE_FALLING_EDGE, __HAL_PWR_PVM2_EXTI_ENABLE_IT, __HAL_PWR_PVM2_EXTI_ENABLE_RISING_EDGE, __HAL_PWR_PVM3_EXTI_DISABLE_EVENT, __HAL_PWR_PVM3_EXTI_DISABLE_FALLING_EDGE, __HAL_PWR_PVM3_EXTI_DISABLE_IT, __HAL_PWR_PVM3_EXTI_DISABLE_RISING_EDGE, __HAL_PWR_PVM3_EXTI_ENABLE_EVENT, __HAL_PWR_PVM3_EXTI_ENABLE_FALLING_EDGE, __HAL_PWR_PVM3_EXTI_ENABLE_IT, __HAL_PWR_PVM3_EXTI_ENABLE_RISING_EDGE, __HAL_PWR_PVM4_EXTI_DISABLE_EVENT, __HAL_PWR_PVM4_EXTI_DISABLE_FALLING_EDGE, __HAL_PWR_PVM4_EXTI_DISABLE_IT, __HAL_PWR_PVM4_EXTI_DISABLE_RISING_EDGE, __HAL_PWR_PVM4_EXTI_ENABLE_EVENT, __HAL_PWR_PVM4_EXTI_ENABLE_FALLING_EDGE, __HAL_PWR_PVM4_EXTI_ENABLE_IT, __HAL_PWR_PVM4_EXTI_ENABLE_RISING_EDGE, assert_param, IS_PWR_PVM_MODE, IS_PWR_PVM_TYPE, PWR_PVMTypeDef::Mode, PVM_FALLING_EDGE, PVM_MODE_EVT, PVM_MODE_IT, PVM_RISING_EDGE, PWR_PVMTypeDef::PVMType, PWR_PVM_1, PWR_PVM_2, PWR_PVM_3, and PWR_PVM_4.

HAL_StatusTypeDef HAL_PWREx_ControlVoltageScaling ( uint32_t  VoltageScaling)

Configure the main internal regulator output voltage.

Parameters:
VoltageScaling,:specifies the regulator output voltage to achieve a tradeoff between performance and power consumption. This parameter can be one of the following values:
Note:
When moving from Range 1 to Range 2, the system frequency must be decreased to a value below 26 MHz before calling HAL_PWREx_ControlVoltageScaling() API. When moving from Range 2 to Range 1, the system frequency can be increased to a value up to 80 MHz after calling HAL_PWREx_ControlVoltageScaling() API. For some devices, the system frequency can be increased up to 120 MHz.
When moving from Range 2 to Range 1, the API waits for VOSF flag to be cleared before returning the status. If the flag is not cleared within 50 microseconds, HAL_TIMEOUT status is reported.
Return values:
HALStatus

Definition at line 180 of file stm32l4xx_hal_pwr_ex.c.

References assert_param, IS_PWR_VOLTAGE_SCALING_RANGE, PWR_FLAG_SETTING_DELAY_US, PWR_REGULATOR_VOLTAGE_SCALE1, and PWR_REGULATOR_VOLTAGE_SCALE2.

Disable battery charging.

Return values:
None

Definition at line 315 of file stm32l4xx_hal_pwr_ex.c.

HAL_StatusTypeDef HAL_PWREx_DisableGPIOPullDown ( uint32_t  GPIO,
uint32_t  GPIONumber 
)

Disable GPIO pull-down state in Standby and Shutdown modes.

Note:
Reset the relevant PDy bits of PWR_PDCRx register used to configure the I/O in pull-down state in Standby and Shutdown modes.
Even if a PDy bit to reset is reserved, the other PDy bits entered as input parameter at the same time are reset.
Parameters:
GPIO,:Specifies the IO port. This parameter can be PWR_GPIO_A..PWR_GPIO_H (or PWR_GPIO_I depending on the devices) to select the GPIO peripheral.
GPIONumber,:Specify the I/O pins numbers. This parameter can be one of the following values: PWR_GPIO_BIT_0, ..., PWR_GPIO_BIT_15 (except for the port where less I/O pins are available) or the logical OR of several of them to reset several bits for a given port in a single API call.
Return values:
HALStatus

Definition at line 642 of file stm32l4xx_hal_pwr_ex.c.

References assert_param, IS_PWR_GPIO, IS_PWR_GPIO_BIT_NUMBER, PWR_GPIO_A, PWR_GPIO_B, PWR_GPIO_BIT_13, PWR_GPIO_BIT_15, PWR_GPIO_BIT_3, PWR_GPIO_BIT_4, PWR_GPIO_C, PWR_GPIO_D, PWR_GPIO_E, PWR_GPIO_F, PWR_GPIO_G, PWR_GPIO_H, and PWR_PORTH_AVAILABLE_PINS.

HAL_StatusTypeDef HAL_PWREx_DisableGPIOPullUp ( uint32_t  GPIO,
uint32_t  GPIONumber 
)

Disable GPIO pull-up state in Standby mode and Shutdown modes.

Note:
Reset the relevant PUy bits of PWR_PUCRx register used to configure the I/O in pull-up state in Standby and Shutdown modes.
Even if a PUy bit to reset is reserved, the other PUy bits entered as input parameter at the same time are reset.
Parameters:
GPIO,:Specifies the IO port. This parameter can be PWR_GPIO_A, ..., PWR_GPIO_H (or PWR_GPIO_I depending on the devices) to select the GPIO peripheral.
GPIONumber,:Specify the I/O pins numbers. This parameter can be one of the following values: PWR_GPIO_BIT_0, ..., PWR_GPIO_BIT_15 (except for the port where less I/O pins are available) or the logical OR of several of them to reset several bits for a given port in a single API call.
Return values:
HALStatus

Definition at line 488 of file stm32l4xx_hal_pwr_ex.c.

References assert_param, IS_PWR_GPIO, IS_PWR_GPIO_BIT_NUMBER, PWR_GPIO_A, PWR_GPIO_B, PWR_GPIO_BIT_14, PWR_GPIO_C, PWR_GPIO_D, PWR_GPIO_E, PWR_GPIO_F, PWR_GPIO_G, PWR_GPIO_H, and PWR_PORTH_AVAILABLE_PINS.

Disable Internal Wake-up Line.

Return values:
None

Definition at line 380 of file stm32l4xx_hal_pwr_ex.c.

HAL_StatusTypeDef HAL_PWREx_DisableLowPowerRunMode ( void  )

Exit Low-power Run mode.

Note:
Before HAL_PWREx_DisableLowPowerRunMode() completion, the function checks that REGLPF has been properly reset (otherwise, HAL_PWREx_DisableLowPowerRunMode returns HAL_TIMEOUT status). The system clock frequency can then be increased above 2 MHz.
Return values:
HALStatus

Definition at line 1068 of file stm32l4xx_hal_pwr_ex.c.

References PWR_FLAG_SETTING_DELAY_US.

Referenced by HAL_PWR_EnterSLEEPMode().

Disable pull-up and pull-down configuration.

Note:
When APC bit is cleared, the I/O pull-up and pull-down configurations defined in PWR_PUCRx and PWR_PDCRx registers are not applied in Standby and Shutdown modes.
Return values:
None

Definition at line 721 of file stm32l4xx_hal_pwr_ex.c.

void HAL_PWREx_DisablePVM1 ( void  )

Disable the Power Voltage Monitoring 1: VDDUSB versus 1.2V.

Return values:
None

Definition at line 812 of file stm32l4xx_hal_pwr_ex.c.

References PWR_PVM_1.

void HAL_PWREx_DisablePVM2 ( void  )

Disable the Power Voltage Monitoring 2: VDDIO2 versus 0.9V.

Return values:
None

Definition at line 833 of file stm32l4xx_hal_pwr_ex.c.

References PWR_PVM_2.

void HAL_PWREx_DisablePVM3 ( void  )

Disable the Power Voltage Monitoring 3: VDDA versus 1.62V.

Return values:
None

Definition at line 853 of file stm32l4xx_hal_pwr_ex.c.

References PWR_PVM_3.

void HAL_PWREx_DisablePVM4 ( void  )

Disable the Power Voltage Monitoring 4: VDDA versus 2.2V.

Return values:
None

Definition at line 872 of file stm32l4xx_hal_pwr_ex.c.

References PWR_PVM_4.

Disable SRAM2 content retention in Standby mode.

Note:
When RRS bit is reset, SRAM2 is powered off in Standby mode and its content is lost.
Return values:
None

Definition at line 746 of file stm32l4xx_hal_pwr_ex.c.

void HAL_PWREx_DisableVddIO2 ( void  )

Disable VDDIO2 supply.

Return values:
None

Definition at line 359 of file stm32l4xx_hal_pwr_ex.c.

void HAL_PWREx_DisableVddUSB ( void  )

Disable VDDUSB supply.

Return values:
None

Definition at line 337 of file stm32l4xx_hal_pwr_ex.c.

void HAL_PWREx_EnableBatteryCharging ( uint32_t  ResistorSelection)

Enable battery charging.

When VDD is present, charge the external battery on VBAT thru an internal resistor.

Parameters:
ResistorSelection,:specifies the resistor impedance. This parameter can be one of the following values:
Return values:
None

Definition at line 299 of file stm32l4xx_hal_pwr_ex.c.

References assert_param, and IS_PWR_BATTERY_RESISTOR_SELECT.

HAL_StatusTypeDef HAL_PWREx_EnableGPIOPullDown ( uint32_t  GPIO,
uint32_t  GPIONumber 
)

Enable GPIO pull-down state in Standby and Shutdown modes.

Note:
Set the relevant PDy bits of PWR_PDCRx register to configure the I/O in pull-down state in Standby and Shutdown modes.
This state is effective in Standby and Shutdown modes only if APC bit is set through HAL_PWREx_EnablePullUpPullDownConfig() API.
The configuration is lost when exiting the Shutdown mode due to the power-on reset, maintained when exiting the Standby mode.
To avoid any conflict at Standby and Shutdown modes exits, the corresponding PUy bit of PWR_PUCRx register is cleared unless it is reserved.
Even if a PDy bit to set is reserved, the other PDy bits entered as input parameter at the same time are set.
Parameters:
GPIO,:Specify the IO port. This parameter can be PWR_GPIO_A..PWR_GPIO_H (or PWR_GPIO_I depending on the devices) to select the GPIO peripheral.
GPIONumber,:Specify the I/O pins numbers. This parameter can be one of the following values: PWR_GPIO_BIT_0, ..., PWR_GPIO_BIT_15 (except for the port where less I/O pins are available) or the logical OR of several of them to set several bits for a given port in a single API call.
Return values:
HALStatus

Definition at line 562 of file stm32l4xx_hal_pwr_ex.c.

References assert_param, IS_PWR_GPIO, IS_PWR_GPIO_BIT_NUMBER, PWR_GPIO_A, PWR_GPIO_B, PWR_GPIO_BIT_13, PWR_GPIO_BIT_14, PWR_GPIO_BIT_15, PWR_GPIO_BIT_3, PWR_GPIO_BIT_4, PWR_GPIO_C, PWR_GPIO_D, PWR_GPIO_E, PWR_GPIO_F, PWR_GPIO_G, PWR_GPIO_H, and PWR_PORTH_AVAILABLE_PINS.

HAL_StatusTypeDef HAL_PWREx_EnableGPIOPullUp ( uint32_t  GPIO,
uint32_t  GPIONumber 
)

Enable GPIO pull-up state in Standby and Shutdown modes.

Note:
Set the relevant PUy bits of PWR_PUCRx register to configure the I/O in pull-up state in Standby and Shutdown modes.
This state is effective in Standby and Shutdown modes only if APC bit is set through HAL_PWREx_EnablePullUpPullDownConfig() API.
The configuration is lost when exiting the Shutdown mode due to the power-on reset, maintained when exiting the Standby mode.
To avoid any conflict at Standby and Shutdown modes exits, the corresponding PDy bit of PWR_PDCRx register is cleared unless it is reserved.
Even if a PUy bit to set is reserved, the other PUy bits entered as input parameter at the same time are set.
Parameters:
GPIO,:Specify the IO port. This parameter can be PWR_GPIO_A, ..., PWR_GPIO_H (or PWR_GPIO_I depending on the devices) to select the GPIO peripheral.
GPIONumber,:Specify the I/O pins numbers. This parameter can be one of the following values: PWR_GPIO_BIT_0, ..., PWR_GPIO_BIT_15 (except for the port where less I/O pins are available) or the logical OR of several of them to set several bits for a given port in a single API call.
Return values:
HALStatus

Definition at line 408 of file stm32l4xx_hal_pwr_ex.c.

References assert_param, IS_PWR_GPIO, IS_PWR_GPIO_BIT_NUMBER, PWR_GPIO_A, PWR_GPIO_B, PWR_GPIO_BIT_13, PWR_GPIO_BIT_14, PWR_GPIO_BIT_15, PWR_GPIO_BIT_3, PWR_GPIO_BIT_4, PWR_GPIO_C, PWR_GPIO_D, PWR_GPIO_E, PWR_GPIO_F, PWR_GPIO_G, PWR_GPIO_H, and PWR_PORTH_AVAILABLE_PINS.

Enable Internal Wake-up Line.

Return values:
None

Definition at line 370 of file stm32l4xx_hal_pwr_ex.c.

Enter Low-power Run mode.

Note:
In Low-power Run mode, all I/O pins keep the same state as in Run mode.
When Regulator is set to PWR_LOWPOWERREGULATOR_ON, the user can optionally configure the Flash in power-down monde in setting the RUN_PD bit in FLASH_ACR register. Additionally, the clock frequency must be reduced below 2 MHz. Setting RUN_PD in FLASH_ACR then appropriately reducing the clock frequency must be done before calling HAL_PWREx_EnableLowPowerRunMode() API.
Return values:
None

Definition at line 1053 of file stm32l4xx_hal_pwr_ex.c.

Referenced by HAL_PWR_EnterSLEEPMode().

Enable pull-up and pull-down configuration.

Note:
When APC bit is set, the I/O pull-up and pull-down configurations defined in PWR_PUCRx and PWR_PDCRx registers are applied in Standby and Shutdown modes.
Pull-up set by PUy bit of PWR_PUCRx register is not activated if the corresponding PDy bit of PWR_PDCRx register is also set (pull-down configuration priority is higher). HAL_PWREx_EnableGPIOPullUp() and HAL_PWREx_EnableGPIOPullDown() API's ensure there is no conflict when setting PUy or PDy bit.
Return values:
None

Definition at line 709 of file stm32l4xx_hal_pwr_ex.c.

void HAL_PWREx_EnablePVM1 ( void  )

Enable the Power Voltage Monitoring 1: VDDUSB versus 1.2V.

Return values:
None

Definition at line 803 of file stm32l4xx_hal_pwr_ex.c.

References PWR_PVM_1.

void HAL_PWREx_EnablePVM2 ( void  )

Enable the Power Voltage Monitoring 2: VDDIO2 versus 0.9V.

Return values:
None

Definition at line 824 of file stm32l4xx_hal_pwr_ex.c.

References PWR_PVM_2.

void HAL_PWREx_EnablePVM3 ( void  )

Enable the Power Voltage Monitoring 3: VDDA versus 1.62V.

Return values:
None

Definition at line 844 of file stm32l4xx_hal_pwr_ex.c.

References PWR_PVM_3.

void HAL_PWREx_EnablePVM4 ( void  )

Enable the Power Voltage Monitoring 4: VDDA versus 2.2V.

Return values:
None

Definition at line 863 of file stm32l4xx_hal_pwr_ex.c.

References PWR_PVM_4.

Enable SRAM2 content retention in Standby mode.

Note:
When RRS bit is set, SRAM2 is powered by the low-power regulator in Standby mode and its content is kept.
Return values:
None

Definition at line 734 of file stm32l4xx_hal_pwr_ex.c.

void HAL_PWREx_EnableVddIO2 ( void  )

Enable VDDIO2 supply.

Note:
Remove VDDIO2 electrical and logical isolation, once VDDIO2 supply is present.
Return values:
None

Definition at line 349 of file stm32l4xx_hal_pwr_ex.c.

void HAL_PWREx_EnableVddUSB ( void  )

Enable VDDUSB supply.

Note:
Remove VDDUSB electrical and logical isolation, once VDDUSB supply is present.
Return values:
None

Definition at line 327 of file stm32l4xx_hal_pwr_ex.c.

void HAL_PWREx_EnterSHUTDOWNMode ( void  )

Enter Shutdown mode.

Note:
In Shutdown mode, the PLL, the HSI, the MSI, the LSI and the HSE oscillators are switched off. The voltage regulator is disabled and Vcore domain is powered off. SRAM1, SRAM2 and registers contents are lost except for registers in the Backup domain. The BOR is not available.
The I/Os can be configured either with a pull-up or pull-down or can be kept in analog state.
Return values:
None

Definition at line 1257 of file stm32l4xx_hal_pwr_ex.c.

void HAL_PWREx_EnterSTOP0Mode ( uint8_t  STOPEntry)

Enter Stop 0 mode.

Note:
In Stop 0 mode, main and low voltage regulators are ON.
In Stop 0 mode, all I/O pins keep the same state as in Run mode.
All clocks in the VCORE domain are stopped; the PLL, the MSI, the HSI and the HSE oscillators are disabled. Some peripherals with the wakeup capability (I2Cx, USARTx and LPUART) can switch on the HSI to receive a frame, and switch off the HSI after receiving the frame if it is not a wakeup frame. In this case, the HSI clock is propagated only to the peripheral requesting it. SRAM1, SRAM2 and register contents are preserved. The BOR is available.
When exiting Stop 0 mode by issuing an interrupt or a wakeup event, the HSI RC oscillator is selected as system clock if STOPWUCK bit in RCC_CFGR register is set; the MSI oscillator is selected if STOPWUCK is cleared.
By keeping the internal regulator ON during Stop 0 mode, the consumption is higher although the startup time is reduced.
Parameters:
STOPEntryspecifies if Stop mode in entered with WFI or WFE instruction. This parameter can be one of the following values:
Return values:
None

Definition at line 1112 of file stm32l4xx_hal_pwr_ex.c.

References assert_param, IS_PWR_STOP_ENTRY, and PWR_STOPENTRY_WFI.

Referenced by HAL_PWR_EnterSTOPMode().

void HAL_PWREx_EnterSTOP1Mode ( uint8_t  STOPEntry)

Enter Stop 1 mode.

Note:
In Stop 1 mode, only low power voltage regulator is ON.
In Stop 1 mode, all I/O pins keep the same state as in Run mode.
All clocks in the VCORE domain are stopped; the PLL, the MSI, the HSI and the HSE oscillators are disabled. Some peripherals with the wakeup capability (I2Cx, USARTx and LPUART) can switch on the HSI to receive a frame, and switch off the HSI after receiving the frame if it is not a wakeup frame. In this case, the HSI clock is propagated only to the peripheral requesting it. SRAM1, SRAM2 and register contents are preserved. The BOR is available.
When exiting Stop 1 mode by issuing an interrupt or a wakeup event, the HSI RC oscillator is selected as system clock if STOPWUCK bit in RCC_CFGR register is set; the MSI oscillator is selected if STOPWUCK is cleared.
Due to low power mode, an additional startup delay is incurred when waking up from Stop 1 mode.
Parameters:
STOPEntryspecifies if Stop mode in entered with WFI or WFE instruction. This parameter can be one of the following values:
Return values:
None

Definition at line 1163 of file stm32l4xx_hal_pwr_ex.c.

References assert_param, IS_PWR_STOP_ENTRY, and PWR_STOPENTRY_WFI.

Referenced by HAL_PWR_EnterSTOPMode().

void HAL_PWREx_EnterSTOP2Mode ( uint8_t  STOPEntry)

Enter Stop 2 mode.

Note:
In Stop 2 mode, only low power voltage regulator is ON.
In Stop 2 mode, all I/O pins keep the same state as in Run mode.
All clocks in the VCORE domain are stopped, the PLL, the MSI, the HSI and the HSE oscillators are disabled. Some peripherals with wakeup capability (LCD, LPTIM1, I2C3 and LPUART) can switch on the HSI to receive a frame, and switch off the HSI after receiving the frame if it is not a wakeup frame. In this case the HSI clock is propagated only to the peripheral requesting it. SRAM1, SRAM2 and register contents are preserved. The BOR is available. The voltage regulator is set in low-power mode but LPR bit must be cleared to enter stop 2 mode. Otherwise, Stop 1 mode is entered.
When exiting Stop 2 mode by issuing an interrupt or a wakeup event, the HSI RC oscillator is selected as system clock if STOPWUCK bit in RCC_CFGR register is set; the MSI oscillator is selected if STOPWUCK is cleared.
Parameters:
STOPEntryspecifies if Stop mode in entered with WFI or WFE instruction. This parameter can be one of the following values:
Return values:
None

Definition at line 1215 of file stm32l4xx_hal_pwr_ex.c.

References assert_param, IS_PWR_STOP_ENTRY, and PWR_STOPENTRY_WFI.

uint32_t HAL_PWREx_GetVoltageRange ( void  )

Return Voltage Scaling Range.

Return values:
VOSbit field (PWR_REGULATOR_VOLTAGE_RANGE1 or PWR_REGULATOR_VOLTAGE_RANGE2 or PWR_REGULATOR_VOLTAGE_SCALE1_BOOST when applicable)

Definition at line 131 of file stm32l4xx_hal_pwr_ex.c.

References PWR_REGULATOR_VOLTAGE_SCALE1, and PWR_REGULATOR_VOLTAGE_SCALE2.

Referenced by RCC_SetFlashLatencyFromMSIRange().

void HAL_PWREx_PVM1Callback ( void  )

PWR PVM1 interrupt callback.

Return values:
None

Definition at line 1338 of file stm32l4xx_hal_pwr_ex.c.

Referenced by HAL_PWREx_PVD_PVM_IRQHandler().

void HAL_PWREx_PVM2Callback ( void  )

PWR PVM2 interrupt callback.

Return values:
None

Definition at line 1351 of file stm32l4xx_hal_pwr_ex.c.

Referenced by HAL_PWREx_PVD_PVM_IRQHandler().

void HAL_PWREx_PVM3Callback ( void  )

PWR PVM3 interrupt callback.

Return values:
None

Definition at line 1363 of file stm32l4xx_hal_pwr_ex.c.

Referenced by HAL_PWREx_PVD_PVM_IRQHandler().

void HAL_PWREx_PVM4Callback ( void  )

PWR PVM4 interrupt callback.

Return values:
None

Definition at line 1374 of file stm32l4xx_hal_pwr_ex.c.

Referenced by HAL_PWREx_PVD_PVM_IRQHandler().