STM32L486xx HAL User Manual
|
Header file of PWR LL module. More...
#include "stm32l4xx.h"
Go to the source code of this file.
Defines | |
#define | LL_PWR_SCR_CSBF PWR_SCR_CSBF |
#define | LL_PWR_SCR_CWUF PWR_SCR_CWUF |
#define | LL_PWR_SCR_CWUF5 PWR_SCR_CWUF5 |
#define | LL_PWR_SCR_CWUF4 PWR_SCR_CWUF4 |
#define | LL_PWR_SCR_CWUF3 PWR_SCR_CWUF3 |
#define | LL_PWR_SCR_CWUF2 PWR_SCR_CWUF2 |
#define | LL_PWR_SCR_CWUF1 PWR_SCR_CWUF1 |
#define | LL_PWR_SR1_WUFI PWR_SR1_WUFI |
#define | LL_PWR_SR1_SBF PWR_SR1_SBF |
#define | LL_PWR_SR1_WUF5 PWR_SR1_WUF5 |
#define | LL_PWR_SR1_WUF4 PWR_SR1_WUF4 |
#define | LL_PWR_SR1_WUF3 PWR_SR1_WUF3 |
#define | LL_PWR_SR1_WUF2 PWR_SR1_WUF2 |
#define | LL_PWR_SR1_WUF1 PWR_SR1_WUF1 |
#define | LL_PWR_SR2_PVMO4 PWR_SR2_PVMO4 |
#define | LL_PWR_SR2_PVMO3 PWR_SR2_PVMO3 |
#define | LL_PWR_SR2_PVMO2 PWR_SR2_PVMO2 |
#define | LL_PWR_SR2_PVMO1 PWR_SR2_PVMO1 |
#define | LL_PWR_SR2_PVDO PWR_SR2_PVDO |
#define | LL_PWR_SR2_VOSF PWR_SR2_VOSF |
#define | LL_PWR_SR2_REGLPF PWR_SR2_REGLPF |
#define | LL_PWR_SR2_REGLPS PWR_SR2_REGLPS |
#define | LL_PWR_REGU_VOLTAGE_SCALE1 (PWR_CR1_VOS_0) |
#define | LL_PWR_REGU_VOLTAGE_SCALE2 (PWR_CR1_VOS_1) |
#define | LL_PWR_MODE_STOP0 (PWR_CR1_LPMS_STOP0) |
#define | LL_PWR_MODE_STOP1 (PWR_CR1_LPMS_STOP1) |
#define | LL_PWR_MODE_STOP2 (PWR_CR1_LPMS_STOP2) |
#define | LL_PWR_MODE_STANDBY (PWR_CR1_LPMS_STANDBY) |
#define | LL_PWR_MODE_SHUTDOWN (PWR_CR1_LPMS_SHUTDOWN) |
#define | LL_PWR_PVM_VDDUSB_1_2V (PWR_CR2_PVME1) /* Monitoring VDDUSB vs. 1.2V */ |
#define | LL_PWR_PVM_VDDIO2_0_9V (PWR_CR2_PVME2) /* Monitoring VDDIO2 vs. 0.9V */ |
#define | LL_PWR_PVM_VDDA_1_62V (PWR_CR2_PVME3) /* Monitoring VDDA vs. 1.62V */ |
#define | LL_PWR_PVM_VDDA_2_2V (PWR_CR2_PVME4) /* Monitoring VDDA vs. 2.2V */ |
#define | LL_PWR_PVDLEVEL_0 (PWR_CR2_PLS_LEV0) /* VPVD0 around 2.0 V */ |
#define | LL_PWR_PVDLEVEL_1 (PWR_CR2_PLS_LEV1) /* VPVD1 around 2.2 V */ |
#define | LL_PWR_PVDLEVEL_2 (PWR_CR2_PLS_LEV2) /* VPVD2 around 2.4 V */ |
#define | LL_PWR_PVDLEVEL_3 (PWR_CR2_PLS_LEV3) /* VPVD3 around 2.5 V */ |
#define | LL_PWR_PVDLEVEL_4 (PWR_CR2_PLS_LEV4) /* VPVD4 around 2.6 V */ |
#define | LL_PWR_PVDLEVEL_5 (PWR_CR2_PLS_LEV5) /* VPVD5 around 2.8 V */ |
#define | LL_PWR_PVDLEVEL_6 (PWR_CR2_PLS_LEV6) /* VPVD6 around 2.9 V */ |
#define | LL_PWR_PVDLEVEL_7 (PWR_CR2_PLS_LEV7) /* External input analog voltage (Compare internally to VREFINT) */ |
#define | LL_PWR_WAKEUP_PIN1 (PWR_CR3_EWUP1) |
#define | LL_PWR_WAKEUP_PIN2 (PWR_CR3_EWUP2) |
#define | LL_PWR_WAKEUP_PIN3 (PWR_CR3_EWUP3) |
#define | LL_PWR_WAKEUP_PIN4 (PWR_CR3_EWUP4) |
#define | LL_PWR_WAKEUP_PIN5 (PWR_CR3_EWUP5) |
#define | LL_PWR_BATT_CHARG_RESISTOR_5K (0x00000000U) |
#define | LL_PWR_BATT_CHARGRESISTOR_1_5K (PWR_CR4_VBRS) |
#define | LL_PWR_GPIO_A ((uint32_t)(&(PWR->PUCRA))) |
#define | LL_PWR_GPIO_B ((uint32_t)(&(PWR->PUCRB))) |
#define | LL_PWR_GPIO_C ((uint32_t)(&(PWR->PUCRC))) |
#define | LL_PWR_GPIO_D ((uint32_t)(&(PWR->PUCRD))) |
#define | LL_PWR_GPIO_E ((uint32_t)(&(PWR->PUCRE))) |
#define | LL_PWR_GPIO_F ((uint32_t)(&(PWR->PUCRF))) |
#define | LL_PWR_GPIO_G ((uint32_t)(&(PWR->PUCRG))) |
#define | LL_PWR_GPIO_H ((uint32_t)(&(PWR->PUCRH))) |
#define | LL_PWR_GPIO_BIT_0 (0x00000001U) |
#define | LL_PWR_GPIO_BIT_1 (0x00000002U) |
#define | LL_PWR_GPIO_BIT_2 (0x00000004U) |
#define | LL_PWR_GPIO_BIT_3 (0x00000008U) |
#define | LL_PWR_GPIO_BIT_4 (0x00000010U) |
#define | LL_PWR_GPIO_BIT_5 (0x00000020U) |
#define | LL_PWR_GPIO_BIT_6 (0x00000040U) |
#define | LL_PWR_GPIO_BIT_7 (0x00000080U) |
#define | LL_PWR_GPIO_BIT_8 (0x00000100U) |
#define | LL_PWR_GPIO_BIT_9 (0x00000200U) |
#define | LL_PWR_GPIO_BIT_10 (0x00000400U) |
#define | LL_PWR_GPIO_BIT_11 (0x00000800U) |
#define | LL_PWR_GPIO_BIT_12 (0x00001000U) |
#define | LL_PWR_GPIO_BIT_13 (0x00002000U) |
#define | LL_PWR_GPIO_BIT_14 (0x00004000U) |
#define | LL_PWR_GPIO_BIT_15 (0x00008000U) |
#define | LL_PWR_WriteReg(__REG__, __VALUE__) WRITE_REG(PWR->__REG__, (__VALUE__)) |
Write a value in PWR register. | |
#define | LL_PWR_ReadReg(__REG__) READ_REG(PWR->__REG__) |
Read a value in PWR register. | |
#define | LL_PWR_IsActiveFlag_VOSF LL_PWR_IsActiveFlag_VOS |
Functions | |
__STATIC_INLINE void | LL_PWR_EnableLowPowerRunMode (void) |
Switch the regulator from main mode to low-power mode. | |
__STATIC_INLINE void | LL_PWR_DisableLowPowerRunMode (void) |
Switch the regulator from low-power mode to main mode. | |
__STATIC_INLINE void | LL_PWR_EnterLowPowerRunMode (void) |
Switch from run main mode to run low-power mode. | |
__STATIC_INLINE void | LL_PWR_ExitLowPowerRunMode (void) |
Switch from run main mode to low-power mode. | |
__STATIC_INLINE uint32_t | LL_PWR_IsEnabledLowPowerRunMode (void) |
Check if the regulator is in low-power mode. | |
__STATIC_INLINE void | LL_PWR_SetRegulVoltageScaling (uint32_t VoltageScaling) |
Set the main internal regulator output voltage. | |
__STATIC_INLINE uint32_t | LL_PWR_GetRegulVoltageScaling (void) |
Get the main internal regulator output voltage. | |
__STATIC_INLINE void | LL_PWR_EnableBkUpAccess (void) |
Enable access to the backup domain. | |
__STATIC_INLINE void | LL_PWR_DisableBkUpAccess (void) |
Disable access to the backup domain. | |
__STATIC_INLINE uint32_t | LL_PWR_IsEnabledBkUpAccess (void) |
Check if the backup domain is enabled. | |
__STATIC_INLINE void | LL_PWR_SetPowerMode (uint32_t LowPowerMode) |
Set Low-Power mode. | |
__STATIC_INLINE uint32_t | LL_PWR_GetPowerMode (void) |
Get Low-Power mode. | |
__STATIC_INLINE void | LL_PWR_EnableVddUSB (void) |
Enable VDDUSB supply. | |
__STATIC_INLINE void | LL_PWR_DisableVddUSB (void) |
Disable VDDUSB supply. | |
__STATIC_INLINE uint32_t | LL_PWR_IsEnabledVddUSB (void) |
Check if VDDUSB supply is enabled. | |
__STATIC_INLINE void | LL_PWR_EnableVddIO2 (void) |
Enable VDDIO2 supply. | |
__STATIC_INLINE void | LL_PWR_DisableVddIO2 (void) |
Disable VDDIO2 supply. | |
__STATIC_INLINE uint32_t | LL_PWR_IsEnabledVddIO2 (void) |
Check if VDDIO2 supply is enabled. | |
__STATIC_INLINE void | LL_PWR_EnablePVM (uint32_t PeriphVoltage) |
Enable the Power Voltage Monitoring on a peripheral. | |
__STATIC_INLINE void | LL_PWR_DisablePVM (uint32_t PeriphVoltage) |
Disable the Power Voltage Monitoring on a peripheral. | |
__STATIC_INLINE uint32_t | LL_PWR_IsEnabledPVM (uint32_t PeriphVoltage) |
Check if Power Voltage Monitoring is enabled on a peripheral. | |
__STATIC_INLINE void | LL_PWR_SetPVDLevel (uint32_t PVDLevel) |
Configure the voltage threshold detected by the Power Voltage Detector. | |
__STATIC_INLINE uint32_t | LL_PWR_GetPVDLevel (void) |
Get the voltage threshold detection. | |
__STATIC_INLINE void | LL_PWR_EnablePVD (void) |
Enable Power Voltage Detector. | |
__STATIC_INLINE void | LL_PWR_DisablePVD (void) |
Disable Power Voltage Detector. | |
__STATIC_INLINE uint32_t | LL_PWR_IsEnabledPVD (void) |
Check if Power Voltage Detector is enabled. | |
__STATIC_INLINE void | LL_PWR_EnableInternWU (void) |
Enable Internal Wake-up line. | |
__STATIC_INLINE void | LL_PWR_DisableInternWU (void) |
Disable Internal Wake-up line. | |
__STATIC_INLINE uint32_t | LL_PWR_IsEnabledInternWU (void) |
Check if Internal Wake-up line is enabled. | |
__STATIC_INLINE void | LL_PWR_EnablePUPDCfg (void) |
Enable pull-up and pull-down configuration. | |
__STATIC_INLINE void | LL_PWR_DisablePUPDCfg (void) |
Disable pull-up and pull-down configuration. | |
__STATIC_INLINE uint32_t | LL_PWR_IsEnabledPUPDCfg (void) |
Check if pull-up and pull-down configuration is enabled. | |
__STATIC_INLINE void | LL_PWR_EnableSRAM2Retention (void) |
Enable SRAM2 content retention in Standby mode. | |
__STATIC_INLINE void | LL_PWR_DisableSRAM2Retention (void) |
Disable SRAM2 content retention in Standby mode. | |
__STATIC_INLINE uint32_t | LL_PWR_IsEnabledSRAM2Retention (void) |
Check if SRAM2 content retention in Standby mode is enabled. | |
__STATIC_INLINE void | LL_PWR_EnableWakeUpPin (uint32_t WakeUpPin) |
Enable the WakeUp PINx functionality. | |
__STATIC_INLINE void | LL_PWR_DisableWakeUpPin (uint32_t WakeUpPin) |
Disable the WakeUp PINx functionality. | |
__STATIC_INLINE uint32_t | LL_PWR_IsEnabledWakeUpPin (uint32_t WakeUpPin) |
Check if the WakeUp PINx functionality is enabled. | |
__STATIC_INLINE void | LL_PWR_SetBattChargResistor (uint32_t Resistor) |
Set the resistor impedance. | |
__STATIC_INLINE uint32_t | LL_PWR_GetBattChargResistor (void) |
Get the resistor impedance. | |
__STATIC_INLINE void | LL_PWR_EnableBatteryCharging (void) |
Enable battery charging. | |
__STATIC_INLINE void | LL_PWR_DisableBatteryCharging (void) |
Disable battery charging. | |
__STATIC_INLINE uint32_t | LL_PWR_IsEnabledBatteryCharging (void) |
Check if battery charging is enabled. | |
__STATIC_INLINE void | LL_PWR_SetWakeUpPinPolarityLow (uint32_t WakeUpPin) |
Set the Wake-Up pin polarity low for the event detection. | |
__STATIC_INLINE void | LL_PWR_SetWakeUpPinPolarityHigh (uint32_t WakeUpPin) |
Set the Wake-Up pin polarity high for the event detection. | |
__STATIC_INLINE uint32_t | LL_PWR_IsWakeUpPinPolarityLow (uint32_t WakeUpPin) |
Get the Wake-Up pin polarity for the event detection. | |
__STATIC_INLINE void | LL_PWR_EnableGPIOPullUp (uint32_t GPIO, uint32_t GPIONumber) |
Enable GPIO pull-up state in Standby and Shutdown modes. | |
__STATIC_INLINE void | LL_PWR_DisableGPIOPullUp (uint32_t GPIO, uint32_t GPIONumber) |
Disable GPIO pull-up state in Standby and Shutdown modes. | |
__STATIC_INLINE uint32_t | LL_PWR_IsEnabledGPIOPullUp (uint32_t GPIO, uint32_t GPIONumber) |
Check if GPIO pull-up state is enabled. | |
__STATIC_INLINE void | LL_PWR_EnableGPIOPullDown (uint32_t GPIO, uint32_t GPIONumber) |
Enable GPIO pull-down state in Standby and Shutdown modes. | |
__STATIC_INLINE void | LL_PWR_DisableGPIOPullDown (uint32_t GPIO, uint32_t GPIONumber) |
Disable GPIO pull-down state in Standby and Shutdown modes. | |
__STATIC_INLINE uint32_t | LL_PWR_IsEnabledGPIOPullDown (uint32_t GPIO, uint32_t GPIONumber) |
Check if GPIO pull-down state is enabled. | |
__STATIC_INLINE uint32_t | LL_PWR_IsActiveFlag_InternWU (void) |
Get Internal Wake-up line Flag. | |
__STATIC_INLINE uint32_t | LL_PWR_IsActiveFlag_SB (void) |
Get Stand-By Flag. | |
__STATIC_INLINE uint32_t | LL_PWR_IsActiveFlag_WU5 (void) |
Get Wake-up Flag 5. | |
__STATIC_INLINE uint32_t | LL_PWR_IsActiveFlag_WU4 (void) |
Get Wake-up Flag 4. | |
__STATIC_INLINE uint32_t | LL_PWR_IsActiveFlag_WU3 (void) |
Get Wake-up Flag 3. | |
__STATIC_INLINE uint32_t | LL_PWR_IsActiveFlag_WU2 (void) |
Get Wake-up Flag 2. | |
__STATIC_INLINE uint32_t | LL_PWR_IsActiveFlag_WU1 (void) |
Get Wake-up Flag 1. | |
__STATIC_INLINE void | LL_PWR_ClearFlag_SB (void) |
Clear Stand-By Flag. | |
__STATIC_INLINE void | LL_PWR_ClearFlag_WU (void) |
Clear Wake-up Flags. | |
__STATIC_INLINE void | LL_PWR_ClearFlag_WU5 (void) |
Clear Wake-up Flag 5. | |
__STATIC_INLINE void | LL_PWR_ClearFlag_WU4 (void) |
Clear Wake-up Flag 4. | |
__STATIC_INLINE void | LL_PWR_ClearFlag_WU3 (void) |
Clear Wake-up Flag 3. | |
__STATIC_INLINE void | LL_PWR_ClearFlag_WU2 (void) |
Clear Wake-up Flag 2. | |
__STATIC_INLINE void | LL_PWR_ClearFlag_WU1 (void) |
Clear Wake-up Flag 1. | |
__STATIC_INLINE uint32_t | LL_PWR_IsActiveFlag_PVMO4 (void) |
Indicate whether VDDA voltage is below or above PVM4 threshold. | |
__STATIC_INLINE uint32_t | LL_PWR_IsActiveFlag_PVMO3 (void) |
Indicate whether VDDA voltage is below or above PVM3 threshold. | |
__STATIC_INLINE uint32_t | LL_PWR_IsActiveFlag_PVMO2 (void) |
Indicate whether VDDIO2 voltage is below or above PVM2 threshold. | |
__STATIC_INLINE uint32_t | LL_PWR_IsActiveFlag_PVMO1 (void) |
Indicate whether VDDUSB voltage is below or above PVM1 threshold. | |
__STATIC_INLINE uint32_t | LL_PWR_IsActiveFlag_PVDO (void) |
Indicate whether VDD voltage is below or above the selected PVD threshold. | |
__STATIC_INLINE uint32_t | LL_PWR_IsActiveFlag_VOS (void) |
Indicate whether the regulator is ready in the selected voltage range or if its output voltage is still changing to the required voltage level. | |
__STATIC_INLINE uint32_t | LL_PWR_IsActiveFlag_REGLPF (void) |
Indicate whether the regulator is ready in main mode or is in low-power mode. | |
__STATIC_INLINE uint32_t | LL_PWR_IsActiveFlag_REGLPS (void) |
Indicate whether or not the low-power regulator is ready. | |
ErrorStatus | LL_PWR_DeInit (void) |
De-initialize the PWR registers to their default reset values. |
Header file of PWR LL module.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. 3. Neither the name of STMicroelectronics nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Definition in file stm32l4xx_ll_pwr.h.