mbed library sources
Fork of mbed-src by
targets/cmsis/TARGET_STM/TARGET_STM32F4/stm32f4xx_hal_pwr_ex.h@613:bc40b8d2aec4, 2015-08-20 (annotated)
- Committer:
- mbed_official
- Date:
- Thu Aug 20 10:45:13 2015 +0100
- Revision:
- 613:bc40b8d2aec4
- Parent:
- 532:fe11edbda85c
Synchronized with git revision 92ca8c7b60a283b6bb60eb65b183dac1599f0ade
Full URL: https://github.com/mbedmicro/mbed/commit/92ca8c7b60a283b6bb60eb65b183dac1599f0ade/
Nordic: update application start address in GCC linker script
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
mbed_official | 87:085cde657901 | 1 | /** |
mbed_official | 87:085cde657901 | 2 | ****************************************************************************** |
mbed_official | 87:085cde657901 | 3 | * @file stm32f4xx_hal_pwr_ex.h |
mbed_official | 87:085cde657901 | 4 | * @author MCD Application Team |
mbed_official | 613:bc40b8d2aec4 | 5 | * @version V1.3.2 |
mbed_official | 613:bc40b8d2aec4 | 6 | * @date 26-June-2015 |
mbed_official | 87:085cde657901 | 7 | * @brief Header file of PWR HAL Extension module. |
mbed_official | 87:085cde657901 | 8 | ****************************************************************************** |
mbed_official | 87:085cde657901 | 9 | * @attention |
mbed_official | 87:085cde657901 | 10 | * |
mbed_official | 532:fe11edbda85c | 11 | * <h2><center>© COPYRIGHT(c) 2015 STMicroelectronics</center></h2> |
mbed_official | 87:085cde657901 | 12 | * |
mbed_official | 87:085cde657901 | 13 | * Redistribution and use in source and binary forms, with or without modification, |
mbed_official | 87:085cde657901 | 14 | * are permitted provided that the following conditions are met: |
mbed_official | 87:085cde657901 | 15 | * 1. Redistributions of source code must retain the above copyright notice, |
mbed_official | 87:085cde657901 | 16 | * this list of conditions and the following disclaimer. |
mbed_official | 87:085cde657901 | 17 | * 2. Redistributions in binary form must reproduce the above copyright notice, |
mbed_official | 87:085cde657901 | 18 | * this list of conditions and the following disclaimer in the documentation |
mbed_official | 87:085cde657901 | 19 | * and/or other materials provided with the distribution. |
mbed_official | 87:085cde657901 | 20 | * 3. Neither the name of STMicroelectronics nor the names of its contributors |
mbed_official | 87:085cde657901 | 21 | * may be used to endorse or promote products derived from this software |
mbed_official | 87:085cde657901 | 22 | * without specific prior written permission. |
mbed_official | 87:085cde657901 | 23 | * |
mbed_official | 87:085cde657901 | 24 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" |
mbed_official | 87:085cde657901 | 25 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE |
mbed_official | 87:085cde657901 | 26 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE |
mbed_official | 87:085cde657901 | 27 | * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE |
mbed_official | 87:085cde657901 | 28 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL |
mbed_official | 87:085cde657901 | 29 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR |
mbed_official | 87:085cde657901 | 30 | * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER |
mbed_official | 87:085cde657901 | 31 | * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, |
mbed_official | 87:085cde657901 | 32 | * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
mbed_official | 87:085cde657901 | 33 | * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
mbed_official | 87:085cde657901 | 34 | * |
mbed_official | 87:085cde657901 | 35 | ****************************************************************************** |
mbed_official | 87:085cde657901 | 36 | */ |
mbed_official | 87:085cde657901 | 37 | |
mbed_official | 87:085cde657901 | 38 | /* Define to prevent recursive inclusion -------------------------------------*/ |
mbed_official | 87:085cde657901 | 39 | #ifndef __STM32F4xx_HAL_PWR_EX_H |
mbed_official | 87:085cde657901 | 40 | #define __STM32F4xx_HAL_PWR_EX_H |
mbed_official | 87:085cde657901 | 41 | |
mbed_official | 87:085cde657901 | 42 | #ifdef __cplusplus |
mbed_official | 87:085cde657901 | 43 | extern "C" { |
mbed_official | 87:085cde657901 | 44 | #endif |
mbed_official | 87:085cde657901 | 45 | |
mbed_official | 87:085cde657901 | 46 | /* Includes ------------------------------------------------------------------*/ |
mbed_official | 87:085cde657901 | 47 | #include "stm32f4xx_hal_def.h" |
mbed_official | 87:085cde657901 | 48 | |
mbed_official | 87:085cde657901 | 49 | /** @addtogroup STM32F4xx_HAL_Driver |
mbed_official | 87:085cde657901 | 50 | * @{ |
mbed_official | 87:085cde657901 | 51 | */ |
mbed_official | 87:085cde657901 | 52 | |
mbed_official | 87:085cde657901 | 53 | /** @addtogroup PWREx |
mbed_official | 87:085cde657901 | 54 | * @{ |
mbed_official | 87:085cde657901 | 55 | */ |
mbed_official | 87:085cde657901 | 56 | |
mbed_official | 87:085cde657901 | 57 | /* Exported types ------------------------------------------------------------*/ |
mbed_official | 87:085cde657901 | 58 | /* Exported constants --------------------------------------------------------*/ |
mbed_official | 532:fe11edbda85c | 59 | /** @defgroup PWREx_Exported_Constants PWREx Exported Constants |
mbed_official | 532:fe11edbda85c | 60 | * @{ |
mbed_official | 532:fe11edbda85c | 61 | */ |
mbed_official | 87:085cde657901 | 62 | |
mbed_official | 532:fe11edbda85c | 63 | #if defined(STM32F427xx) || defined(STM32F437xx) || defined(STM32F429xx) || defined(STM32F439xx) || defined(STM32F446xx) |
mbed_official | 369:2e96f1b71984 | 64 | |
mbed_official | 532:fe11edbda85c | 65 | /** @defgroup PWREx_Regulator_state_in_UnderDrive_mode PWREx Regulator state in UnderDrive mode |
mbed_official | 369:2e96f1b71984 | 66 | * @{ |
mbed_official | 369:2e96f1b71984 | 67 | */ |
mbed_official | 369:2e96f1b71984 | 68 | #define PWR_MAINREGULATOR_UNDERDRIVE_ON PWR_CR_MRUDS |
mbed_official | 369:2e96f1b71984 | 69 | #define PWR_LOWPOWERREGULATOR_UNDERDRIVE_ON ((uint32_t)(PWR_CR_LPDS | PWR_CR_LPUDS)) |
mbed_official | 369:2e96f1b71984 | 70 | /** |
mbed_official | 369:2e96f1b71984 | 71 | * @} |
mbed_official | 369:2e96f1b71984 | 72 | */ |
mbed_official | 369:2e96f1b71984 | 73 | |
mbed_official | 532:fe11edbda85c | 74 | /** @defgroup PWREx_Over_Under_Drive_Flag PWREx Over Under Drive Flag |
mbed_official | 87:085cde657901 | 75 | * @{ |
mbed_official | 87:085cde657901 | 76 | */ |
mbed_official | 87:085cde657901 | 77 | #define PWR_FLAG_ODRDY PWR_CSR_ODRDY |
mbed_official | 87:085cde657901 | 78 | #define PWR_FLAG_ODSWRDY PWR_CSR_ODSWRDY |
mbed_official | 87:085cde657901 | 79 | #define PWR_FLAG_UDRDY PWR_CSR_UDSWRDY |
mbed_official | 87:085cde657901 | 80 | /** |
mbed_official | 87:085cde657901 | 81 | * @} |
mbed_official | 87:085cde657901 | 82 | */ |
mbed_official | 532:fe11edbda85c | 83 | #endif /* STM32F427xx || STM32F437xx || STM32F429xx || STM32F439xx || STM32F446xx */ |
mbed_official | 532:fe11edbda85c | 84 | |
mbed_official | 532:fe11edbda85c | 85 | /** @defgroup PWR_Regulator_Voltage_Scale PWR Regulator Voltage Scale |
mbed_official | 532:fe11edbda85c | 86 | * @{ |
mbed_official | 532:fe11edbda85c | 87 | */ |
mbed_official | 613:bc40b8d2aec4 | 88 | #if defined(STM32F405xx) || defined(STM32F407xx) || defined(STM32F415xx) || defined(STM32F417xx) |
mbed_official | 532:fe11edbda85c | 89 | #define PWR_REGULATOR_VOLTAGE_SCALE1 PWR_CR_VOS /* Scale 1 mode(default value at reset): the maximum value of fHCLK = 168 MHz. */ |
mbed_official | 532:fe11edbda85c | 90 | #define PWR_REGULATOR_VOLTAGE_SCALE2 ((uint32_t)0x00000000) /* Scale 2 mode: the maximum value of fHCLK = 144 MHz. */ |
mbed_official | 532:fe11edbda85c | 91 | #else |
mbed_official | 532:fe11edbda85c | 92 | #define PWR_REGULATOR_VOLTAGE_SCALE1 PWR_CR_VOS /* Scale 1 mode(default value at reset): the maximum value of fHCLK is 168 MHz. It can be extended to |
mbed_official | 532:fe11edbda85c | 93 | 180 MHz by activating the over-drive mode. */ |
mbed_official | 532:fe11edbda85c | 94 | #define PWR_REGULATOR_VOLTAGE_SCALE2 PWR_CR_VOS_1 /* Scale 2 mode: the maximum value of fHCLK is 144 MHz. It can be extended to |
mbed_official | 532:fe11edbda85c | 95 | 168 MHz by activating the over-drive mode. */ |
mbed_official | 532:fe11edbda85c | 96 | #define PWR_REGULATOR_VOLTAGE_SCALE3 PWR_CR_VOS_0 /* Scale 3 mode: the maximum value of fHCLK is 120 MHz. */ |
mbed_official | 532:fe11edbda85c | 97 | #endif /* STM32F405xx || STM32F407xx || STM32F415xx || STM32F417xx */ |
mbed_official | 532:fe11edbda85c | 98 | /** |
mbed_official | 532:fe11edbda85c | 99 | * @} |
mbed_official | 532:fe11edbda85c | 100 | */ |
mbed_official | 532:fe11edbda85c | 101 | |
mbed_official | 87:085cde657901 | 102 | /** |
mbed_official | 87:085cde657901 | 103 | * @} |
mbed_official | 87:085cde657901 | 104 | */ |
mbed_official | 87:085cde657901 | 105 | |
mbed_official | 87:085cde657901 | 106 | /* Exported macro ------------------------------------------------------------*/ |
mbed_official | 532:fe11edbda85c | 107 | /** @defgroup PWREx_Exported_Constants PWREx Exported Constants |
mbed_official | 532:fe11edbda85c | 108 | * @{ |
mbed_official | 532:fe11edbda85c | 109 | */ |
mbed_official | 532:fe11edbda85c | 110 | #if defined(STM32F427xx) || defined(STM32F437xx) || defined(STM32F429xx) || defined(STM32F439xx) || defined(STM32F446xx) |
mbed_official | 87:085cde657901 | 111 | /** @brief Macros to enable or disable the Over drive mode. |
mbed_official | 87:085cde657901 | 112 | * @note These macros can be used only for STM32F42xx/STM3243xx devices. |
mbed_official | 87:085cde657901 | 113 | */ |
mbed_official | 87:085cde657901 | 114 | #define __HAL_PWR_OVERDRIVE_ENABLE() (*(__IO uint32_t *) CR_ODEN_BB = ENABLE) |
mbed_official | 87:085cde657901 | 115 | #define __HAL_PWR_OVERDRIVE_DISABLE() (*(__IO uint32_t *) CR_ODEN_BB = DISABLE) |
mbed_official | 87:085cde657901 | 116 | |
mbed_official | 87:085cde657901 | 117 | /** @brief Macros to enable or disable the Over drive switching. |
mbed_official | 87:085cde657901 | 118 | * @note These macros can be used only for STM32F42xx/STM3243xx devices. |
mbed_official | 87:085cde657901 | 119 | */ |
mbed_official | 87:085cde657901 | 120 | #define __HAL_PWR_OVERDRIVESWITCHING_ENABLE() (*(__IO uint32_t *) CR_ODSWEN_BB = ENABLE) |
mbed_official | 87:085cde657901 | 121 | #define __HAL_PWR_OVERDRIVESWITCHING_DISABLE() (*(__IO uint32_t *) CR_ODSWEN_BB = DISABLE) |
mbed_official | 87:085cde657901 | 122 | |
mbed_official | 87:085cde657901 | 123 | /** @brief Macros to enable or disable the Under drive mode. |
mbed_official | 87:085cde657901 | 124 | * @note This mode is enabled only with STOP low power mode. |
mbed_official | 87:085cde657901 | 125 | * In this mode, the 1.2V domain is preserved in reduced leakage mode. This |
mbed_official | 87:085cde657901 | 126 | * mode is only available when the main regulator or the low power regulator |
mbed_official | 87:085cde657901 | 127 | * is in low voltage mode. |
mbed_official | 87:085cde657901 | 128 | * @note If the Under-drive mode was enabled, it is automatically disabled after |
mbed_official | 87:085cde657901 | 129 | * exiting Stop mode. |
mbed_official | 87:085cde657901 | 130 | * When the voltage regulator operates in Under-drive mode, an additional |
mbed_official | 87:085cde657901 | 131 | * startup delay is induced when waking up from Stop mode. |
mbed_official | 87:085cde657901 | 132 | */ |
mbed_official | 87:085cde657901 | 133 | #define __HAL_PWR_UNDERDRIVE_ENABLE() (PWR->CR |= (uint32_t)PWR_CR_UDEN) |
mbed_official | 87:085cde657901 | 134 | #define __HAL_PWR_UNDERDRIVE_DISABLE() (PWR->CR &= (uint32_t)(~PWR_CR_UDEN)) |
mbed_official | 87:085cde657901 | 135 | |
mbed_official | 87:085cde657901 | 136 | /** @brief Check PWR flag is set or not. |
mbed_official | 87:085cde657901 | 137 | * @note These macros can be used only for STM32F42xx/STM3243xx devices. |
mbed_official | 87:085cde657901 | 138 | * @param __FLAG__: specifies the flag to check. |
mbed_official | 87:085cde657901 | 139 | * This parameter can be one of the following values: |
mbed_official | 87:085cde657901 | 140 | * @arg PWR_FLAG_ODRDY: This flag indicates that the Over-drive mode |
mbed_official | 87:085cde657901 | 141 | * is ready |
mbed_official | 87:085cde657901 | 142 | * @arg PWR_FLAG_ODSWRDY: This flag indicates that the Over-drive mode |
mbed_official | 87:085cde657901 | 143 | * switching is ready |
mbed_official | 87:085cde657901 | 144 | * @arg PWR_FLAG_UDRDY: This flag indicates that the Under-drive mode |
mbed_official | 87:085cde657901 | 145 | * is enabled in Stop mode |
mbed_official | 87:085cde657901 | 146 | * @retval The new state of __FLAG__ (TRUE or FALSE). |
mbed_official | 87:085cde657901 | 147 | */ |
mbed_official | 87:085cde657901 | 148 | #define __HAL_PWR_GET_ODRUDR_FLAG(__FLAG__) ((PWR->CSR & (__FLAG__)) == (__FLAG__)) |
mbed_official | 87:085cde657901 | 149 | |
mbed_official | 87:085cde657901 | 150 | /** @brief Clear the Under-Drive Ready flag. |
mbed_official | 87:085cde657901 | 151 | * @note These macros can be used only for STM32F42xx/STM3243xx devices. |
mbed_official | 87:085cde657901 | 152 | */ |
mbed_official | 87:085cde657901 | 153 | #define __HAL_PWR_CLEAR_ODRUDR_FLAG() (PWR->CSR |= PWR_FLAG_UDRDY) |
mbed_official | 87:085cde657901 | 154 | |
mbed_official | 532:fe11edbda85c | 155 | #endif /* STM32F427xx || STM32F437xx || STM32F429xx || STM32F439xx || STM32F446xx */ |
mbed_official | 532:fe11edbda85c | 156 | /** |
mbed_official | 532:fe11edbda85c | 157 | * @} |
mbed_official | 532:fe11edbda85c | 158 | */ |
mbed_official | 87:085cde657901 | 159 | |
mbed_official | 87:085cde657901 | 160 | /* Exported functions --------------------------------------------------------*/ |
mbed_official | 532:fe11edbda85c | 161 | /** @addtogroup PWREx_Exported_Functions PWREx Exported Functions |
mbed_official | 532:fe11edbda85c | 162 | * @{ |
mbed_official | 532:fe11edbda85c | 163 | */ |
mbed_official | 532:fe11edbda85c | 164 | |
mbed_official | 532:fe11edbda85c | 165 | /** @addtogroup PWREx_Exported_Functions_Group1 |
mbed_official | 532:fe11edbda85c | 166 | * @{ |
mbed_official | 532:fe11edbda85c | 167 | */ |
mbed_official | 532:fe11edbda85c | 168 | void HAL_PWREx_EnableFlashPowerDown(void); |
mbed_official | 532:fe11edbda85c | 169 | void HAL_PWREx_DisableFlashPowerDown(void); |
mbed_official | 87:085cde657901 | 170 | HAL_StatusTypeDef HAL_PWREx_EnableBkUpReg(void); |
mbed_official | 87:085cde657901 | 171 | HAL_StatusTypeDef HAL_PWREx_DisableBkUpReg(void); |
mbed_official | 532:fe11edbda85c | 172 | uint32_t HAL_PWREx_GetVoltageRange(void); |
mbed_official | 532:fe11edbda85c | 173 | HAL_StatusTypeDef HAL_PWREx_ControlVoltageScaling(uint32_t VoltageScaling); |
mbed_official | 87:085cde657901 | 174 | |
mbed_official | 369:2e96f1b71984 | 175 | #if defined(STM32F401xC) || defined(STM32F401xE) || defined(STM32F411xE) |
mbed_official | 369:2e96f1b71984 | 176 | void HAL_PWREx_EnableMainRegulatorLowVoltage(void); |
mbed_official | 369:2e96f1b71984 | 177 | void HAL_PWREx_DisableMainRegulatorLowVoltage(void); |
mbed_official | 369:2e96f1b71984 | 178 | void HAL_PWREx_EnableLowRegulatorLowVoltage(void); |
mbed_official | 369:2e96f1b71984 | 179 | void HAL_PWREx_DisableLowRegulatorLowVoltage(void); |
mbed_official | 369:2e96f1b71984 | 180 | #endif /* STM32F401xC || STM32F401xE || STM32F411xE */ |
mbed_official | 369:2e96f1b71984 | 181 | |
mbed_official | 532:fe11edbda85c | 182 | #if defined(STM32F427xx) || defined(STM32F437xx) || defined(STM32F429xx) || defined(STM32F439xx) || defined(STM32F446xx) |
mbed_official | 532:fe11edbda85c | 183 | HAL_StatusTypeDef HAL_PWREx_EnableOverDrive(void); |
mbed_official | 532:fe11edbda85c | 184 | HAL_StatusTypeDef HAL_PWREx_DisableOverDrive(void); |
mbed_official | 369:2e96f1b71984 | 185 | HAL_StatusTypeDef HAL_PWREx_EnterUnderDriveSTOPMode(uint32_t Regulator, uint8_t STOPEntry); |
mbed_official | 532:fe11edbda85c | 186 | #endif /* STM32F427xx || STM32F437xx || STM32F429xx || STM32F439xx || STM32F446xx */ |
mbed_official | 532:fe11edbda85c | 187 | |
mbed_official | 532:fe11edbda85c | 188 | /** |
mbed_official | 532:fe11edbda85c | 189 | * @} |
mbed_official | 532:fe11edbda85c | 190 | */ |
mbed_official | 532:fe11edbda85c | 191 | |
mbed_official | 532:fe11edbda85c | 192 | /** |
mbed_official | 532:fe11edbda85c | 193 | * @} |
mbed_official | 532:fe11edbda85c | 194 | */ |
mbed_official | 532:fe11edbda85c | 195 | /* Private types -------------------------------------------------------------*/ |
mbed_official | 532:fe11edbda85c | 196 | /* Private variables ---------------------------------------------------------*/ |
mbed_official | 532:fe11edbda85c | 197 | /* Private constants ---------------------------------------------------------*/ |
mbed_official | 532:fe11edbda85c | 198 | /** @defgroup PWREx_Private_Constants PWREx Private Constants |
mbed_official | 532:fe11edbda85c | 199 | * @{ |
mbed_official | 532:fe11edbda85c | 200 | */ |
mbed_official | 532:fe11edbda85c | 201 | |
mbed_official | 532:fe11edbda85c | 202 | /** @defgroup PWREx_register_alias_address PWREx Register alias address |
mbed_official | 532:fe11edbda85c | 203 | * @{ |
mbed_official | 532:fe11edbda85c | 204 | */ |
mbed_official | 532:fe11edbda85c | 205 | /* ------------- PWR registers bit address in the alias region ---------------*/ |
mbed_official | 532:fe11edbda85c | 206 | /* --- CR Register ---*/ |
mbed_official | 532:fe11edbda85c | 207 | /* Alias word address of FPDS bit */ |
mbed_official | 532:fe11edbda85c | 208 | #define FPDS_BIT_NUMBER POSITION_VAL(PWR_CR_FPDS) |
mbed_official | 532:fe11edbda85c | 209 | #define CR_FPDS_BB (uint32_t)(PERIPH_BB_BASE + (PWR_CR_OFFSET_BB * 32) + (FPDS_BIT_NUMBER * 4)) |
mbed_official | 532:fe11edbda85c | 210 | |
mbed_official | 532:fe11edbda85c | 211 | /* Alias word address of ODEN bit */ |
mbed_official | 532:fe11edbda85c | 212 | #define ODEN_BIT_NUMBER POSITION_VAL(PWR_CR_ODEN) |
mbed_official | 532:fe11edbda85c | 213 | #define CR_ODEN_BB (uint32_t)(PERIPH_BB_BASE + (PWR_CR_OFFSET_BB * 32) + (ODEN_BIT_NUMBER * 4)) |
mbed_official | 532:fe11edbda85c | 214 | |
mbed_official | 532:fe11edbda85c | 215 | /* Alias word address of ODSWEN bit */ |
mbed_official | 532:fe11edbda85c | 216 | #define ODSWEN_BIT_NUMBER POSITION_VAL(PWR_CR_ODSWEN) |
mbed_official | 532:fe11edbda85c | 217 | #define CR_ODSWEN_BB (uint32_t)(PERIPH_BB_BASE + (PWR_CR_OFFSET_BB * 32) + (ODSWEN_BIT_NUMBER * 4)) |
mbed_official | 532:fe11edbda85c | 218 | |
mbed_official | 532:fe11edbda85c | 219 | /* Alias word address of MRLVDS bit */ |
mbed_official | 532:fe11edbda85c | 220 | #define MRLVDS_BIT_NUMBER POSITION_VAL(PWR_CR_MRLVDS) |
mbed_official | 532:fe11edbda85c | 221 | #define CR_MRLVDS_BB (uint32_t)(PERIPH_BB_BASE + (PWR_CR_OFFSET_BB * 32) + (MRLVDS_BIT_NUMBER * 4)) |
mbed_official | 532:fe11edbda85c | 222 | |
mbed_official | 532:fe11edbda85c | 223 | /* Alias word address of LPLVDS bit */ |
mbed_official | 532:fe11edbda85c | 224 | #define LPLVDS_BIT_NUMBER POSITION_VAL(PWR_CR_LPLVDS) |
mbed_official | 532:fe11edbda85c | 225 | #define CR_LPLVDS_BB (uint32_t)(PERIPH_BB_BASE + (PWR_CR_OFFSET_BB * 32) + (LPLVDS_BIT_NUMBER * 4)) |
mbed_official | 532:fe11edbda85c | 226 | |
mbed_official | 532:fe11edbda85c | 227 | /** |
mbed_official | 532:fe11edbda85c | 228 | * @} |
mbed_official | 532:fe11edbda85c | 229 | */ |
mbed_official | 532:fe11edbda85c | 230 | |
mbed_official | 532:fe11edbda85c | 231 | /** @defgroup PWREx_CSR_register_alias PWRx CSR Register alias address |
mbed_official | 532:fe11edbda85c | 232 | * @{ |
mbed_official | 532:fe11edbda85c | 233 | */ |
mbed_official | 532:fe11edbda85c | 234 | /* --- CSR Register ---*/ |
mbed_official | 532:fe11edbda85c | 235 | /* Alias word address of BRE bit */ |
mbed_official | 532:fe11edbda85c | 236 | #define BRE_BIT_NUMBER POSITION_VAL(PWR_CSR_BRE) |
mbed_official | 532:fe11edbda85c | 237 | #define CSR_BRE_BB (uint32_t)(PERIPH_BB_BASE + (PWR_CSR_OFFSET_BB * 32) + (BRE_BIT_NUMBER * 4)) |
mbed_official | 532:fe11edbda85c | 238 | /** |
mbed_official | 532:fe11edbda85c | 239 | * @} |
mbed_official | 532:fe11edbda85c | 240 | */ |
mbed_official | 532:fe11edbda85c | 241 | |
mbed_official | 532:fe11edbda85c | 242 | /** |
mbed_official | 532:fe11edbda85c | 243 | * @} |
mbed_official | 532:fe11edbda85c | 244 | */ |
mbed_official | 532:fe11edbda85c | 245 | |
mbed_official | 532:fe11edbda85c | 246 | /* Private macros ------------------------------------------------------------*/ |
mbed_official | 532:fe11edbda85c | 247 | /** @defgroup PWREx_Private_Macros PWREx Private Macros |
mbed_official | 532:fe11edbda85c | 248 | * @{ |
mbed_official | 532:fe11edbda85c | 249 | */ |
mbed_official | 532:fe11edbda85c | 250 | |
mbed_official | 532:fe11edbda85c | 251 | /** @defgroup PWREx_IS_PWR_Definitions PWREx Private macros to check input parameters |
mbed_official | 532:fe11edbda85c | 252 | * @{ |
mbed_official | 532:fe11edbda85c | 253 | */ |
mbed_official | 532:fe11edbda85c | 254 | #if defined(STM32F427xx) || defined(STM32F437xx) || defined(STM32F429xx) || defined(STM32F439xx) || defined(STM32F446xx) |
mbed_official | 532:fe11edbda85c | 255 | #define IS_PWR_REGULATOR_UNDERDRIVE(REGULATOR) (((REGULATOR) == PWR_MAINREGULATOR_UNDERDRIVE_ON) || \ |
mbed_official | 532:fe11edbda85c | 256 | ((REGULATOR) == PWR_LOWPOWERREGULATOR_UNDERDRIVE_ON)) |
mbed_official | 532:fe11edbda85c | 257 | #endif /* STM32F427xx || STM32F437xx || STM32F429xx || STM32F439xx || STM32F446xx */ |
mbed_official | 532:fe11edbda85c | 258 | |
mbed_official | 613:bc40b8d2aec4 | 259 | #if defined(STM32F405xx) || defined(STM32F407xx) || defined(STM32F415xx) || defined(STM32F417xx) |
mbed_official | 532:fe11edbda85c | 260 | #define IS_PWR_VOLTAGE_SCALING_RANGE(VOLTAGE) (((VOLTAGE) == PWR_REGULATOR_VOLTAGE_SCALE1) || \ |
mbed_official | 532:fe11edbda85c | 261 | ((VOLTAGE) == PWR_REGULATOR_VOLTAGE_SCALE2)) |
mbed_official | 532:fe11edbda85c | 262 | #else |
mbed_official | 532:fe11edbda85c | 263 | #define IS_PWR_VOLTAGE_SCALING_RANGE(VOLTAGE) (((VOLTAGE) == PWR_REGULATOR_VOLTAGE_SCALE1) || \ |
mbed_official | 532:fe11edbda85c | 264 | ((VOLTAGE) == PWR_REGULATOR_VOLTAGE_SCALE2) || \ |
mbed_official | 532:fe11edbda85c | 265 | ((VOLTAGE) == PWR_REGULATOR_VOLTAGE_SCALE3)) |
mbed_official | 532:fe11edbda85c | 266 | #endif /* STM32F405xx || STM32F407xx || STM32F415xx || STM32F417xx */ |
mbed_official | 532:fe11edbda85c | 267 | |
mbed_official | 532:fe11edbda85c | 268 | /** |
mbed_official | 532:fe11edbda85c | 269 | * @} |
mbed_official | 532:fe11edbda85c | 270 | */ |
mbed_official | 532:fe11edbda85c | 271 | |
mbed_official | 532:fe11edbda85c | 272 | /** |
mbed_official | 532:fe11edbda85c | 273 | * @} |
mbed_official | 532:fe11edbda85c | 274 | */ |
mbed_official | 87:085cde657901 | 275 | |
mbed_official | 87:085cde657901 | 276 | /** |
mbed_official | 87:085cde657901 | 277 | * @} |
mbed_official | 87:085cde657901 | 278 | */ |
mbed_official | 87:085cde657901 | 279 | |
mbed_official | 87:085cde657901 | 280 | /** |
mbed_official | 87:085cde657901 | 281 | * @} |
mbed_official | 87:085cde657901 | 282 | */ |
mbed_official | 87:085cde657901 | 283 | |
mbed_official | 87:085cde657901 | 284 | #ifdef __cplusplus |
mbed_official | 87:085cde657901 | 285 | } |
mbed_official | 87:085cde657901 | 286 | #endif |
mbed_official | 87:085cde657901 | 287 | |
mbed_official | 87:085cde657901 | 288 | |
mbed_official | 87:085cde657901 | 289 | #endif /* __STM32F4xx_HAL_PWR_EX_H */ |
mbed_official | 87:085cde657901 | 290 | |
mbed_official | 87:085cde657901 | 291 | /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ |