The official Mbed 2 C/C++ SDK provides the software platform and libraries to build your applications.
Dependents: hello SerialTestv11 SerialTestv12 Sierpinski ... more
mbed 2
This is the mbed 2 library. If you'd like to learn about Mbed OS please see the mbed-os docs.
TARGET_NUCLEO_L432KC/stm32l4xx_hal.h@122:f9eeca106725, 2016-07-07 (annotated)
- Committer:
- Kojto
- Date:
- Thu Jul 07 14:34:11 2016 +0100
- Revision:
- 122:f9eeca106725
Release 122 of the mbed library
Changes:
- new targets - Nucleo L432KC, Beetle, Nucleo F446ZE, Nucleo L011K4
- Thread safety addition - mbed API should contain a statement about thread safety
- critical section API addition
- CAS API (core_util_atomic_incr/decr)
- DEVICE_ are generated from targets.json file, device.h deprecated
- Callback replaces FunctionPointer to provide std like interface
- mbed HAL API docs improvements
- toolchain - prexif attributes with MBED_
- add new attributes - packed, weak, forcedinline, align
- target.json - contains targets definitions
- ST - L1XX - Cube update to 1.5
- SPI clock selection fix (clock from APB domain)
- F7 - Cube update v1.4.0
- L0 - baudrate init fix
- L1 - Cube update v1.5
- F3 - baudrate init fix, 3 targets CAN support
- F4 - Cube update v1.12.0, 3 targets CAN support
- L4XX - Cube update v1.5.1
- F0 - update Cube to v1.5.0
- L4 - 2 targets (L476RG/VG) CAN support
- NXP - pwm clock fix for KSDK2 MCU
- LPC2368 - remove ARM toolchain support - due to regression
- KSDK2 - fix SPI , I2C address and repeat start
- Silabs - some fixes backported from mbed 3
- Renesas - RZ_A1H - SystemCoreClockUpdate addition
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
Kojto | 122:f9eeca106725 | 1 | /** |
Kojto | 122:f9eeca106725 | 2 | ****************************************************************************** |
Kojto | 122:f9eeca106725 | 3 | * @file stm32l4xx_hal.h |
Kojto | 122:f9eeca106725 | 4 | * @author MCD Application Team |
Kojto | 122:f9eeca106725 | 5 | * @version V1.5.1 |
Kojto | 122:f9eeca106725 | 6 | * @date 31-May-2016 |
Kojto | 122:f9eeca106725 | 7 | * @brief This file contains all the functions prototypes for the HAL |
Kojto | 122:f9eeca106725 | 8 | * module driver. |
Kojto | 122:f9eeca106725 | 9 | ****************************************************************************** |
Kojto | 122:f9eeca106725 | 10 | * @attention |
Kojto | 122:f9eeca106725 | 11 | * |
Kojto | 122:f9eeca106725 | 12 | * <h2><center>© COPYRIGHT(c) 2016 STMicroelectronics</center></h2> |
Kojto | 122:f9eeca106725 | 13 | * |
Kojto | 122:f9eeca106725 | 14 | * Redistribution and use in source and binary forms, with or without modification, |
Kojto | 122:f9eeca106725 | 15 | * are permitted provided that the following conditions are met: |
Kojto | 122:f9eeca106725 | 16 | * 1. Redistributions of source code must retain the above copyright notice, |
Kojto | 122:f9eeca106725 | 17 | * this list of conditions and the following disclaimer. |
Kojto | 122:f9eeca106725 | 18 | * 2. Redistributions in binary form must reproduce the above copyright notice, |
Kojto | 122:f9eeca106725 | 19 | * this list of conditions and the following disclaimer in the documentation |
Kojto | 122:f9eeca106725 | 20 | * and/or other materials provided with the distribution. |
Kojto | 122:f9eeca106725 | 21 | * 3. Neither the name of STMicroelectronics nor the names of its contributors |
Kojto | 122:f9eeca106725 | 22 | * may be used to endorse or promote products derived from this software |
Kojto | 122:f9eeca106725 | 23 | * without specific prior written permission. |
Kojto | 122:f9eeca106725 | 24 | * |
Kojto | 122:f9eeca106725 | 25 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" |
Kojto | 122:f9eeca106725 | 26 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE |
Kojto | 122:f9eeca106725 | 27 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE |
Kojto | 122:f9eeca106725 | 28 | * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE |
Kojto | 122:f9eeca106725 | 29 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL |
Kojto | 122:f9eeca106725 | 30 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR |
Kojto | 122:f9eeca106725 | 31 | * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER |
Kojto | 122:f9eeca106725 | 32 | * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, |
Kojto | 122:f9eeca106725 | 33 | * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
Kojto | 122:f9eeca106725 | 34 | * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
Kojto | 122:f9eeca106725 | 35 | * |
Kojto | 122:f9eeca106725 | 36 | ****************************************************************************** |
Kojto | 122:f9eeca106725 | 37 | */ |
Kojto | 122:f9eeca106725 | 38 | |
Kojto | 122:f9eeca106725 | 39 | /* Define to prevent recursive inclusion -------------------------------------*/ |
Kojto | 122:f9eeca106725 | 40 | #ifndef __STM32L4xx_HAL_H |
Kojto | 122:f9eeca106725 | 41 | #define __STM32L4xx_HAL_H |
Kojto | 122:f9eeca106725 | 42 | |
Kojto | 122:f9eeca106725 | 43 | #ifdef __cplusplus |
Kojto | 122:f9eeca106725 | 44 | extern "C" { |
Kojto | 122:f9eeca106725 | 45 | #endif |
Kojto | 122:f9eeca106725 | 46 | |
Kojto | 122:f9eeca106725 | 47 | /* Includes ------------------------------------------------------------------*/ |
Kojto | 122:f9eeca106725 | 48 | #include "stm32l4xx_hal_conf.h" |
Kojto | 122:f9eeca106725 | 49 | |
Kojto | 122:f9eeca106725 | 50 | /** @addtogroup STM32L4xx_HAL_Driver |
Kojto | 122:f9eeca106725 | 51 | * @{ |
Kojto | 122:f9eeca106725 | 52 | */ |
Kojto | 122:f9eeca106725 | 53 | |
Kojto | 122:f9eeca106725 | 54 | /** @addtogroup HAL |
Kojto | 122:f9eeca106725 | 55 | * @{ |
Kojto | 122:f9eeca106725 | 56 | */ |
Kojto | 122:f9eeca106725 | 57 | |
Kojto | 122:f9eeca106725 | 58 | /* Exported types ------------------------------------------------------------*/ |
Kojto | 122:f9eeca106725 | 59 | /* Exported constants --------------------------------------------------------*/ |
Kojto | 122:f9eeca106725 | 60 | /** @defgroup SYSCFG_Exported_Constants SYSCFG Exported Constants |
Kojto | 122:f9eeca106725 | 61 | * @{ |
Kojto | 122:f9eeca106725 | 62 | */ |
Kojto | 122:f9eeca106725 | 63 | |
Kojto | 122:f9eeca106725 | 64 | /** @defgroup SYSCFG_BootMode Boot Mode |
Kojto | 122:f9eeca106725 | 65 | * @{ |
Kojto | 122:f9eeca106725 | 66 | */ |
Kojto | 122:f9eeca106725 | 67 | #define SYSCFG_BOOT_MAINFLASH ((uint32_t)0x00000000) |
Kojto | 122:f9eeca106725 | 68 | #define SYSCFG_BOOT_SYSTEMFLASH SYSCFG_MEMRMP_MEM_MODE_0 |
Kojto | 122:f9eeca106725 | 69 | #if defined (STM32L471xx) || defined (STM32L475xx) || defined (STM32L476xx) || defined (STM32L485xx) || defined (STM32L486xx) |
Kojto | 122:f9eeca106725 | 70 | #define SYSCFG_BOOT_FMC SYSCFG_MEMRMP_MEM_MODE_1 |
Kojto | 122:f9eeca106725 | 71 | #endif /* STM32L471xx || STM32L475xx || STM32L476xx || STM32L485xx || STM32L486xx */ |
Kojto | 122:f9eeca106725 | 72 | #define SYSCFG_BOOT_SRAM (SYSCFG_MEMRMP_MEM_MODE_1 | SYSCFG_MEMRMP_MEM_MODE_0) |
Kojto | 122:f9eeca106725 | 73 | #define SYSCFG_BOOT_QUADSPI (SYSCFG_MEMRMP_MEM_MODE_2 | SYSCFG_MEMRMP_MEM_MODE_1) |
Kojto | 122:f9eeca106725 | 74 | |
Kojto | 122:f9eeca106725 | 75 | /** |
Kojto | 122:f9eeca106725 | 76 | * @} |
Kojto | 122:f9eeca106725 | 77 | */ |
Kojto | 122:f9eeca106725 | 78 | |
Kojto | 122:f9eeca106725 | 79 | /** @defgroup SYSCFG_FPU_Interrupts FPU Interrupts |
Kojto | 122:f9eeca106725 | 80 | * @{ |
Kojto | 122:f9eeca106725 | 81 | */ |
Kojto | 122:f9eeca106725 | 82 | #define SYSCFG_IT_FPU_IOC SYSCFG_CFGR1_FPU_IE_0 /*!< Floating Point Unit Invalid operation Interrupt */ |
Kojto | 122:f9eeca106725 | 83 | #define SYSCFG_IT_FPU_DZC SYSCFG_CFGR1_FPU_IE_1 /*!< Floating Point Unit Divide-by-zero Interrupt */ |
Kojto | 122:f9eeca106725 | 84 | #define SYSCFG_IT_FPU_UFC SYSCFG_CFGR1_FPU_IE_2 /*!< Floating Point Unit Underflow Interrupt */ |
Kojto | 122:f9eeca106725 | 85 | #define SYSCFG_IT_FPU_OFC SYSCFG_CFGR1_FPU_IE_3 /*!< Floating Point Unit Overflow Interrupt */ |
Kojto | 122:f9eeca106725 | 86 | #define SYSCFG_IT_FPU_IDC SYSCFG_CFGR1_FPU_IE_4 /*!< Floating Point Unit Input denormal Interrupt */ |
Kojto | 122:f9eeca106725 | 87 | #define SYSCFG_IT_FPU_IXC SYSCFG_CFGR1_FPU_IE_5 /*!< Floating Point Unit Inexact Interrupt */ |
Kojto | 122:f9eeca106725 | 88 | |
Kojto | 122:f9eeca106725 | 89 | /** |
Kojto | 122:f9eeca106725 | 90 | * @} |
Kojto | 122:f9eeca106725 | 91 | */ |
Kojto | 122:f9eeca106725 | 92 | |
Kojto | 122:f9eeca106725 | 93 | /** @defgroup SYSCFG_SRAM2WRP SRAM2 Write protection |
Kojto | 122:f9eeca106725 | 94 | * @{ |
Kojto | 122:f9eeca106725 | 95 | */ |
Kojto | 122:f9eeca106725 | 96 | #define SYSCFG_SRAM2WRP_PAGE0 SYSCFG_SWPR_PAGE0 /*!< SRAM2 Write protection page 0 */ |
Kojto | 122:f9eeca106725 | 97 | #define SYSCFG_SRAM2WRP_PAGE1 SYSCFG_SWPR_PAGE1 /*!< SRAM2 Write protection page 1 */ |
Kojto | 122:f9eeca106725 | 98 | #define SYSCFG_SRAM2WRP_PAGE2 SYSCFG_SWPR_PAGE2 /*!< SRAM2 Write protection page 2 */ |
Kojto | 122:f9eeca106725 | 99 | #define SYSCFG_SRAM2WRP_PAGE3 SYSCFG_SWPR_PAGE3 /*!< SRAM2 Write protection page 3 */ |
Kojto | 122:f9eeca106725 | 100 | #define SYSCFG_SRAM2WRP_PAGE4 SYSCFG_SWPR_PAGE4 /*!< SRAM2 Write protection page 4 */ |
Kojto | 122:f9eeca106725 | 101 | #define SYSCFG_SRAM2WRP_PAGE5 SYSCFG_SWPR_PAGE5 /*!< SRAM2 Write protection page 5 */ |
Kojto | 122:f9eeca106725 | 102 | #define SYSCFG_SRAM2WRP_PAGE6 SYSCFG_SWPR_PAGE6 /*!< SRAM2 Write protection page 6 */ |
Kojto | 122:f9eeca106725 | 103 | #define SYSCFG_SRAM2WRP_PAGE7 SYSCFG_SWPR_PAGE7 /*!< SRAM2 Write protection page 7 */ |
Kojto | 122:f9eeca106725 | 104 | #define SYSCFG_SRAM2WRP_PAGE8 SYSCFG_SWPR_PAGE8 /*!< SRAM2 Write protection page 8 */ |
Kojto | 122:f9eeca106725 | 105 | #define SYSCFG_SRAM2WRP_PAGE9 SYSCFG_SWPR_PAGE9 /*!< SRAM2 Write protection page 9 */ |
Kojto | 122:f9eeca106725 | 106 | #define SYSCFG_SRAM2WRP_PAGE10 SYSCFG_SWPR_PAGE10 /*!< SRAM2 Write protection page 10 */ |
Kojto | 122:f9eeca106725 | 107 | #define SYSCFG_SRAM2WRP_PAGE11 SYSCFG_SWPR_PAGE11 /*!< SRAM2 Write protection page 11 */ |
Kojto | 122:f9eeca106725 | 108 | #define SYSCFG_SRAM2WRP_PAGE12 SYSCFG_SWPR_PAGE12 /*!< SRAM2 Write protection page 12 */ |
Kojto | 122:f9eeca106725 | 109 | #define SYSCFG_SRAM2WRP_PAGE13 SYSCFG_SWPR_PAGE13 /*!< SRAM2 Write protection page 13 */ |
Kojto | 122:f9eeca106725 | 110 | #define SYSCFG_SRAM2WRP_PAGE14 SYSCFG_SWPR_PAGE14 /*!< SRAM2 Write protection page 14 */ |
Kojto | 122:f9eeca106725 | 111 | #define SYSCFG_SRAM2WRP_PAGE15 SYSCFG_SWPR_PAGE15 /*!< SRAM2 Write protection page 15 */ |
Kojto | 122:f9eeca106725 | 112 | #define SYSCFG_SRAM2WRP_PAGE16 SYSCFG_SWPR_PAGE16 /*!< SRAM2 Write protection page 16 */ |
Kojto | 122:f9eeca106725 | 113 | #define SYSCFG_SRAM2WRP_PAGE17 SYSCFG_SWPR_PAGE17 /*!< SRAM2 Write protection page 17 */ |
Kojto | 122:f9eeca106725 | 114 | #define SYSCFG_SRAM2WRP_PAGE18 SYSCFG_SWPR_PAGE18 /*!< SRAM2 Write protection page 18 */ |
Kojto | 122:f9eeca106725 | 115 | #define SYSCFG_SRAM2WRP_PAGE19 SYSCFG_SWPR_PAGE19 /*!< SRAM2 Write protection page 19 */ |
Kojto | 122:f9eeca106725 | 116 | #define SYSCFG_SRAM2WRP_PAGE20 SYSCFG_SWPR_PAGE20 /*!< SRAM2 Write protection page 20 */ |
Kojto | 122:f9eeca106725 | 117 | #define SYSCFG_SRAM2WRP_PAGE21 SYSCFG_SWPR_PAGE21 /*!< SRAM2 Write protection page 21 */ |
Kojto | 122:f9eeca106725 | 118 | #define SYSCFG_SRAM2WRP_PAGE22 SYSCFG_SWPR_PAGE22 /*!< SRAM2 Write protection page 22 */ |
Kojto | 122:f9eeca106725 | 119 | #define SYSCFG_SRAM2WRP_PAGE23 SYSCFG_SWPR_PAGE23 /*!< SRAM2 Write protection page 23 */ |
Kojto | 122:f9eeca106725 | 120 | #define SYSCFG_SRAM2WRP_PAGE24 SYSCFG_SWPR_PAGE24 /*!< SRAM2 Write protection page 24 */ |
Kojto | 122:f9eeca106725 | 121 | #define SYSCFG_SRAM2WRP_PAGE25 SYSCFG_SWPR_PAGE25 /*!< SRAM2 Write protection page 25 */ |
Kojto | 122:f9eeca106725 | 122 | #define SYSCFG_SRAM2WRP_PAGE26 SYSCFG_SWPR_PAGE26 /*!< SRAM2 Write protection page 26 */ |
Kojto | 122:f9eeca106725 | 123 | #define SYSCFG_SRAM2WRP_PAGE27 SYSCFG_SWPR_PAGE27 /*!< SRAM2 Write protection page 27 */ |
Kojto | 122:f9eeca106725 | 124 | #define SYSCFG_SRAM2WRP_PAGE28 SYSCFG_SWPR_PAGE28 /*!< SRAM2 Write protection page 28 */ |
Kojto | 122:f9eeca106725 | 125 | #define SYSCFG_SRAM2WRP_PAGE29 SYSCFG_SWPR_PAGE29 /*!< SRAM2 Write protection page 29 */ |
Kojto | 122:f9eeca106725 | 126 | #define SYSCFG_SRAM2WRP_PAGE30 SYSCFG_SWPR_PAGE30 /*!< SRAM2 Write protection page 30 */ |
Kojto | 122:f9eeca106725 | 127 | #define SYSCFG_SRAM2WRP_PAGE31 SYSCFG_SWPR_PAGE31 /*!< SRAM2 Write protection page 31 */ |
Kojto | 122:f9eeca106725 | 128 | |
Kojto | 122:f9eeca106725 | 129 | /** |
Kojto | 122:f9eeca106725 | 130 | * @} |
Kojto | 122:f9eeca106725 | 131 | */ |
Kojto | 122:f9eeca106725 | 132 | |
Kojto | 122:f9eeca106725 | 133 | #if defined(VREFBUF) |
Kojto | 122:f9eeca106725 | 134 | /** @defgroup SYSCFG_VREFBUF_VoltageScale VREFBUF Voltage Scale |
Kojto | 122:f9eeca106725 | 135 | * @{ |
Kojto | 122:f9eeca106725 | 136 | */ |
Kojto | 122:f9eeca106725 | 137 | #define SYSCFG_VREFBUF_VOLTAGE_SCALE0 ((uint32_t)0x00000000) /*!< Voltage reference scale 0 (VREF_OUT1) */ |
Kojto | 122:f9eeca106725 | 138 | #define SYSCFG_VREFBUF_VOLTAGE_SCALE1 VREFBUF_CSR_VRS /*!< Voltage reference scale 1 (VREF_OUT2) */ |
Kojto | 122:f9eeca106725 | 139 | |
Kojto | 122:f9eeca106725 | 140 | /** |
Kojto | 122:f9eeca106725 | 141 | * @} |
Kojto | 122:f9eeca106725 | 142 | */ |
Kojto | 122:f9eeca106725 | 143 | |
Kojto | 122:f9eeca106725 | 144 | /** @defgroup SYSCFG_VREFBUF_HighImpedance VREFBUF High Impedance |
Kojto | 122:f9eeca106725 | 145 | * @{ |
Kojto | 122:f9eeca106725 | 146 | */ |
Kojto | 122:f9eeca106725 | 147 | #define SYSCFG_VREFBUF_HIGH_IMPEDANCE_DISABLE ((uint32_t)0x00000000) /*!< VREF_plus pin is internally connected to Voltage reference buffer output */ |
Kojto | 122:f9eeca106725 | 148 | #define SYSCFG_VREFBUF_HIGH_IMPEDANCE_ENABLE VREFBUF_CSR_HIZ /*!< VREF_plus pin is high impedance */ |
Kojto | 122:f9eeca106725 | 149 | |
Kojto | 122:f9eeca106725 | 150 | /** |
Kojto | 122:f9eeca106725 | 151 | * @} |
Kojto | 122:f9eeca106725 | 152 | */ |
Kojto | 122:f9eeca106725 | 153 | #endif /* VREFBUF */ |
Kojto | 122:f9eeca106725 | 154 | |
Kojto | 122:f9eeca106725 | 155 | /** @defgroup SYSCFG_flags_definition Flags |
Kojto | 122:f9eeca106725 | 156 | * @{ |
Kojto | 122:f9eeca106725 | 157 | */ |
Kojto | 122:f9eeca106725 | 158 | |
Kojto | 122:f9eeca106725 | 159 | #define SYSCFG_FLAG_SRAM2_PE SYSCFG_CFGR2_SPF /*!< SRAM2 parity error */ |
Kojto | 122:f9eeca106725 | 160 | #define SYSCFG_FLAG_SRAM2_BUSY SYSCFG_SCSR_SRAM2BSY /*!< SRAM2 busy by erase operation */ |
Kojto | 122:f9eeca106725 | 161 | |
Kojto | 122:f9eeca106725 | 162 | /** |
Kojto | 122:f9eeca106725 | 163 | * @} |
Kojto | 122:f9eeca106725 | 164 | */ |
Kojto | 122:f9eeca106725 | 165 | |
Kojto | 122:f9eeca106725 | 166 | /** @defgroup SYSCFG_FastModePlus_GPIO Fast-mode Plus on GPIO |
Kojto | 122:f9eeca106725 | 167 | * @{ |
Kojto | 122:f9eeca106725 | 168 | */ |
Kojto | 122:f9eeca106725 | 169 | |
Kojto | 122:f9eeca106725 | 170 | /** @brief Fast-mode Plus driving capability on a specific GPIO |
Kojto | 122:f9eeca106725 | 171 | */ |
Kojto | 122:f9eeca106725 | 172 | #define SYSCFG_FASTMODEPLUS_PB6 SYSCFG_CFGR1_I2C_PB6_FMP /*!< Enable Fast-mode Plus on PB6 */ |
Kojto | 122:f9eeca106725 | 173 | #define SYSCFG_FASTMODEPLUS_PB7 SYSCFG_CFGR1_I2C_PB7_FMP /*!< Enable Fast-mode Plus on PB7 */ |
Kojto | 122:f9eeca106725 | 174 | #if defined(SYSCFG_CFGR1_I2C_PB8_FMP) |
Kojto | 122:f9eeca106725 | 175 | #define SYSCFG_FASTMODEPLUS_PB8 SYSCFG_CFGR1_I2C_PB8_FMP /*!< Enable Fast-mode Plus on PB8 */ |
Kojto | 122:f9eeca106725 | 176 | #endif /* SYSCFG_CFGR1_I2C_PB8_FMP */ |
Kojto | 122:f9eeca106725 | 177 | #if defined(SYSCFG_CFGR1_I2C_PB9_FMP) |
Kojto | 122:f9eeca106725 | 178 | #define SYSCFG_FASTMODEPLUS_PB9 SYSCFG_CFGR1_I2C_PB9_FMP /*!< Enable Fast-mode Plus on PB9 */ |
Kojto | 122:f9eeca106725 | 179 | #endif /* SYSCFG_CFGR1_I2C_PB9_FMP */ |
Kojto | 122:f9eeca106725 | 180 | |
Kojto | 122:f9eeca106725 | 181 | /** |
Kojto | 122:f9eeca106725 | 182 | * @} |
Kojto | 122:f9eeca106725 | 183 | */ |
Kojto | 122:f9eeca106725 | 184 | |
Kojto | 122:f9eeca106725 | 185 | /** |
Kojto | 122:f9eeca106725 | 186 | * @} |
Kojto | 122:f9eeca106725 | 187 | */ |
Kojto | 122:f9eeca106725 | 188 | |
Kojto | 122:f9eeca106725 | 189 | /* Exported macros -----------------------------------------------------------*/ |
Kojto | 122:f9eeca106725 | 190 | |
Kojto | 122:f9eeca106725 | 191 | /** @defgroup DBGMCU_Exported_Macros DBGMCU Exported Macros |
Kojto | 122:f9eeca106725 | 192 | * @{ |
Kojto | 122:f9eeca106725 | 193 | */ |
Kojto | 122:f9eeca106725 | 194 | |
Kojto | 122:f9eeca106725 | 195 | /** @brief Freeze/Unfreeze Peripherals in Debug mode |
Kojto | 122:f9eeca106725 | 196 | */ |
Kojto | 122:f9eeca106725 | 197 | #if defined(DBGMCU_APB1FZR1_DBG_TIM2_STOP) |
Kojto | 122:f9eeca106725 | 198 | #define __HAL_DBGMCU_FREEZE_TIM2() SET_BIT(DBGMCU->APB1FZR1, DBGMCU_APB1FZR1_DBG_TIM2_STOP) |
Kojto | 122:f9eeca106725 | 199 | #define __HAL_DBGMCU_UNFREEZE_TIM2() CLEAR_BIT(DBGMCU->APB1FZR1, DBGMCU_APB1FZR1_DBG_TIM2_STOP) |
Kojto | 122:f9eeca106725 | 200 | #endif |
Kojto | 122:f9eeca106725 | 201 | |
Kojto | 122:f9eeca106725 | 202 | #if defined(DBGMCU_APB1FZR1_DBG_TIM3_STOP) |
Kojto | 122:f9eeca106725 | 203 | #define __HAL_DBGMCU_FREEZE_TIM3() SET_BIT(DBGMCU->APB1FZR1, DBGMCU_APB1FZR1_DBG_TIM3_STOP) |
Kojto | 122:f9eeca106725 | 204 | #define __HAL_DBGMCU_UNFREEZE_TIM3() CLEAR_BIT(DBGMCU->APB1FZR1, DBGMCU_APB1FZR1_DBG_TIM3_STOP) |
Kojto | 122:f9eeca106725 | 205 | #endif |
Kojto | 122:f9eeca106725 | 206 | |
Kojto | 122:f9eeca106725 | 207 | #if defined(DBGMCU_APB1FZR1_DBG_TIM4_STOP) |
Kojto | 122:f9eeca106725 | 208 | #define __HAL_DBGMCU_FREEZE_TIM4() SET_BIT(DBGMCU->APB1FZR1, DBGMCU_APB1FZR1_DBG_TIM4_STOP) |
Kojto | 122:f9eeca106725 | 209 | #define __HAL_DBGMCU_UNFREEZE_TIM4() CLEAR_BIT(DBGMCU->APB1FZR1, DBGMCU_APB1FZR1_DBG_TIM4_STOP) |
Kojto | 122:f9eeca106725 | 210 | #endif |
Kojto | 122:f9eeca106725 | 211 | |
Kojto | 122:f9eeca106725 | 212 | #if defined(DBGMCU_APB1FZR1_DBG_TIM5_STOP) |
Kojto | 122:f9eeca106725 | 213 | #define __HAL_DBGMCU_FREEZE_TIM5() SET_BIT(DBGMCU->APB1FZR1, DBGMCU_APB1FZR1_DBG_TIM5_STOP) |
Kojto | 122:f9eeca106725 | 214 | #define __HAL_DBGMCU_UNFREEZE_TIM5() CLEAR_BIT(DBGMCU->APB1FZR1, DBGMCU_APB1FZR1_DBG_TIM5_STOP) |
Kojto | 122:f9eeca106725 | 215 | #endif |
Kojto | 122:f9eeca106725 | 216 | |
Kojto | 122:f9eeca106725 | 217 | #if defined(DBGMCU_APB1FZR1_DBG_TIM6_STOP) |
Kojto | 122:f9eeca106725 | 218 | #define __HAL_DBGMCU_FREEZE_TIM6() SET_BIT(DBGMCU->APB1FZR1, DBGMCU_APB1FZR1_DBG_TIM6_STOP) |
Kojto | 122:f9eeca106725 | 219 | #define __HAL_DBGMCU_UNFREEZE_TIM6() CLEAR_BIT(DBGMCU->APB1FZR1, DBGMCU_APB1FZR1_DBG_TIM6_STOP) |
Kojto | 122:f9eeca106725 | 220 | #endif |
Kojto | 122:f9eeca106725 | 221 | |
Kojto | 122:f9eeca106725 | 222 | #if defined(DBGMCU_APB1FZR1_DBG_TIM7_STOP) |
Kojto | 122:f9eeca106725 | 223 | #define __HAL_DBGMCU_FREEZE_TIM7() SET_BIT(DBGMCU->APB1FZR1, DBGMCU_APB1FZR1_DBG_TIM7_STOP) |
Kojto | 122:f9eeca106725 | 224 | #define __HAL_DBGMCU_UNFREEZE_TIM7() CLEAR_BIT(DBGMCU->APB1FZR1, DBGMCU_APB1FZR1_DBG_TIM7_STOP) |
Kojto | 122:f9eeca106725 | 225 | #endif |
Kojto | 122:f9eeca106725 | 226 | |
Kojto | 122:f9eeca106725 | 227 | #if defined(DBGMCU_APB1FZR1_DBG_RTC_STOP) |
Kojto | 122:f9eeca106725 | 228 | #define __HAL_DBGMCU_FREEZE_RTC() SET_BIT(DBGMCU->APB1FZR1, DBGMCU_APB1FZR1_DBG_RTC_STOP) |
Kojto | 122:f9eeca106725 | 229 | #define __HAL_DBGMCU_UNFREEZE_RTC() CLEAR_BIT(DBGMCU->APB1FZR1, DBGMCU_APB1FZR1_DBG_RTC_STOP) |
Kojto | 122:f9eeca106725 | 230 | #endif |
Kojto | 122:f9eeca106725 | 231 | |
Kojto | 122:f9eeca106725 | 232 | #if defined(DBGMCU_APB1FZR1_DBG_WWDG_STOP) |
Kojto | 122:f9eeca106725 | 233 | #define __HAL_DBGMCU_FREEZE_WWDG() SET_BIT(DBGMCU->APB1FZR1, DBGMCU_APB1FZR1_DBG_WWDG_STOP) |
Kojto | 122:f9eeca106725 | 234 | #define __HAL_DBGMCU_UNFREEZE_WWDG() CLEAR_BIT(DBGMCU->APB1FZR1, DBGMCU_APB1FZR1_DBG_WWDG_STOP) |
Kojto | 122:f9eeca106725 | 235 | #endif |
Kojto | 122:f9eeca106725 | 236 | |
Kojto | 122:f9eeca106725 | 237 | #if defined(DBGMCU_APB1FZR1_DBG_IWDG_STOP) |
Kojto | 122:f9eeca106725 | 238 | #define __HAL_DBGMCU_FREEZE_IWDG() SET_BIT(DBGMCU->APB1FZR1, DBGMCU_APB1FZR1_DBG_IWDG_STOP) |
Kojto | 122:f9eeca106725 | 239 | #define __HAL_DBGMCU_UNFREEZE_IWDG() CLEAR_BIT(DBGMCU->APB1FZR1, DBGMCU_APB1FZR1_DBG_IWDG_STOP) |
Kojto | 122:f9eeca106725 | 240 | #endif |
Kojto | 122:f9eeca106725 | 241 | |
Kojto | 122:f9eeca106725 | 242 | #if defined(DBGMCU_APB1FZR1_DBG_I2C1_STOP) |
Kojto | 122:f9eeca106725 | 243 | #define __HAL_DBGMCU_FREEZE_I2C1_TIMEOUT() SET_BIT(DBGMCU->APB1FZR1, DBGMCU_APB1FZR1_DBG_I2C1_STOP) |
Kojto | 122:f9eeca106725 | 244 | #define __HAL_DBGMCU_UNFREEZE_I2C1_TIMEOUT() CLEAR_BIT(DBGMCU->APB1FZR1, DBGMCU_APB1FZR1_DBG_I2C1_STOP) |
Kojto | 122:f9eeca106725 | 245 | #endif |
Kojto | 122:f9eeca106725 | 246 | |
Kojto | 122:f9eeca106725 | 247 | #if defined(DBGMCU_APB1FZR1_DBG_I2C2_STOP) |
Kojto | 122:f9eeca106725 | 248 | #define __HAL_DBGMCU_FREEZE_I2C2_TIMEOUT() SET_BIT(DBGMCU->APB1FZR1, DBGMCU_APB1FZR1_DBG_I2C2_STOP) |
Kojto | 122:f9eeca106725 | 249 | #define __HAL_DBGMCU_UNFREEZE_I2C2_TIMEOUT() CLEAR_BIT(DBGMCU->APB1FZR1, DBGMCU_APB1FZR1_DBG_I2C2_STOP) |
Kojto | 122:f9eeca106725 | 250 | #endif |
Kojto | 122:f9eeca106725 | 251 | |
Kojto | 122:f9eeca106725 | 252 | #if defined(DBGMCU_APB1FZR1_DBG_I2C3_STOP) |
Kojto | 122:f9eeca106725 | 253 | #define __HAL_DBGMCU_FREEZE_I2C3_TIMEOUT() SET_BIT(DBGMCU->APB1FZR1, DBGMCU_APB1FZR1_DBG_I2C3_STOP) |
Kojto | 122:f9eeca106725 | 254 | #define __HAL_DBGMCU_UNFREEZE_I2C3_TIMEOUT() CLEAR_BIT(DBGMCU->APB1FZR1, DBGMCU_APB1FZR1_DBG_I2C3_STOP) |
Kojto | 122:f9eeca106725 | 255 | #endif |
Kojto | 122:f9eeca106725 | 256 | |
Kojto | 122:f9eeca106725 | 257 | #if defined(DBGMCU_APB1FZR1_DBG_CAN_STOP) |
Kojto | 122:f9eeca106725 | 258 | #define __HAL_DBGMCU_FREEZE_CAN1() SET_BIT(DBGMCU->APB1FZR1, DBGMCU_APB1FZR1_DBG_CAN_STOP) |
Kojto | 122:f9eeca106725 | 259 | #define __HAL_DBGMCU_UNFREEZE_CAN1() CLEAR_BIT(DBGMCU->APB1FZR1, DBGMCU_APB1FZR1_DBG_CAN_STOP) |
Kojto | 122:f9eeca106725 | 260 | #endif |
Kojto | 122:f9eeca106725 | 261 | |
Kojto | 122:f9eeca106725 | 262 | #if defined(DBGMCU_APB1FZR1_DBG_LPTIM1_STOP) |
Kojto | 122:f9eeca106725 | 263 | #define __HAL_DBGMCU_FREEZE_LPTIM1() SET_BIT(DBGMCU->APB1FZR1, DBGMCU_APB1FZR1_DBG_LPTIM1_STOP) |
Kojto | 122:f9eeca106725 | 264 | #define __HAL_DBGMCU_UNFREEZE_LPTIM1() CLEAR_BIT(DBGMCU->APB1FZR1, DBGMCU_APB1FZR1_DBG_LPTIM1_STOP) |
Kojto | 122:f9eeca106725 | 265 | #endif |
Kojto | 122:f9eeca106725 | 266 | |
Kojto | 122:f9eeca106725 | 267 | #if defined(DBGMCU_APB1FZR2_DBG_LPTIM2_STOP) |
Kojto | 122:f9eeca106725 | 268 | #define __HAL_DBGMCU_FREEZE_LPTIM2() SET_BIT(DBGMCU->APB1FZR2, DBGMCU_APB1FZR2_DBG_LPTIM2_STOP) |
Kojto | 122:f9eeca106725 | 269 | #define __HAL_DBGMCU_UNFREEZE_LPTIM2() CLEAR_BIT(DBGMCU->APB1FZR2, DBGMCU_APB1FZR2_DBG_LPTIM2_STOP) |
Kojto | 122:f9eeca106725 | 270 | #endif |
Kojto | 122:f9eeca106725 | 271 | |
Kojto | 122:f9eeca106725 | 272 | #if defined(DBGMCU_APB2FZ_DBG_TIM1_STOP) |
Kojto | 122:f9eeca106725 | 273 | #define __HAL_DBGMCU_FREEZE_TIM1() SET_BIT(DBGMCU->APB2FZ, DBGMCU_APB2FZ_DBG_TIM1_STOP) |
Kojto | 122:f9eeca106725 | 274 | #define __HAL_DBGMCU_UNFREEZE_TIM1() CLEAR_BIT(DBGMCU->APB2FZ, DBGMCU_APB2FZ_DBG_TIM1_STOP) |
Kojto | 122:f9eeca106725 | 275 | #endif |
Kojto | 122:f9eeca106725 | 276 | |
Kojto | 122:f9eeca106725 | 277 | #if defined(DBGMCU_APB2FZ_DBG_TIM8_STOP) |
Kojto | 122:f9eeca106725 | 278 | #define __HAL_DBGMCU_FREEZE_TIM8() SET_BIT(DBGMCU->APB2FZ, DBGMCU_APB2FZ_DBG_TIM8_STOP) |
Kojto | 122:f9eeca106725 | 279 | #define __HAL_DBGMCU_UNFREEZE_TIM8() CLEAR_BIT(DBGMCU->APB2FZ, DBGMCU_APB2FZ_DBG_TIM8_STOP) |
Kojto | 122:f9eeca106725 | 280 | #endif |
Kojto | 122:f9eeca106725 | 281 | |
Kojto | 122:f9eeca106725 | 282 | #if defined(DBGMCU_APB2FZ_DBG_TIM15_STOP) |
Kojto | 122:f9eeca106725 | 283 | #define __HAL_DBGMCU_FREEZE_TIM15() SET_BIT(DBGMCU->APB2FZ, DBGMCU_APB2FZ_DBG_TIM15_STOP) |
Kojto | 122:f9eeca106725 | 284 | #define __HAL_DBGMCU_UNFREEZE_TIM15() CLEAR_BIT(DBGMCU->APB2FZ, DBGMCU_APB2FZ_DBG_TIM15_STOP) |
Kojto | 122:f9eeca106725 | 285 | #endif |
Kojto | 122:f9eeca106725 | 286 | |
Kojto | 122:f9eeca106725 | 287 | #if defined(DBGMCU_APB2FZ_DBG_TIM16_STOP) |
Kojto | 122:f9eeca106725 | 288 | #define __HAL_DBGMCU_FREEZE_TIM16() SET_BIT(DBGMCU->APB2FZ, DBGMCU_APB2FZ_DBG_TIM16_STOP) |
Kojto | 122:f9eeca106725 | 289 | #define __HAL_DBGMCU_UNFREEZE_TIM16() CLEAR_BIT(DBGMCU->APB2FZ, DBGMCU_APB2FZ_DBG_TIM16_STOP) |
Kojto | 122:f9eeca106725 | 290 | #endif |
Kojto | 122:f9eeca106725 | 291 | |
Kojto | 122:f9eeca106725 | 292 | #if defined(DBGMCU_APB2FZ_DBG_TIM17_STOP) |
Kojto | 122:f9eeca106725 | 293 | #define __HAL_DBGMCU_FREEZE_TIM17() SET_BIT(DBGMCU->APB2FZ, DBGMCU_APB2FZ_DBG_TIM17_STOP) |
Kojto | 122:f9eeca106725 | 294 | #define __HAL_DBGMCU_UNFREEZE_TIM17() CLEAR_BIT(DBGMCU->APB2FZ, DBGMCU_APB2FZ_DBG_TIM17_STOP) |
Kojto | 122:f9eeca106725 | 295 | #endif |
Kojto | 122:f9eeca106725 | 296 | |
Kojto | 122:f9eeca106725 | 297 | /** |
Kojto | 122:f9eeca106725 | 298 | * @} |
Kojto | 122:f9eeca106725 | 299 | */ |
Kojto | 122:f9eeca106725 | 300 | |
Kojto | 122:f9eeca106725 | 301 | /** @defgroup SYSCFG_Exported_Macros SYSCFG Exported Macros |
Kojto | 122:f9eeca106725 | 302 | * @{ |
Kojto | 122:f9eeca106725 | 303 | */ |
Kojto | 122:f9eeca106725 | 304 | |
Kojto | 122:f9eeca106725 | 305 | /** @brief Main Flash memory mapped at 0x00000000. |
Kojto | 122:f9eeca106725 | 306 | */ |
Kojto | 122:f9eeca106725 | 307 | #define __HAL_SYSCFG_REMAPMEMORY_FLASH() CLEAR_BIT(SYSCFG->MEMRMP, SYSCFG_MEMRMP_MEM_MODE) |
Kojto | 122:f9eeca106725 | 308 | |
Kojto | 122:f9eeca106725 | 309 | /** @brief System Flash memory mapped at 0x00000000. |
Kojto | 122:f9eeca106725 | 310 | */ |
Kojto | 122:f9eeca106725 | 311 | #define __HAL_SYSCFG_REMAPMEMORY_SYSTEMFLASH() MODIFY_REG(SYSCFG->MEMRMP, SYSCFG_MEMRMP_MEM_MODE, SYSCFG_MEMRMP_MEM_MODE_0) |
Kojto | 122:f9eeca106725 | 312 | |
Kojto | 122:f9eeca106725 | 313 | /** @brief Embedded SRAM mapped at 0x00000000. |
Kojto | 122:f9eeca106725 | 314 | */ |
Kojto | 122:f9eeca106725 | 315 | #define __HAL_SYSCFG_REMAPMEMORY_SRAM() MODIFY_REG(SYSCFG->MEMRMP, SYSCFG_MEMRMP_MEM_MODE, (SYSCFG_MEMRMP_MEM_MODE_1|SYSCFG_MEMRMP_MEM_MODE_0)) |
Kojto | 122:f9eeca106725 | 316 | |
Kojto | 122:f9eeca106725 | 317 | #if defined (STM32L471xx) || defined (STM32L475xx) || defined (STM32L476xx) || defined (STM32L485xx) || defined (STM32L486xx) |
Kojto | 122:f9eeca106725 | 318 | /** @brief FMC Bank1 (NOR/PSRAM 1 and 2) mapped at 0x00000000. |
Kojto | 122:f9eeca106725 | 319 | */ |
Kojto | 122:f9eeca106725 | 320 | #define __HAL_SYSCFG_REMAPMEMORY_FMC() MODIFY_REG(SYSCFG->MEMRMP, SYSCFG_MEMRMP_MEM_MODE, SYSCFG_MEMRMP_MEM_MODE_1) |
Kojto | 122:f9eeca106725 | 321 | #endif /* STM32L471xx || STM32L475xx || STM32L476xx || STM32L485xx || STM32L486xx */ |
Kojto | 122:f9eeca106725 | 322 | |
Kojto | 122:f9eeca106725 | 323 | /** @brief QUADSPI mapped at 0x00000000. |
Kojto | 122:f9eeca106725 | 324 | */ |
Kojto | 122:f9eeca106725 | 325 | #define __HAL_SYSCFG_REMAPMEMORY_QUADSPI() MODIFY_REG(SYSCFG->MEMRMP, SYSCFG_MEMRMP_MEM_MODE, (SYSCFG_MEMRMP_MEM_MODE_2|SYSCFG_MEMRMP_MEM_MODE_1)) |
Kojto | 122:f9eeca106725 | 326 | |
Kojto | 122:f9eeca106725 | 327 | /** |
Kojto | 122:f9eeca106725 | 328 | * @brief Return the boot mode as configured by user. |
Kojto | 122:f9eeca106725 | 329 | * @retval The boot mode as configured by user. The returned value can be one |
Kojto | 122:f9eeca106725 | 330 | * of the following values: |
Kojto | 122:f9eeca106725 | 331 | * @arg @ref SYSCFG_BOOT_MAINFLASH |
Kojto | 122:f9eeca106725 | 332 | * @arg @ref SYSCFG_BOOT_SYSTEMFLASH |
Kojto | 122:f9eeca106725 | 333 | @if STM32L486xx |
Kojto | 122:f9eeca106725 | 334 | * @arg @ref SYSCFG_BOOT_FMC |
Kojto | 122:f9eeca106725 | 335 | @endif |
Kojto | 122:f9eeca106725 | 336 | * @arg @ref SYSCFG_BOOT_SRAM |
Kojto | 122:f9eeca106725 | 337 | * @arg @ref SYSCFG_BOOT_QUADSPI |
Kojto | 122:f9eeca106725 | 338 | */ |
Kojto | 122:f9eeca106725 | 339 | #define __HAL_SYSCFG_GET_BOOT_MODE() READ_BIT(SYSCFG->MEMRMP, SYSCFG_MEMRMP_MEM_MODE) |
Kojto | 122:f9eeca106725 | 340 | |
Kojto | 122:f9eeca106725 | 341 | /** @brief SRAM2 page write protection enable macro |
Kojto | 122:f9eeca106725 | 342 | * @param __SRAM2WRP__: This parameter can be a value of @ref SYSCFG_SRAM2WRP |
Kojto | 122:f9eeca106725 | 343 | * @note write protection can only be disabled by a system reset |
Kojto | 122:f9eeca106725 | 344 | */ |
Kojto | 122:f9eeca106725 | 345 | #define __HAL_SYSCFG_SRAM2_WRP_ENABLE(__SRAM2WRP__) do {assert_param(IS_SYSCFG_SRAM2WRP_PAGE((__SRAM2WRP__)));\ |
Kojto | 122:f9eeca106725 | 346 | SET_BIT(SYSCFG->SWPR, (__SRAM2WRP__));\ |
Kojto | 122:f9eeca106725 | 347 | }while(0) |
Kojto | 122:f9eeca106725 | 348 | |
Kojto | 122:f9eeca106725 | 349 | /** @brief SRAM2 page write protection unlock prior to erase |
Kojto | 122:f9eeca106725 | 350 | * @note Writing a wrong key reactivates the write protection |
Kojto | 122:f9eeca106725 | 351 | */ |
Kojto | 122:f9eeca106725 | 352 | #define __HAL_SYSCFG_SRAM2_WRP_UNLOCK() do {SYSCFG->SKR = 0xCA;\ |
Kojto | 122:f9eeca106725 | 353 | SYSCFG->SKR = 0x53;\ |
Kojto | 122:f9eeca106725 | 354 | }while(0) |
Kojto | 122:f9eeca106725 | 355 | |
Kojto | 122:f9eeca106725 | 356 | /** @brief SRAM2 erase |
Kojto | 122:f9eeca106725 | 357 | * @note __SYSCFG_GET_FLAG(SYSCFG_FLAG_SRAM2_BUSY) may be used to check end of erase |
Kojto | 122:f9eeca106725 | 358 | */ |
Kojto | 122:f9eeca106725 | 359 | #define __HAL_SYSCFG_SRAM2_ERASE() SET_BIT(SYSCFG->SCSR, SYSCFG_SCSR_SRAM2ER) |
Kojto | 122:f9eeca106725 | 360 | |
Kojto | 122:f9eeca106725 | 361 | /** @brief Floating Point Unit interrupt enable/disable macros |
Kojto | 122:f9eeca106725 | 362 | * @param __INTERRUPT__: This parameter can be a value of @ref SYSCFG_FPU_Interrupts |
Kojto | 122:f9eeca106725 | 363 | */ |
Kojto | 122:f9eeca106725 | 364 | #define __HAL_SYSCFG_FPU_INTERRUPT_ENABLE(__INTERRUPT__) do {assert_param(IS_SYSCFG_FPU_INTERRUPT((__INTERRUPT__)));\ |
Kojto | 122:f9eeca106725 | 365 | SET_BIT(SYSCFG->CFGR1, (__INTERRUPT__));\ |
Kojto | 122:f9eeca106725 | 366 | }while(0) |
Kojto | 122:f9eeca106725 | 367 | |
Kojto | 122:f9eeca106725 | 368 | #define __HAL_SYSCFG_FPU_INTERRUPT_DISABLE(__INTERRUPT__) do {assert_param(IS_SYSCFG_FPU_INTERRUPT((__INTERRUPT__)));\ |
Kojto | 122:f9eeca106725 | 369 | CLEAR_BIT(SYSCFG->CFGR1, (__INTERRUPT__));\ |
Kojto | 122:f9eeca106725 | 370 | }while(0) |
Kojto | 122:f9eeca106725 | 371 | |
Kojto | 122:f9eeca106725 | 372 | /** @brief SYSCFG Break ECC lock. |
Kojto | 122:f9eeca106725 | 373 | * Enable and lock the connection of Flash ECC error connection to TIM1/8/15/16/17 Break input. |
Kojto | 122:f9eeca106725 | 374 | * @note The selected configuration is locked and can be unlocked only by system reset. |
Kojto | 122:f9eeca106725 | 375 | */ |
Kojto | 122:f9eeca106725 | 376 | #define __HAL_SYSCFG_BREAK_ECC_LOCK() SET_BIT(SYSCFG->CFGR2, SYSCFG_CFGR2_ECCL) |
Kojto | 122:f9eeca106725 | 377 | |
Kojto | 122:f9eeca106725 | 378 | /** @brief SYSCFG Break Cortex-M4 Lockup lock. |
Kojto | 122:f9eeca106725 | 379 | * Enable and lock the connection of Cortex-M4 LOCKUP (Hardfault) output to TIM1/8/15/16/17 Break input. |
Kojto | 122:f9eeca106725 | 380 | * @note The selected configuration is locked and can be unlocked only by system reset. |
Kojto | 122:f9eeca106725 | 381 | */ |
Kojto | 122:f9eeca106725 | 382 | #define __HAL_SYSCFG_BREAK_LOCKUP_LOCK() SET_BIT(SYSCFG->CFGR2, SYSCFG_CFGR2_CLL) |
Kojto | 122:f9eeca106725 | 383 | |
Kojto | 122:f9eeca106725 | 384 | /** @brief SYSCFG Break PVD lock. |
Kojto | 122:f9eeca106725 | 385 | * Enable and lock the PVD connection to Timer1/8/15/16/17 Break input, as well as the PVDE and PLS[2:0] in the PWR_CR2 register. |
Kojto | 122:f9eeca106725 | 386 | * @note The selected configuration is locked and can be unlocked only by system reset. |
Kojto | 122:f9eeca106725 | 387 | */ |
Kojto | 122:f9eeca106725 | 388 | #define __HAL_SYSCFG_BREAK_PVD_LOCK() SET_BIT(SYSCFG->CFGR2, SYSCFG_CFGR2_PVDL) |
Kojto | 122:f9eeca106725 | 389 | |
Kojto | 122:f9eeca106725 | 390 | /** @brief SYSCFG Break SRAM2 parity lock. |
Kojto | 122:f9eeca106725 | 391 | * Enable and lock the SRAM2 parity error signal connection to TIM1/8/15/16/17 Break input. |
Kojto | 122:f9eeca106725 | 392 | * @note The selected configuration is locked and can be unlocked by system reset. |
Kojto | 122:f9eeca106725 | 393 | */ |
Kojto | 122:f9eeca106725 | 394 | #define __HAL_SYSCFG_BREAK_SRAM2PARITY_LOCK() SET_BIT(SYSCFG->CFGR2, SYSCFG_CFGR2_SPL) |
Kojto | 122:f9eeca106725 | 395 | |
Kojto | 122:f9eeca106725 | 396 | /** @brief Check SYSCFG flag is set or not. |
Kojto | 122:f9eeca106725 | 397 | * @param __FLAG__: specifies the flag to check. |
Kojto | 122:f9eeca106725 | 398 | * This parameter can be one of the following values: |
Kojto | 122:f9eeca106725 | 399 | * @arg @ref SYSCFG_FLAG_SRAM2_PE SRAM2 Parity Error Flag |
Kojto | 122:f9eeca106725 | 400 | * @arg @ref SYSCFG_FLAG_SRAM2_BUSY SRAM2 Erase Ongoing |
Kojto | 122:f9eeca106725 | 401 | * @retval The new state of __FLAG__ (TRUE or FALSE). |
Kojto | 122:f9eeca106725 | 402 | */ |
Kojto | 122:f9eeca106725 | 403 | #define __HAL_SYSCFG_GET_FLAG(__FLAG__) ((((((__FLAG__) == SYSCFG_SCSR_SRAM2BSY)? SYSCFG->SCSR : SYSCFG->CFGR2) & (__FLAG__))!= 0) ? 1 : 0) |
Kojto | 122:f9eeca106725 | 404 | |
Kojto | 122:f9eeca106725 | 405 | /** @brief Set the SPF bit to clear the SRAM Parity Error Flag. |
Kojto | 122:f9eeca106725 | 406 | */ |
Kojto | 122:f9eeca106725 | 407 | #define __HAL_SYSCFG_CLEAR_FLAG() SET_BIT(SYSCFG->CFGR2, SYSCFG_CFGR2_SPF) |
Kojto | 122:f9eeca106725 | 408 | |
Kojto | 122:f9eeca106725 | 409 | /** @brief Fast-mode Plus driving capability enable/disable macros |
Kojto | 122:f9eeca106725 | 410 | * @param __FASTMODEPLUS__: This parameter can be a value of : |
Kojto | 122:f9eeca106725 | 411 | * @arg @ref SYSCFG_FASTMODEPLUS_PB6 Fast-mode Plus driving capability activation on PB6 |
Kojto | 122:f9eeca106725 | 412 | * @arg @ref SYSCFG_FASTMODEPLUS_PB7 Fast-mode Plus driving capability activation on PB7 |
Kojto | 122:f9eeca106725 | 413 | * @arg @ref SYSCFG_FASTMODEPLUS_PB8 Fast-mode Plus driving capability activation on PB8 |
Kojto | 122:f9eeca106725 | 414 | * @arg @ref SYSCFG_FASTMODEPLUS_PB9 Fast-mode Plus driving capability activation on PB9 |
Kojto | 122:f9eeca106725 | 415 | */ |
Kojto | 122:f9eeca106725 | 416 | #define __HAL_SYSCFG_FASTMODEPLUS_ENABLE(__FASTMODEPLUS__) do {assert_param(IS_SYSCFG_FASTMODEPLUS((__FASTMODEPLUS__)));\ |
Kojto | 122:f9eeca106725 | 417 | SET_BIT(SYSCFG->CFGR1, (__FASTMODEPLUS__));\ |
Kojto | 122:f9eeca106725 | 418 | }while(0) |
Kojto | 122:f9eeca106725 | 419 | |
Kojto | 122:f9eeca106725 | 420 | #define __HAL_SYSCFG_FASTMODEPLUS_DISABLE(__FASTMODEPLUS__) do {assert_param(IS_SYSCFG_FASTMODEPLUS((__FASTMODEPLUS__)));\ |
Kojto | 122:f9eeca106725 | 421 | CLEAR_BIT(SYSCFG->CFGR1, (__FASTMODEPLUS__));\ |
Kojto | 122:f9eeca106725 | 422 | }while(0) |
Kojto | 122:f9eeca106725 | 423 | |
Kojto | 122:f9eeca106725 | 424 | /** |
Kojto | 122:f9eeca106725 | 425 | * @} |
Kojto | 122:f9eeca106725 | 426 | */ |
Kojto | 122:f9eeca106725 | 427 | |
Kojto | 122:f9eeca106725 | 428 | /* Private macros ------------------------------------------------------------*/ |
Kojto | 122:f9eeca106725 | 429 | /** @defgroup SYSCFG_Private_Macros SYSCFG Private Macros |
Kojto | 122:f9eeca106725 | 430 | * @{ |
Kojto | 122:f9eeca106725 | 431 | */ |
Kojto | 122:f9eeca106725 | 432 | |
Kojto | 122:f9eeca106725 | 433 | #define IS_SYSCFG_FPU_INTERRUPT(__INTERRUPT__) ((((__INTERRUPT__) & SYSCFG_IT_FPU_IOC) == SYSCFG_IT_FPU_IOC) || \ |
Kojto | 122:f9eeca106725 | 434 | (((__INTERRUPT__) & SYSCFG_IT_FPU_DZC) == SYSCFG_IT_FPU_DZC) || \ |
Kojto | 122:f9eeca106725 | 435 | (((__INTERRUPT__) & SYSCFG_IT_FPU_UFC) == SYSCFG_IT_FPU_UFC) || \ |
Kojto | 122:f9eeca106725 | 436 | (((__INTERRUPT__) & SYSCFG_IT_FPU_OFC) == SYSCFG_IT_FPU_OFC) || \ |
Kojto | 122:f9eeca106725 | 437 | (((__INTERRUPT__) & SYSCFG_IT_FPU_IDC) == SYSCFG_IT_FPU_IDC) || \ |
Kojto | 122:f9eeca106725 | 438 | (((__INTERRUPT__) & SYSCFG_IT_FPU_IXC) == SYSCFG_IT_FPU_IXC)) |
Kojto | 122:f9eeca106725 | 439 | |
Kojto | 122:f9eeca106725 | 440 | #define IS_SYSCFG_BREAK_CONFIG(__CONFIG__) (((__CONFIG__) == SYSCFG_BREAK_ECC) || \ |
Kojto | 122:f9eeca106725 | 441 | ((__CONFIG__) == SYSCFG_BREAK_PVD) || \ |
Kojto | 122:f9eeca106725 | 442 | ((__CONFIG__) == SYSCFG_BREAK_SRAM2_PARITY) || \ |
Kojto | 122:f9eeca106725 | 443 | ((__CONFIG__) == SYSCFG_BREAK_LOCKUP)) |
Kojto | 122:f9eeca106725 | 444 | |
Kojto | 122:f9eeca106725 | 445 | #define IS_SYSCFG_SRAM2WRP_PAGE(__PAGE__) (((__PAGE__) > 0) && ((__PAGE__) <= 0xFFFFFFFF)) |
Kojto | 122:f9eeca106725 | 446 | |
Kojto | 122:f9eeca106725 | 447 | #if defined(VREFBUF) |
Kojto | 122:f9eeca106725 | 448 | #define IS_SYSCFG_VREFBUF_VOLTAGE_SCALE(__SCALE__) (((__SCALE__) == SYSCFG_VREFBUF_VOLTAGE_SCALE0) || \ |
Kojto | 122:f9eeca106725 | 449 | ((__SCALE__) == SYSCFG_VREFBUF_VOLTAGE_SCALE1)) |
Kojto | 122:f9eeca106725 | 450 | |
Kojto | 122:f9eeca106725 | 451 | #define IS_SYSCFG_VREFBUF_HIGH_IMPEDANCE(__VALUE__) (((__VALUE__) == SYSCFG_VREFBUF_HIGH_IMPEDANCE_DISABLE) || \ |
Kojto | 122:f9eeca106725 | 452 | ((__VALUE__) == SYSCFG_VREFBUF_HIGH_IMPEDANCE_ENABLE)) |
Kojto | 122:f9eeca106725 | 453 | |
Kojto | 122:f9eeca106725 | 454 | #define IS_SYSCFG_VREFBUF_TRIMMING(__VALUE__) (((__VALUE__) > 0) && ((__VALUE__) <= VREFBUF_CCR_TRIM)) |
Kojto | 122:f9eeca106725 | 455 | #endif /* VREFBUF */ |
Kojto | 122:f9eeca106725 | 456 | |
Kojto | 122:f9eeca106725 | 457 | #if defined(SYSCFG_FASTMODEPLUS_PB8) && defined(SYSCFG_FASTMODEPLUS_PB9) |
Kojto | 122:f9eeca106725 | 458 | #define IS_SYSCFG_FASTMODEPLUS(__PIN__) ((((__PIN__) & SYSCFG_FASTMODEPLUS_PB6) == SYSCFG_FASTMODEPLUS_PB6) || \ |
Kojto | 122:f9eeca106725 | 459 | (((__PIN__) & SYSCFG_FASTMODEPLUS_PB7) == SYSCFG_FASTMODEPLUS_PB7) || \ |
Kojto | 122:f9eeca106725 | 460 | (((__PIN__) & SYSCFG_FASTMODEPLUS_PB8) == SYSCFG_FASTMODEPLUS_PB8) || \ |
Kojto | 122:f9eeca106725 | 461 | (((__PIN__) & SYSCFG_FASTMODEPLUS_PB9) == SYSCFG_FASTMODEPLUS_PB9)) |
Kojto | 122:f9eeca106725 | 462 | #elif defined(SYSCFG_FASTMODEPLUS_PB8) |
Kojto | 122:f9eeca106725 | 463 | #define IS_SYSCFG_FASTMODEPLUS(__PIN__) ((((__PIN__) & SYSCFG_FASTMODEPLUS_PB6) == SYSCFG_FASTMODEPLUS_PB6) || \ |
Kojto | 122:f9eeca106725 | 464 | (((__PIN__) & SYSCFG_FASTMODEPLUS_PB7) == SYSCFG_FASTMODEPLUS_PB7) || \ |
Kojto | 122:f9eeca106725 | 465 | (((__PIN__) & SYSCFG_FASTMODEPLUS_PB8) == SYSCFG_FASTMODEPLUS_PB8)) |
Kojto | 122:f9eeca106725 | 466 | #elif defined(SYSCFG_FASTMODEPLUS_PB9) |
Kojto | 122:f9eeca106725 | 467 | #define IS_SYSCFG_FASTMODEPLUS(__PIN__) ((((__PIN__) & SYSCFG_FASTMODEPLUS_PB6) == SYSCFG_FASTMODEPLUS_PB6) || \ |
Kojto | 122:f9eeca106725 | 468 | (((__PIN__) & SYSCFG_FASTMODEPLUS_PB7) == SYSCFG_FASTMODEPLUS_PB7) || \ |
Kojto | 122:f9eeca106725 | 469 | (((__PIN__) & SYSCFG_FASTMODEPLUS_PB9) == SYSCFG_FASTMODEPLUS_PB9)) |
Kojto | 122:f9eeca106725 | 470 | #else |
Kojto | 122:f9eeca106725 | 471 | #define IS_SYSCFG_FASTMODEPLUS(__PIN__) ((((__PIN__) & SYSCFG_FASTMODEPLUS_PB6) == SYSCFG_FASTMODEPLUS_PB6) || \ |
Kojto | 122:f9eeca106725 | 472 | (((__PIN__) & SYSCFG_FASTMODEPLUS_PB7) == SYSCFG_FASTMODEPLUS_PB7)) |
Kojto | 122:f9eeca106725 | 473 | #endif |
Kojto | 122:f9eeca106725 | 474 | /** |
Kojto | 122:f9eeca106725 | 475 | * @} |
Kojto | 122:f9eeca106725 | 476 | */ |
Kojto | 122:f9eeca106725 | 477 | |
Kojto | 122:f9eeca106725 | 478 | /* Exported functions --------------------------------------------------------*/ |
Kojto | 122:f9eeca106725 | 479 | |
Kojto | 122:f9eeca106725 | 480 | /** @addtogroup HAL_Exported_Functions |
Kojto | 122:f9eeca106725 | 481 | * @{ |
Kojto | 122:f9eeca106725 | 482 | */ |
Kojto | 122:f9eeca106725 | 483 | |
Kojto | 122:f9eeca106725 | 484 | /** @addtogroup HAL_Exported_Functions_Group1 |
Kojto | 122:f9eeca106725 | 485 | * @{ |
Kojto | 122:f9eeca106725 | 486 | */ |
Kojto | 122:f9eeca106725 | 487 | |
Kojto | 122:f9eeca106725 | 488 | /* Initialization and de-initialization functions ******************************/ |
Kojto | 122:f9eeca106725 | 489 | HAL_StatusTypeDef HAL_Init(void); |
Kojto | 122:f9eeca106725 | 490 | HAL_StatusTypeDef HAL_DeInit(void); |
Kojto | 122:f9eeca106725 | 491 | void HAL_MspInit(void); |
Kojto | 122:f9eeca106725 | 492 | void HAL_MspDeInit(void); |
Kojto | 122:f9eeca106725 | 493 | HAL_StatusTypeDef HAL_InitTick (uint32_t TickPriority); |
Kojto | 122:f9eeca106725 | 494 | |
Kojto | 122:f9eeca106725 | 495 | /** |
Kojto | 122:f9eeca106725 | 496 | * @} |
Kojto | 122:f9eeca106725 | 497 | */ |
Kojto | 122:f9eeca106725 | 498 | |
Kojto | 122:f9eeca106725 | 499 | /** @addtogroup HAL_Exported_Functions_Group2 |
Kojto | 122:f9eeca106725 | 500 | * @{ |
Kojto | 122:f9eeca106725 | 501 | */ |
Kojto | 122:f9eeca106725 | 502 | |
Kojto | 122:f9eeca106725 | 503 | /* Peripheral Control functions ************************************************/ |
Kojto | 122:f9eeca106725 | 504 | void HAL_IncTick(void); |
Kojto | 122:f9eeca106725 | 505 | void HAL_Delay(uint32_t Delay); |
Kojto | 122:f9eeca106725 | 506 | uint32_t HAL_GetTick(void); |
Kojto | 122:f9eeca106725 | 507 | void HAL_SuspendTick(void); |
Kojto | 122:f9eeca106725 | 508 | void HAL_ResumeTick(void); |
Kojto | 122:f9eeca106725 | 509 | uint32_t HAL_GetHalVersion(void); |
Kojto | 122:f9eeca106725 | 510 | uint32_t HAL_GetREVID(void); |
Kojto | 122:f9eeca106725 | 511 | uint32_t HAL_GetDEVID(void); |
Kojto | 122:f9eeca106725 | 512 | |
Kojto | 122:f9eeca106725 | 513 | /** |
Kojto | 122:f9eeca106725 | 514 | * @} |
Kojto | 122:f9eeca106725 | 515 | */ |
Kojto | 122:f9eeca106725 | 516 | |
Kojto | 122:f9eeca106725 | 517 | /** @addtogroup HAL_Exported_Functions_Group3 |
Kojto | 122:f9eeca106725 | 518 | * @{ |
Kojto | 122:f9eeca106725 | 519 | */ |
Kojto | 122:f9eeca106725 | 520 | |
Kojto | 122:f9eeca106725 | 521 | /* DBGMCU Peripheral Control functions *****************************************/ |
Kojto | 122:f9eeca106725 | 522 | void HAL_DBGMCU_EnableDBGSleepMode(void); |
Kojto | 122:f9eeca106725 | 523 | void HAL_DBGMCU_DisableDBGSleepMode(void); |
Kojto | 122:f9eeca106725 | 524 | void HAL_DBGMCU_EnableDBGStopMode(void); |
Kojto | 122:f9eeca106725 | 525 | void HAL_DBGMCU_DisableDBGStopMode(void); |
Kojto | 122:f9eeca106725 | 526 | void HAL_DBGMCU_EnableDBGStandbyMode(void); |
Kojto | 122:f9eeca106725 | 527 | void HAL_DBGMCU_DisableDBGStandbyMode(void); |
Kojto | 122:f9eeca106725 | 528 | |
Kojto | 122:f9eeca106725 | 529 | /** |
Kojto | 122:f9eeca106725 | 530 | * @} |
Kojto | 122:f9eeca106725 | 531 | */ |
Kojto | 122:f9eeca106725 | 532 | |
Kojto | 122:f9eeca106725 | 533 | /** @addtogroup HAL_Exported_Functions_Group4 |
Kojto | 122:f9eeca106725 | 534 | * @{ |
Kojto | 122:f9eeca106725 | 535 | */ |
Kojto | 122:f9eeca106725 | 536 | |
Kojto | 122:f9eeca106725 | 537 | /* SYSCFG Control functions ****************************************************/ |
Kojto | 122:f9eeca106725 | 538 | void HAL_SYSCFG_SRAM2Erase(void); |
Kojto | 122:f9eeca106725 | 539 | void HAL_SYSCFG_EnableMemorySwappingBank(void); |
Kojto | 122:f9eeca106725 | 540 | void HAL_SYSCFG_DisableMemorySwappingBank(void); |
Kojto | 122:f9eeca106725 | 541 | |
Kojto | 122:f9eeca106725 | 542 | #if defined(VREFBUF) |
Kojto | 122:f9eeca106725 | 543 | void HAL_SYSCFG_VREFBUF_VoltageScalingConfig(uint32_t VoltageScaling); |
Kojto | 122:f9eeca106725 | 544 | void HAL_SYSCFG_VREFBUF_HighImpedanceConfig(uint32_t Mode); |
Kojto | 122:f9eeca106725 | 545 | void HAL_SYSCFG_VREFBUF_TrimmingConfig(uint32_t TrimmingValue); |
Kojto | 122:f9eeca106725 | 546 | HAL_StatusTypeDef HAL_SYSCFG_EnableVREFBUF(void); |
Kojto | 122:f9eeca106725 | 547 | void HAL_SYSCFG_DisableVREFBUF(void); |
Kojto | 122:f9eeca106725 | 548 | #endif /* VREFBUF */ |
Kojto | 122:f9eeca106725 | 549 | |
Kojto | 122:f9eeca106725 | 550 | void HAL_SYSCFG_EnableIOAnalogSwitchBooster(void); |
Kojto | 122:f9eeca106725 | 551 | void HAL_SYSCFG_DisableIOAnalogSwitchBooster(void); |
Kojto | 122:f9eeca106725 | 552 | |
Kojto | 122:f9eeca106725 | 553 | /** |
Kojto | 122:f9eeca106725 | 554 | * @} |
Kojto | 122:f9eeca106725 | 555 | */ |
Kojto | 122:f9eeca106725 | 556 | |
Kojto | 122:f9eeca106725 | 557 | /** |
Kojto | 122:f9eeca106725 | 558 | * @} |
Kojto | 122:f9eeca106725 | 559 | */ |
Kojto | 122:f9eeca106725 | 560 | |
Kojto | 122:f9eeca106725 | 561 | /** |
Kojto | 122:f9eeca106725 | 562 | * @} |
Kojto | 122:f9eeca106725 | 563 | */ |
Kojto | 122:f9eeca106725 | 564 | |
Kojto | 122:f9eeca106725 | 565 | /** |
Kojto | 122:f9eeca106725 | 566 | * @} |
Kojto | 122:f9eeca106725 | 567 | */ |
Kojto | 122:f9eeca106725 | 568 | |
Kojto | 122:f9eeca106725 | 569 | #ifdef __cplusplus |
Kojto | 122:f9eeca106725 | 570 | } |
Kojto | 122:f9eeca106725 | 571 | #endif |
Kojto | 122:f9eeca106725 | 572 | |
Kojto | 122:f9eeca106725 | 573 | #endif /* __STM32L4xx_HAL_H */ |
Kojto | 122:f9eeca106725 | 574 | |
Kojto | 122:f9eeca106725 | 575 | /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ |