STM32L486xx HAL User Manual
|
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. |
Extended Peripheral Control functions.
=============================================================================== ##### Extended Peripheral Initialization and de-initialization functions ##### =============================================================================== [..]
HAL_StatusTypeDef HAL_PWREx_ConfigPVM | ( | PWR_PVMTypeDef * | sConfigPVM | ) |
Configure the Peripheral Voltage Monitoring (PVM).
sConfigPVM,: | pointer to a PWR_PVMTypeDef structure that contains the PVM configuration information. |
HAL | status |
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.
VoltageScaling,: | specifies the regulator output voltage to achieve a tradeoff between performance and power consumption. This parameter can be one of the following values:
|
HAL | Status |
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.
void HAL_PWREx_DisableBatteryCharging | ( | void | ) |
Disable battery charging.
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.
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. |
HAL | Status |
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.
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. |
HAL | Status |
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.
void HAL_PWREx_DisableInternalWakeUpLine | ( | void | ) |
Disable Internal Wake-up Line.
None |
Definition at line 380 of file stm32l4xx_hal_pwr_ex.c.
HAL_StatusTypeDef HAL_PWREx_DisableLowPowerRunMode | ( | void | ) |
Exit Low-power Run mode.
HAL | Status |
Definition at line 1068 of file stm32l4xx_hal_pwr_ex.c.
References PWR_FLAG_SETTING_DELAY_US.
Referenced by HAL_PWR_EnterSLEEPMode().
void HAL_PWREx_DisablePullUpPullDownConfig | ( | void | ) |
Disable pull-up and pull-down configuration.
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.
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.
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.
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.
None |
Definition at line 872 of file stm32l4xx_hal_pwr_ex.c.
References PWR_PVM_4.
void HAL_PWREx_DisableSRAM2ContentRetention | ( | void | ) |
Disable SRAM2 content retention in Standby mode.
None |
Definition at line 746 of file stm32l4xx_hal_pwr_ex.c.
void HAL_PWREx_DisableVddIO2 | ( | void | ) |
void HAL_PWREx_DisableVddUSB | ( | void | ) |
void HAL_PWREx_EnableBatteryCharging | ( | uint32_t | ResistorSelection | ) |
Enable battery charging.
When VDD is present, charge the external battery on VBAT thru an internal resistor.
ResistorSelection,: | specifies the resistor impedance. This parameter can be one of the following 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.
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. |
HAL | Status |
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.
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. |
HAL | Status |
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.
void HAL_PWREx_EnableInternalWakeUpLine | ( | void | ) |
Enable Internal Wake-up Line.
None |
Definition at line 370 of file stm32l4xx_hal_pwr_ex.c.
void HAL_PWREx_EnableLowPowerRunMode | ( | void | ) |
Enter Low-power Run mode.
None |
Definition at line 1053 of file stm32l4xx_hal_pwr_ex.c.
Referenced by HAL_PWR_EnterSLEEPMode().
void HAL_PWREx_EnablePullUpPullDownConfig | ( | void | ) |
Enable pull-up and pull-down configuration.
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.
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.
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.
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.
None |
Definition at line 863 of file stm32l4xx_hal_pwr_ex.c.
References PWR_PVM_4.
void HAL_PWREx_EnableSRAM2ContentRetention | ( | void | ) |
Enable SRAM2 content retention in Standby mode.
None |
Definition at line 734 of file stm32l4xx_hal_pwr_ex.c.
void HAL_PWREx_EnableVddIO2 | ( | void | ) |
Enable VDDIO2 supply.
None |
Definition at line 349 of file stm32l4xx_hal_pwr_ex.c.
void HAL_PWREx_EnableVddUSB | ( | void | ) |
Enable VDDUSB supply.
None |
Definition at line 327 of file stm32l4xx_hal_pwr_ex.c.
void HAL_PWREx_EnterSHUTDOWNMode | ( | void | ) |
Enter Shutdown mode.
None |
Definition at line 1257 of file stm32l4xx_hal_pwr_ex.c.
void HAL_PWREx_EnterSTOP0Mode | ( | uint8_t | STOPEntry | ) |
Enter Stop 0 mode.
STOPEntry | specifies if Stop mode in entered with WFI or WFE instruction. This parameter can be one of the following 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.
STOPEntry | specifies if Stop mode in entered with WFI or WFE instruction. This parameter can be one of the following 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.
STOPEntry | specifies if Stop mode in entered with WFI or WFE instruction. This parameter can be one of the following 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.
VOS | bit 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_PVD_PVM_IRQHandler | ( | void | ) |
This function handles the PWR PVD/PVMx interrupt request.
None |
Definition at line 1282 of file stm32l4xx_hal_pwr_ex.c.
References __HAL_PWR_PVD_EXTI_CLEAR_FLAG, __HAL_PWR_PVD_EXTI_GET_FLAG, __HAL_PWR_PVM1_EXTI_CLEAR_FLAG, __HAL_PWR_PVM1_EXTI_GET_FLAG, __HAL_PWR_PVM2_EXTI_CLEAR_FLAG, __HAL_PWR_PVM2_EXTI_GET_FLAG, __HAL_PWR_PVM3_EXTI_CLEAR_FLAG, __HAL_PWR_PVM3_EXTI_GET_FLAG, __HAL_PWR_PVM4_EXTI_CLEAR_FLAG, __HAL_PWR_PVM4_EXTI_GET_FLAG, HAL_PWR_PVDCallback(), HAL_PWREx_PVM1Callback(), HAL_PWREx_PVM2Callback(), HAL_PWREx_PVM3Callback(), and HAL_PWREx_PVM4Callback().
void HAL_PWREx_PVM1Callback | ( | void | ) |
PWR PVM1 interrupt callback.
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.
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.
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.
None |
Definition at line 1374 of file stm32l4xx_hal_pwr_ex.c.
Referenced by HAL_PWREx_PVD_PVM_IRQHandler().