STM32F439xx HAL User Manual
Defines | Functions
stm32f4xx_hal_pwr_ex.h File Reference

Header file of PWR HAL Extension module. More...

#include "stm32f4xx_hal_def.h"

Go to the source code of this file.

Defines

#define PWR_MAINREGULATOR_UNDERDRIVE_ON   PWR_CR_MRUDS
#define PWR_LOWPOWERREGULATOR_UNDERDRIVE_ON   ((uint32_t)(PWR_CR_LPDS | PWR_CR_LPUDS))
#define PWR_FLAG_ODRDY   PWR_CSR_ODRDY
#define PWR_FLAG_ODSWRDY   PWR_CSR_ODSWRDY
#define PWR_FLAG_UDRDY   PWR_CSR_UDSWRDY
#define PWR_REGULATOR_VOLTAGE_SCALE1
#define PWR_REGULATOR_VOLTAGE_SCALE2
#define PWR_REGULATOR_VOLTAGE_SCALE3   PWR_CR_VOS_0 /* Scale 3 mode: the maximum value of fHCLK is 120 MHz. */
#define __HAL_PWR_VOLTAGESCALING_CONFIG(__REGULATOR__)
 macros configure the main internal regulator output voltage.
#define __HAL_PWR_OVERDRIVE_ENABLE()   (*(__IO uint32_t *) CR_ODEN_BB = ENABLE)
 Macros to enable or disable the Over drive mode.
#define __HAL_PWR_OVERDRIVE_DISABLE()   (*(__IO uint32_t *) CR_ODEN_BB = DISABLE)
#define __HAL_PWR_OVERDRIVESWITCHING_ENABLE()   (*(__IO uint32_t *) CR_ODSWEN_BB = ENABLE)
 Macros to enable or disable the Over drive switching.
#define __HAL_PWR_OVERDRIVESWITCHING_DISABLE()   (*(__IO uint32_t *) CR_ODSWEN_BB = DISABLE)
#define __HAL_PWR_UNDERDRIVE_ENABLE()   (PWR->CR |= (uint32_t)PWR_CR_UDEN)
 Macros to enable or disable the Under drive mode.
#define __HAL_PWR_UNDERDRIVE_DISABLE()   (PWR->CR &= (uint32_t)(~PWR_CR_UDEN))
#define __HAL_PWR_GET_ODRUDR_FLAG(__FLAG__)   ((PWR->CSR & (__FLAG__)) == (__FLAG__))
 Check PWR flag is set or not.
#define __HAL_PWR_CLEAR_ODRUDR_FLAG()   (PWR->CSR |= PWR_FLAG_UDRDY)
 Clear the Under-Drive Ready flag.
#define FPDS_BIT_NUMBER   PWR_CR_FPDS_Pos
#define CR_FPDS_BB   (uint32_t)(PERIPH_BB_BASE + (PWR_CR_OFFSET_BB * 32U) + (FPDS_BIT_NUMBER * 4U))
#define ODEN_BIT_NUMBER   PWR_CR_ODEN_Pos
#define CR_ODEN_BB   (uint32_t)(PERIPH_BB_BASE + (PWR_CR_OFFSET_BB * 32U) + (ODEN_BIT_NUMBER * 4U))
#define ODSWEN_BIT_NUMBER   PWR_CR_ODSWEN_Pos
#define CR_ODSWEN_BB   (uint32_t)(PERIPH_BB_BASE + (PWR_CR_OFFSET_BB * 32U) + (ODSWEN_BIT_NUMBER * 4U))
#define MRLVDS_BIT_NUMBER   PWR_CR_MRLVDS_Pos
#define CR_MRLVDS_BB   (uint32_t)(PERIPH_BB_BASE + (PWR_CR_OFFSET_BB * 32U) + (MRLVDS_BIT_NUMBER * 4U))
#define LPLVDS_BIT_NUMBER   PWR_CR_LPLVDS_Pos
#define CR_LPLVDS_BB   (uint32_t)(PERIPH_BB_BASE + (PWR_CR_OFFSET_BB * 32U) + (LPLVDS_BIT_NUMBER * 4U))
#define BRE_BIT_NUMBER   PWR_CSR_BRE_Pos
#define CSR_BRE_BB   (uint32_t)(PERIPH_BB_BASE + (PWR_CSR_OFFSET_BB * 32U) + (BRE_BIT_NUMBER * 4U))
#define IS_PWR_REGULATOR_UNDERDRIVE(REGULATOR)
#define IS_PWR_VOLTAGE_SCALING_RANGE(VOLTAGE)
#define IS_PWR_WAKEUP_PIN(PIN)   ((PIN) == PWR_WAKEUP_PIN1)

Functions

void HAL_PWREx_EnableFlashPowerDown (void)
 Enables the Flash Power Down in Stop mode.
void HAL_PWREx_DisableFlashPowerDown (void)
 Disables the Flash Power Down in Stop mode.
HAL_StatusTypeDef HAL_PWREx_EnableBkUpReg (void)
 Enables the Backup Regulator.
HAL_StatusTypeDef HAL_PWREx_DisableBkUpReg (void)
 Disables the Backup Regulator.
uint32_t HAL_PWREx_GetVoltageRange (void)
 Return Voltage Scaling Range.
HAL_StatusTypeDef HAL_PWREx_ControlVoltageScaling (uint32_t VoltageScaling)
 Configures the main internal regulator output voltage.
HAL_StatusTypeDef HAL_PWREx_EnableOverDrive (void)
 Activates the Over-Drive mode.
HAL_StatusTypeDef HAL_PWREx_DisableOverDrive (void)
 Deactivates the Over-Drive mode.
HAL_StatusTypeDef HAL_PWREx_EnterUnderDriveSTOPMode (uint32_t Regulator, uint8_t STOPEntry)
 Enters in Under-Drive STOP mode.

Detailed Description

Header file of PWR HAL Extension module.

Author:
MCD Application Team
Attention:

© COPYRIGHT(c) 2017 STMicroelectronics

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 stm32f4xx_hal_pwr_ex.h.