STM32L443xx 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_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 Full SRAM2 content retention in Standby mode.
void HAL_PWREx_DisableSRAM2ContentRetention (void)
 Disable SRAM2 content retention in Standby mode.
HAL_StatusTypeDef HAL_PWREx_SetSRAM2ContentRetention (uint32_t SRAM2Size)
 Enable 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_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_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 967 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_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_3, and PWR_PVM_4.

HAL_StatusTypeDef HAL_PWREx_ControlVoltageScaling ( uint32_t  VoltageScaling)

Configure the main internal regulator output voltage.

Parameters:
VoltageScalingspecifies 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 163 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 298 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:
GPIOSpecifies 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.
GPIONumberSpecify 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 634 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_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:
GPIOSpecifies 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.
GPIONumberSpecify 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 474 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_H, and PWR_PORTH_AVAILABLE_PINS.

Disable Internal Wake-up Line.

Return values:
None

Definition at line 363 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 1144 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 716 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 887 of file stm32l4xx_hal_pwr_ex.c.

References PWR_PVM_1.

void HAL_PWREx_DisablePVM3 ( void  )

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

Return values:
None

Definition at line 928 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 947 of file stm32l4xx_hal_pwr_ex.c.

References PWR_PVM_4.

Disable SRAM2 content retention in Standby mode.

Return values:
None

Definition at line 736 of file stm32l4xx_hal_pwr_ex.c.

References HAL_PWREx_SetSRAM2ContentRetention(), and PWR_NO_SRAM2_RETENTION.

void HAL_PWREx_DisableVddUSB ( void  )

Disable VDDUSB supply.

Return values:
None

Definition at line 320 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:
ResistorSelectionspecifies the resistor impedance. This parameter can be one of the following values:
Return values:
None

Definition at line 282 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:
GPIOSpecify 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.
GPIONumberSpecify 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 551 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_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:
GPIOSpecify 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.
GPIONumberSpecify 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 391 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_H, and PWR_PORTH_AVAILABLE_PINS.

Enable Internal Wake-up Line.

Return values:
None

Definition at line 353 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 1129 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 704 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 878 of file stm32l4xx_hal_pwr_ex.c.

References PWR_PVM_1.

void HAL_PWREx_EnablePVM3 ( void  )

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

Return values:
None

Definition at line 919 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 938 of file stm32l4xx_hal_pwr_ex.c.

References PWR_PVM_4.

Enable Full SRAM2 content retention in Standby mode.

Return values:
None

Definition at line 727 of file stm32l4xx_hal_pwr_ex.c.

References HAL_PWREx_SetSRAM2ContentRetention(), and PWR_FULL_SRAM2_RETENTION.

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 310 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 1334 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 1188 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 1239 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. SRAM3 content is preserved depending on RRSTP bit setting (not available on all devices). 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 1292 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_SCALE1 or PWR_REGULATOR_VOLTAGE_SCALE2 or PWR_REGULATOR_VOLTAGE_SCALE1_BOOST when applicable)

Definition at line 114 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 1415 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 1440 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 1451 of file stm32l4xx_hal_pwr_ex.c.

Referenced by HAL_PWREx_PVD_PVM_IRQHandler().

HAL_StatusTypeDef HAL_PWREx_SetSRAM2ContentRetention ( uint32_t  SRAM2Size)

Enable SRAM2 content retention in Standby mode.

Parameters:
SRAM2Size,:specifies the SRAM2 size kept in Standby mode This parameter can be one of the following values:
  • PWR_NO_SRAM2_RETENTION SRAM2 is powered off in Standby mode (SRAM2 content is lost)
  • PWR_FULL_SRAM2_RETENTION Full SRAM2 is powered by the low-power regulator in Standby mode
  • PWR_4KBYTES_SRAM2_RETENTION Only 4 Kbytes of SRAM2 is powered by the low-power regulator in Standby mode
Note:
PWR_4KBYTES_SRAM2_RETENTION parameter is not available on all devices
Return values:
HALStatus

Definition at line 751 of file stm32l4xx_hal_pwr_ex.c.

References assert_param, IS_PWR_SRAM2_RETENTION, PWR_FULL_SRAM2_RETENTION, and PWR_NO_SRAM2_RETENTION.

Referenced by HAL_PWREx_DisableSRAM2ContentRetention(), and HAL_PWREx_EnableSRAM2ContentRetention().