|
STM32F439xx HAL User Manual
|
00001 /** 00002 ****************************************************************************** 00003 * @file stm32f4xx_ll_system.h 00004 * @author MCD Application Team 00005 * @brief Header file of SYSTEM LL module. 00006 @verbatim 00007 ============================================================================== 00008 ##### How to use this driver ##### 00009 ============================================================================== 00010 [..] 00011 The LL SYSTEM driver contains a set of generic APIs that can be 00012 used by user: 00013 (+) Some of the FLASH features need to be handled in the SYSTEM file. 00014 (+) Access to DBGCMU registers 00015 (+) Access to SYSCFG registers 00016 00017 @endverbatim 00018 ****************************************************************************** 00019 * @attention 00020 * 00021 * <h2><center>© COPYRIGHT(c) 2017 STMicroelectronics</center></h2> 00022 * 00023 * Redistribution and use in source and binary forms, with or without modification, 00024 * are permitted provided that the following conditions are met: 00025 * 1. Redistributions of source code must retain the above copyright notice, 00026 * this list of conditions and the following disclaimer. 00027 * 2. Redistributions in binary form must reproduce the above copyright notice, 00028 * this list of conditions and the following disclaimer in the documentation 00029 * and/or other materials provided with the distribution. 00030 * 3. Neither the name of STMicroelectronics nor the names of its contributors 00031 * may be used to endorse or promote products derived from this software 00032 * without specific prior written permission. 00033 * 00034 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 00035 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 00036 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 00037 * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE 00038 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 00039 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 00040 * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 00041 * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 00042 * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 00043 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 00044 * 00045 ****************************************************************************** 00046 */ 00047 00048 /* Define to prevent recursive inclusion -------------------------------------*/ 00049 #ifndef __STM32F4xx_LL_SYSTEM_H 00050 #define __STM32F4xx_LL_SYSTEM_H 00051 00052 #ifdef __cplusplus 00053 extern "C" { 00054 #endif 00055 00056 /* Includes ------------------------------------------------------------------*/ 00057 #include "stm32f4xx.h" 00058 00059 /** @addtogroup STM32F4xx_LL_Driver 00060 * @{ 00061 */ 00062 00063 #if defined (FLASH) || defined (SYSCFG) || defined (DBGMCU) 00064 00065 /** @defgroup SYSTEM_LL SYSTEM 00066 * @{ 00067 */ 00068 00069 /* Private types -------------------------------------------------------------*/ 00070 /* Private variables ---------------------------------------------------------*/ 00071 00072 /* Private constants ---------------------------------------------------------*/ 00073 /** @defgroup SYSTEM_LL_Private_Constants SYSTEM Private Constants 00074 * @{ 00075 */ 00076 00077 /** 00078 * @} 00079 */ 00080 00081 /* Private macros ------------------------------------------------------------*/ 00082 00083 /* Exported types ------------------------------------------------------------*/ 00084 /* Exported constants --------------------------------------------------------*/ 00085 /** @defgroup SYSTEM_LL_Exported_Constants SYSTEM Exported Constants 00086 * @{ 00087 */ 00088 00089 /** @defgroup SYSTEM_LL_EC_REMAP SYSCFG REMAP 00090 * @{ 00091 */ 00092 #define LL_SYSCFG_REMAP_FLASH (uint32_t)0x00000000 /*!< Main Flash memory mapped at 0x00000000 */ 00093 #define LL_SYSCFG_REMAP_SYSTEMFLASH SYSCFG_MEMRMP_MEM_MODE_0 /*!< System Flash memory mapped at 0x00000000 */ 00094 #if defined(FSMC_Bank1) 00095 #define LL_SYSCFG_REMAP_FSMC SYSCFG_MEMRMP_MEM_MODE_1 /*!< FSMC(NOR/PSRAM 1 and 2) mapped at 0x00000000 */ 00096 #endif /* FSMC_Bank1 */ 00097 #if defined(FMC_Bank1) 00098 #define LL_SYSCFG_REMAP_FMC SYSCFG_MEMRMP_MEM_MODE_1 /*!< FMC(NOR/PSRAM 1 and 2) mapped at 0x00000000 */ 00099 #define LL_SYSCFG_REMAP_SDRAM SYSCFG_MEMRMP_MEM_MODE_2 /*!< FMC/SDRAM mapped at 0x00000000 */ 00100 #endif /* FMC_Bank1 */ 00101 #define LL_SYSCFG_REMAP_SRAM (SYSCFG_MEMRMP_MEM_MODE_1 | SYSCFG_MEMRMP_MEM_MODE_0) /*!< SRAM1 mapped at 0x00000000 */ 00102 00103 /** 00104 * @} 00105 */ 00106 00107 #if defined(SYSCFG_PMC_MII_RMII_SEL) 00108 /** @defgroup SYSTEM_LL_EC_PMC SYSCFG PMC 00109 * @{ 00110 */ 00111 #define LL_SYSCFG_PMC_ETHMII (uint32_t)0x00000000 /*!< ETH Media MII interface */ 00112 #define LL_SYSCFG_PMC_ETHRMII (uint32_t)SYSCFG_PMC_MII_RMII_SEL /*!< ETH Media RMII interface */ 00113 00114 /** 00115 * @} 00116 */ 00117 #endif /* SYSCFG_PMC_MII_RMII_SEL */ 00118 00119 00120 00121 #if defined(SYSCFG_MEMRMP_UFB_MODE) 00122 /** @defgroup SYSTEM_LL_EC_BANKMODE SYSCFG BANK MODE 00123 * @{ 00124 */ 00125 #define LL_SYSCFG_BANKMODE_BANK1 (uint32_t)0x00000000 /*!< Flash Bank 1 base address mapped at 0x0800 0000 (AXI) and 0x0020 0000 (TCM) 00126 and Flash Bank 2 base address mapped at 0x0810 0000 (AXI) and 0x0030 0000 (TCM)*/ 00127 #define LL_SYSCFG_BANKMODE_BANK2 SYSCFG_MEMRMP_UFB_MODE /*!< Flash Bank 2 base address mapped at 0x0800 0000 (AXI) and 0x0020 0000(TCM) 00128 and Flash Bank 1 base address mapped at 0x0810 0000 (AXI) and 0x0030 0000(TCM) */ 00129 /** 00130 * @} 00131 */ 00132 #endif /* SYSCFG_MEMRMP_UFB_MODE */ 00133 /** @defgroup SYSTEM_LL_EC_I2C_FASTMODEPLUS SYSCFG I2C FASTMODEPLUS 00134 * @{ 00135 */ 00136 #if defined(SYSCFG_CFGR_FMPI2C1_SCL) 00137 #define LL_SYSCFG_I2C_FASTMODEPLUS_SCL SYSCFG_CFGR_FMPI2C1_SCL /*!< Enable Fast Mode Plus on FMPI2C_SCL pin */ 00138 #define LL_SYSCFG_I2C_FASTMODEPLUS_SDA SYSCFG_CFGR_FMPI2C1_SDA /*!< Enable Fast Mode Plus on FMPI2C_SDA pin*/ 00139 #endif /* SYSCFG_CFGR_FMPI2C1_SCL */ 00140 /** 00141 * @} 00142 */ 00143 00144 /** @defgroup SYSTEM_LL_EC_EXTI_PORT SYSCFG EXTI PORT 00145 * @{ 00146 */ 00147 #define LL_SYSCFG_EXTI_PORTA (uint32_t)0 /*!< EXTI PORT A */ 00148 #define LL_SYSCFG_EXTI_PORTB (uint32_t)1 /*!< EXTI PORT B */ 00149 #define LL_SYSCFG_EXTI_PORTC (uint32_t)2 /*!< EXTI PORT C */ 00150 #define LL_SYSCFG_EXTI_PORTD (uint32_t)3 /*!< EXTI PORT D */ 00151 #define LL_SYSCFG_EXTI_PORTE (uint32_t)4 /*!< EXTI PORT E */ 00152 #if defined(GPIOF) 00153 #define LL_SYSCFG_EXTI_PORTF (uint32_t)5 /*!< EXTI PORT F */ 00154 #endif /* GPIOF */ 00155 #if defined(GPIOG) 00156 #define LL_SYSCFG_EXTI_PORTG (uint32_t)6 /*!< EXTI PORT G */ 00157 #endif /* GPIOG */ 00158 #define LL_SYSCFG_EXTI_PORTH (uint32_t)7 /*!< EXTI PORT H */ 00159 #if defined(GPIOI) 00160 #define LL_SYSCFG_EXTI_PORTI (uint32_t)8 /*!< EXTI PORT I */ 00161 #endif /* GPIOI */ 00162 #if defined(GPIOJ) 00163 #define LL_SYSCFG_EXTI_PORTJ (uint32_t)9 /*!< EXTI PORT J */ 00164 #endif /* GPIOJ */ 00165 #if defined(GPIOK) 00166 #define LL_SYSCFG_EXTI_PORTK (uint32_t)10 /*!< EXTI PORT k */ 00167 #endif /* GPIOK */ 00168 /** 00169 * @} 00170 */ 00171 00172 /** @defgroup SYSTEM_LL_EC_EXTI_LINE SYSCFG EXTI LINE 00173 * @{ 00174 */ 00175 #define LL_SYSCFG_EXTI_LINE0 (uint32_t)(0x000FU << 16 | 0) /*!< EXTI_POSITION_0 | EXTICR[0] */ 00176 #define LL_SYSCFG_EXTI_LINE1 (uint32_t)(0x00F0U << 16 | 0) /*!< EXTI_POSITION_4 | EXTICR[0] */ 00177 #define LL_SYSCFG_EXTI_LINE2 (uint32_t)(0x0F00U << 16 | 0) /*!< EXTI_POSITION_8 | EXTICR[0] */ 00178 #define LL_SYSCFG_EXTI_LINE3 (uint32_t)(0xF000U << 16 | 0) /*!< EXTI_POSITION_12 | EXTICR[0] */ 00179 #define LL_SYSCFG_EXTI_LINE4 (uint32_t)(0x000FU << 16 | 1) /*!< EXTI_POSITION_0 | EXTICR[1] */ 00180 #define LL_SYSCFG_EXTI_LINE5 (uint32_t)(0x00F0U << 16 | 1) /*!< EXTI_POSITION_4 | EXTICR[1] */ 00181 #define LL_SYSCFG_EXTI_LINE6 (uint32_t)(0x0F00U << 16 | 1) /*!< EXTI_POSITION_8 | EXTICR[1] */ 00182 #define LL_SYSCFG_EXTI_LINE7 (uint32_t)(0xF000U << 16 | 1) /*!< EXTI_POSITION_12 | EXTICR[1] */ 00183 #define LL_SYSCFG_EXTI_LINE8 (uint32_t)(0x000FU << 16 | 2) /*!< EXTI_POSITION_0 | EXTICR[2] */ 00184 #define LL_SYSCFG_EXTI_LINE9 (uint32_t)(0x00F0U << 16 | 2) /*!< EXTI_POSITION_4 | EXTICR[2] */ 00185 #define LL_SYSCFG_EXTI_LINE10 (uint32_t)(0x0F00U << 16 | 2) /*!< EXTI_POSITION_8 | EXTICR[2] */ 00186 #define LL_SYSCFG_EXTI_LINE11 (uint32_t)(0xF000U << 16 | 2) /*!< EXTI_POSITION_12 | EXTICR[2] */ 00187 #define LL_SYSCFG_EXTI_LINE12 (uint32_t)(0x000FU << 16 | 3) /*!< EXTI_POSITION_0 | EXTICR[3] */ 00188 #define LL_SYSCFG_EXTI_LINE13 (uint32_t)(0x00F0U << 16 | 3) /*!< EXTI_POSITION_4 | EXTICR[3] */ 00189 #define LL_SYSCFG_EXTI_LINE14 (uint32_t)(0x0F00U << 16 | 3) /*!< EXTI_POSITION_8 | EXTICR[3] */ 00190 #define LL_SYSCFG_EXTI_LINE15 (uint32_t)(0xF000U << 16 | 3) /*!< EXTI_POSITION_12 | EXTICR[3] */ 00191 /** 00192 * @} 00193 */ 00194 00195 /** @defgroup SYSTEM_LL_EC_TIMBREAK SYSCFG TIMER BREAK 00196 * @{ 00197 */ 00198 #if defined(SYSCFG_CFGR2_LOCKUP_LOCK) 00199 #define LL_SYSCFG_TIMBREAK_LOCKUP SYSCFG_CFGR2_LOCKUP_LOCK /*!< Enables and locks the LOCKUP output of CortexM4 00200 with Break Input of TIM1/8 */ 00201 #define LL_SYSCFG_TIMBREAK_PVD SYSCFG_CFGR2_PVD_LOCK /*!< Enables and locks the PVD connection with TIM1/8 Break Input 00202 and also the PVDE and PLS bits of the Power Control Interface */ 00203 #endif /* SYSCFG_CFGR2_CLL */ 00204 /** 00205 * @} 00206 */ 00207 00208 #if defined(SYSCFG_MCHDLYCR_BSCKSEL) 00209 /** @defgroup SYSTEM_LL_DFSDM_BitStream_ClockSource SYSCFG MCHDLY BCKKSEL 00210 * @{ 00211 */ 00212 #define LL_SYSCFG_BITSTREAM_CLOCK_TIM2OC1 (uint32_t)0x00000000 00213 #define LL_SYSCFG_BITSTREAM_CLOCK_DFSDM2 SYSCFG_MCHDLYCR_BSCKSEL 00214 /** 00215 * @} 00216 */ 00217 /** @defgroup SYSTEM_LL_DFSDM_MCHDLYEN SYSCFG MCHDLY MCHDLYEN 00218 * @{ 00219 */ 00220 #define LL_SYSCFG_DFSDM1_MCHDLYEN SYSCFG_MCHDLYCR_MCHDLY1EN 00221 #define LL_SYSCFG_DFSDM2_MCHDLYEN SYSCFG_MCHDLYCR_MCHDLY2EN 00222 /** 00223 * @} 00224 */ 00225 /** @defgroup SYSTEM_LL_DFSDM_DataIn0_Source SYSCFG MCHDLY DFSDMD0SEL 00226 * @{ 00227 */ 00228 #define LL_SYSCFG_DFSDM1_DataIn0 SYSCFG_MCHDLYCR_DFSDM1D0SEL 00229 #define LL_SYSCFG_DFSDM2_DataIn0 SYSCFG_MCHDLYCR_DFSDM2D0SEL 00230 00231 #define LL_SYSCFG_DFSDM1_DataIn0_PAD (uint32_t)((SYSCFG_MCHDLYCR_DFSDM1D0SEL << 16) | 0x00000000) 00232 #define LL_SYSCFG_DFSDM1_DataIn0_DM (uint32_t)((SYSCFG_MCHDLYCR_DFSDM1D0SEL << 16) | SYSCFG_MCHDLYCR_DFSDM1D0SEL) 00233 #define LL_SYSCFG_DFSDM2_DataIn0_PAD (uint32_t)((SYSCFG_MCHDLYCR_DFSDM2D0SEL << 16) | 0x00000000) 00234 #define LL_SYSCFG_DFSDM2_DataIn0_DM (uint32_t)((SYSCFG_MCHDLYCR_DFSDM2D0SEL << 16) | SYSCFG_MCHDLYCR_DFSDM2D0SEL) 00235 /** 00236 * @} 00237 */ 00238 /** @defgroup SYSTEM_LL_DFSDM_DataIn2_Source SYSCFG MCHDLY DFSDMD2SEL 00239 * @{ 00240 */ 00241 #define LL_SYSCFG_DFSDM1_DataIn2 SYSCFG_MCHDLYCR_DFSDM1D2SEL 00242 #define LL_SYSCFG_DFSDM2_DataIn2 SYSCFG_MCHDLYCR_DFSDM2D2SEL 00243 00244 #define LL_SYSCFG_DFSDM1_DataIn2_PAD (uint32_t)((SYSCFG_MCHDLYCR_DFSDM1D2SEL << 16) | 0x00000000) 00245 #define LL_SYSCFG_DFSDM1_DataIn2_DM (uint32_t)((SYSCFG_MCHDLYCR_DFSDM1D2SEL << 16) | SYSCFG_MCHDLYCR_DFSDM1D2SEL) 00246 #define LL_SYSCFG_DFSDM2_DataIn2_PAD (uint32_t)((SYSCFG_MCHDLYCR_DFSDM2D2SEL << 16) | 0x00000000) 00247 #define LL_SYSCFG_DFSDM2_DataIn2_DM (uint32_t)((SYSCFG_MCHDLYCR_DFSDM2D2SEL << 16) | SYSCFG_MCHDLYCR_DFSDM2D2SEL) 00248 /** 00249 * @} 00250 */ 00251 /** @defgroup SYSTEM_LL_DFSDM1_TIM4OC2_BitstreamDistribution SYSCFG MCHDLY DFSDM1CK02SEL 00252 * @{ 00253 */ 00254 #define LL_SYSCFG_DFSDM1_TIM4OC2_CLKIN0 (uint32_t)0x00000000 00255 #define LL_SYSCFG_DFSDM1_TIM4OC2_CLKIN2 SYSCFG_MCHDLYCR_DFSDM1CK02SEL 00256 /** 00257 * @} 00258 */ 00259 /** @defgroup SYSTEM_LL_DFSDM1_TIM4OC1_BitstreamDistribution SYSCFG MCHDLY DFSDM1CK13SEL 00260 * @{ 00261 */ 00262 #define LL_SYSCFG_DFSDM1_TIM4OC1_CLKIN1 (uint32_t)0x00000000 00263 #define LL_SYSCFG_DFSDM1_TIM4OC1_CLKIN3 SYSCFG_MCHDLYCR_DFSDM1CK13SEL 00264 /** 00265 * @} 00266 */ 00267 /** @defgroup SYSTEM_LL_DFSDM1_CLKIN_SourceSelection SYSCFG MCHDLY DFSDMCFG 00268 * @{ 00269 */ 00270 #define LL_SYSCFG_DFSDM1_CKIN_PAD (uint32_t)0x00000000 00271 #define LL_SYSCFG_DFSDM1_CKIN_DM SYSCFG_MCHDLYCR_DFSDM1CFG 00272 /** 00273 * @} 00274 */ 00275 /** @defgroup SYSTEM_LL_DFSDM1_CLKOUT_SourceSelection SYSCFG MCHDLY DFSDM1CKOSEL 00276 * @{ 00277 */ 00278 #define LL_SYSCFG_DFSDM1_CKOUT (uint32_t)0x00000000 00279 #define LL_SYSCFG_DFSDM1_CKOUT_M27 SYSCFG_MCHDLYCR_DFSDM1CKOSEL 00280 /** 00281 * @} 00282 */ 00283 00284 /** @defgroup SYSTEM_LL_DFSDM2_DataIn4_SourceSelection SYSCFG MCHDLY DFSDM2D4SEL 00285 * @{ 00286 */ 00287 #define LL_SYSCFG_DFSDM2_DataIn4_PAD (uint32_t)0x00000000 00288 #define LL_SYSCFG_DFSDM2_DataIn4_DM SYSCFG_MCHDLYCR_DFSDM2D4SEL 00289 /** 00290 * @} 00291 */ 00292 /** @defgroup SYSTEM_LL_DFSDM2_DataIn6_SourceSelection SYSCFG MCHDLY DFSDM2D6SEL 00293 * @{ 00294 */ 00295 #define LL_SYSCFG_DFSDM2_DataIn6_PAD (uint32_t)0x00000000 00296 #define LL_SYSCFG_DFSDM2_DataIn6_DM SYSCFG_MCHDLYCR_DFSDM2D6SEL 00297 /** 00298 * @} 00299 */ 00300 /** @defgroup SYSTEM_LL_DFSDM2_TIM3OC4_BitstreamDistribution SYSCFG MCHDLY DFSDM2CK04SEL 00301 * @{ 00302 */ 00303 #define LL_SYSCFG_DFSDM2_TIM3OC4_CLKIN0 (uint32_t)0x00000000 00304 #define LL_SYSCFG_DFSDM2_TIM3OC4_CLKIN4 SYSCFG_MCHDLYCR_DFSDM2CK04SEL 00305 /** 00306 * @} 00307 */ 00308 /** @defgroup SYSTEM_LL_DFSDM2_TIM3OC3_BitstreamDistribution SYSCFG MCHDLY DFSDM2CK15SEL 00309 * @{ 00310 */ 00311 #define LL_SYSCFG_DFSDM2_TIM3OC3_CLKIN1 (uint32_t)0x00000000 00312 #define LL_SYSCFG_DFSDM2_TIM3OC3_CLKIN5 SYSCFG_MCHDLYCR_DFSDM2CK15SEL 00313 /** 00314 * @} 00315 */ 00316 /** @defgroup SYSTEM_LL_DFSDM2_TIM3OC2_BitstreamDistribution SYSCFG MCHDLY DFSDM2CK26SEL 00317 * @{ 00318 */ 00319 #define LL_SYSCFG_DFSDM2_TIM3OC2_CLKIN2 (uint32_t)0x00000000 00320 #define LL_SYSCFG_DFSDM2_TIM3OC2_CLKIN6 SYSCFG_MCHDLYCR_DFSDM2CK26SEL 00321 /** 00322 * @} 00323 */ 00324 /** @defgroup SYSTEM_LL_DFSDM2_TIM3OC1_BitstreamDistribution SYSCFG MCHDLY DFSDM2CK37SEL 00325 * @{ 00326 */ 00327 #define LL_SYSCFG_DFSDM2_TIM3OC1_CLKIN3 (uint32_t)0x00000000 00328 #define LL_SYSCFG_DFSDM2_TIM3OC1_CLKIN7 SYSCFG_MCHDLYCR_DFSDM2CK37SEL 00329 /** 00330 * @} 00331 */ 00332 /** @defgroup SYSTEM_LL_DFSDM2_CLKIN_SourceSelection SYSCFG MCHDLY DFSDM2CFG 00333 * @{ 00334 */ 00335 #define LL_SYSCFG_DFSDM2_CKIN_PAD (uint32_t)0x00000000 00336 #define LL_SYSCFG_DFSDM2_CKIN_DM SYSCFG_MCHDLYCR_DFSDM2CFG 00337 /** 00338 * @} 00339 */ 00340 /** @defgroup SYSTEM_LL_DFSDM2_CLKOUT_SourceSelection SYSCFG MCHDLY DFSDM2CKOSEL 00341 * @{ 00342 */ 00343 #define LL_SYSCFG_DFSDM2_CKOUT (uint32_t)0x00000000 00344 #define LL_SYSCFG_DFSDM2_CKOUT_M27 SYSCFG_MCHDLYCR_DFSDM2CKOSEL 00345 /** 00346 * @} 00347 */ 00348 #endif /* SYSCFG_MCHDLYCR_BSCKSEL */ 00349 00350 /** @defgroup SYSTEM_LL_EC_TRACE DBGMCU TRACE Pin Assignment 00351 * @{ 00352 */ 00353 #define LL_DBGMCU_TRACE_NONE 0x00000000U /*!< TRACE pins not assigned (default state) */ 00354 #define LL_DBGMCU_TRACE_ASYNCH DBGMCU_CR_TRACE_IOEN /*!< TRACE pin assignment for Asynchronous Mode */ 00355 #define LL_DBGMCU_TRACE_SYNCH_SIZE1 (DBGMCU_CR_TRACE_IOEN | DBGMCU_CR_TRACE_MODE_0) /*!< TRACE pin assignment for Synchronous Mode with a TRACEDATA size of 1 */ 00356 #define LL_DBGMCU_TRACE_SYNCH_SIZE2 (DBGMCU_CR_TRACE_IOEN | DBGMCU_CR_TRACE_MODE_1) /*!< TRACE pin assignment for Synchronous Mode with a TRACEDATA size of 2 */ 00357 #define LL_DBGMCU_TRACE_SYNCH_SIZE4 (DBGMCU_CR_TRACE_IOEN | DBGMCU_CR_TRACE_MODE) /*!< TRACE pin assignment for Synchronous Mode with a TRACEDATA size of 4 */ 00358 /** 00359 * @} 00360 */ 00361 00362 /** @defgroup SYSTEM_LL_EC_APB1_GRP1_STOP_IP DBGMCU APB1 GRP1 STOP IP 00363 * @{ 00364 */ 00365 #if defined(DBGMCU_APB1_FZ_DBG_TIM2_STOP) 00366 #define LL_DBGMCU_APB1_GRP1_TIM2_STOP DBGMCU_APB1_FZ_DBG_TIM2_STOP /*!< TIM2 counter stopped when core is halted */ 00367 #endif /* DBGMCU_APB1_FZ_DBG_TIM2_STOP */ 00368 #if defined(DBGMCU_APB1_FZ_DBG_TIM3_STOP) 00369 #define LL_DBGMCU_APB1_GRP1_TIM3_STOP DBGMCU_APB1_FZ_DBG_TIM3_STOP /*!< TIM3 counter stopped when core is halted */ 00370 #endif /* DBGMCU_APB1_FZ_DBG_TIM3_STOP */ 00371 #if defined(DBGMCU_APB1_FZ_DBG_TIM4_STOP) 00372 #define LL_DBGMCU_APB1_GRP1_TIM4_STOP DBGMCU_APB1_FZ_DBG_TIM4_STOP /*!< TIM4 counter stopped when core is halted */ 00373 #endif /* DBGMCU_APB1_FZ_DBG_TIM4_STOP */ 00374 #define LL_DBGMCU_APB1_GRP1_TIM5_STOP DBGMCU_APB1_FZ_DBG_TIM5_STOP /*!< TIM5 counter stopped when core is halted */ 00375 #if defined(DBGMCU_APB1_FZ_DBG_TIM6_STOP) 00376 #define LL_DBGMCU_APB1_GRP1_TIM6_STOP DBGMCU_APB1_FZ_DBG_TIM6_STOP /*!< TIM6 counter stopped when core is halted */ 00377 #endif /* DBGMCU_APB1_FZ_DBG_TIM6_STOP */ 00378 #if defined(DBGMCU_APB1_FZ_DBG_TIM7_STOP) 00379 #define LL_DBGMCU_APB1_GRP1_TIM7_STOP DBGMCU_APB1_FZ_DBG_TIM7_STOP /*!< TIM7 counter stopped when core is halted */ 00380 #endif /* DBGMCU_APB1_FZ_DBG_TIM7_STOP */ 00381 #if defined(DBGMCU_APB1_FZ_DBG_TIM12_STOP) 00382 #define LL_DBGMCU_APB1_GRP1_TIM12_STOP DBGMCU_APB1_FZ_DBG_TIM12_STOP /*!< TIM12 counter stopped when core is halted */ 00383 #endif /* DBGMCU_APB1_FZ_DBG_TIM12_STOP */ 00384 #if defined(DBGMCU_APB1_FZ_DBG_TIM13_STOP) 00385 #define LL_DBGMCU_APB1_GRP1_TIM13_STOP DBGMCU_APB1_FZ_DBG_TIM13_STOP /*!< TIM13 counter stopped when core is halted */ 00386 #endif /* DBGMCU_APB1_FZ_DBG_TIM13_STOP */ 00387 #if defined(DBGMCU_APB1_FZ_DBG_TIM14_STOP) 00388 #define LL_DBGMCU_APB1_GRP1_TIM14_STOP DBGMCU_APB1_FZ_DBG_TIM14_STOP /*!< TIM14 counter stopped when core is halted */ 00389 #endif /* DBGMCU_APB1_FZ_DBG_TIM14_STOP */ 00390 #if defined(DBGMCU_APB1_FZ_DBG_LPTIM_STOP) 00391 #define LL_DBGMCU_APB1_GRP1_LPTIM_STOP DBGMCU_APB1_FZ_DBG_LPTIM_STOP /*!< LPTIM counter stopped when core is halted */ 00392 #endif /* DBGMCU_APB1_FZ_DBG_LPTIM_STOP */ 00393 #define LL_DBGMCU_APB1_GRP1_RTC_STOP DBGMCU_APB1_FZ_DBG_RTC_STOP /*!< RTC counter stopped when core is halted */ 00394 #define LL_DBGMCU_APB1_GRP1_WWDG_STOP DBGMCU_APB1_FZ_DBG_WWDG_STOP /*!< Debug Window Watchdog stopped when Core is halted */ 00395 #define LL_DBGMCU_APB1_GRP1_IWDG_STOP DBGMCU_APB1_FZ_DBG_IWDG_STOP /*!< Debug Independent Watchdog stopped when Core is halted */ 00396 #define LL_DBGMCU_APB1_GRP1_I2C1_STOP DBGMCU_APB1_FZ_DBG_I2C1_SMBUS_TIMEOUT /*!< I2C1 SMBUS timeout mode stopped when Core is halted */ 00397 #define LL_DBGMCU_APB1_GRP1_I2C2_STOP DBGMCU_APB1_FZ_DBG_I2C2_SMBUS_TIMEOUT /*!< I2C2 SMBUS timeout mode stopped when Core is halted */ 00398 #if defined(DBGMCU_APB1_FZ_DBG_I2C3_SMBUS_TIMEOUT) 00399 #define LL_DBGMCU_APB1_GRP1_I2C3_STOP DBGMCU_APB1_FZ_DBG_I2C3_SMBUS_TIMEOUT /*!< I2C3 SMBUS timeout mode stopped when Core is halted */ 00400 #endif /* DBGMCU_APB1_FZ_DBG_I2C3_SMBUS_TIMEOUT */ 00401 #if defined(DBGMCU_APB1_FZ_DBG_I2C4_SMBUS_TIMEOUT) 00402 #define LL_DBGMCU_APB1_GRP1_I2C4_STOP DBGMCU_APB1_FZ_DBG_I2C4_SMBUS_TIMEOUT /*!< I2C4 SMBUS timeout mode stopped when Core is halted */ 00403 #endif /* DBGMCU_APB1_FZ_DBG_I2C4_SMBUS_TIMEOUT */ 00404 #if defined(DBGMCU_APB1_FZ_DBG_CAN1_STOP) 00405 #define LL_DBGMCU_APB1_GRP1_CAN1_STOP DBGMCU_APB1_FZ_DBG_CAN1_STOP /*!< CAN1 debug stopped when Core is halted */ 00406 #endif /* DBGMCU_APB1_FZ_DBG_CAN1_STOP */ 00407 #if defined(DBGMCU_APB1_FZ_DBG_CAN2_STOP) 00408 #define LL_DBGMCU_APB1_GRP1_CAN2_STOP DBGMCU_APB1_FZ_DBG_CAN2_STOP /*!< CAN2 debug stopped when Core is halted */ 00409 #endif /* DBGMCU_APB1_FZ_DBG_CAN2_STOP */ 00410 #if defined(DBGMCU_APB1_FZ_DBG_CAN3_STOP) 00411 #define LL_DBGMCU_APB1_GRP1_CAN3_STOP DBGMCU_APB1_FZ_DBG_CAN3_STOP /*!< CAN3 debug stopped when Core is halted */ 00412 #endif /* DBGMCU_APB1_FZ_DBG_CAN3_STOP */ 00413 /** 00414 * @} 00415 */ 00416 00417 /** @defgroup SYSTEM_LL_EC_APB2_GRP1_STOP_IP DBGMCU APB2 GRP1 STOP IP 00418 * @{ 00419 */ 00420 #define LL_DBGMCU_APB2_GRP1_TIM1_STOP DBGMCU_APB2_FZ_DBG_TIM1_STOP /*!< TIM1 counter stopped when core is halted */ 00421 #if defined(DBGMCU_APB2_FZ_DBG_TIM8_STOP) 00422 #define LL_DBGMCU_APB2_GRP1_TIM8_STOP DBGMCU_APB2_FZ_DBG_TIM8_STOP /*!< TIM8 counter stopped when core is halted */ 00423 #endif /* DBGMCU_APB2_FZ_DBG_TIM8_STOP */ 00424 #define LL_DBGMCU_APB2_GRP1_TIM9_STOP DBGMCU_APB2_FZ_DBG_TIM9_STOP /*!< TIM9 counter stopped when core is halted */ 00425 #if defined(DBGMCU_APB2_FZ_DBG_TIM10_STOP) 00426 #define LL_DBGMCU_APB2_GRP1_TIM10_STOP DBGMCU_APB2_FZ_DBG_TIM10_STOP /*!< TIM10 counter stopped when core is halted */ 00427 #endif /* DBGMCU_APB2_FZ_DBG_TIM10_STOP */ 00428 #define LL_DBGMCU_APB2_GRP1_TIM11_STOP DBGMCU_APB2_FZ_DBG_TIM11_STOP /*!< TIM11 counter stopped when core is halted */ 00429 /** 00430 * @} 00431 */ 00432 00433 /** @defgroup SYSTEM_LL_EC_LATENCY FLASH LATENCY 00434 * @{ 00435 */ 00436 #define LL_FLASH_LATENCY_0 FLASH_ACR_LATENCY_0WS /*!< FLASH Zero wait state */ 00437 #define LL_FLASH_LATENCY_1 FLASH_ACR_LATENCY_1WS /*!< FLASH One wait state */ 00438 #define LL_FLASH_LATENCY_2 FLASH_ACR_LATENCY_2WS /*!< FLASH Two wait states */ 00439 #define LL_FLASH_LATENCY_3 FLASH_ACR_LATENCY_3WS /*!< FLASH Three wait states */ 00440 #define LL_FLASH_LATENCY_4 FLASH_ACR_LATENCY_4WS /*!< FLASH Four wait states */ 00441 #define LL_FLASH_LATENCY_5 FLASH_ACR_LATENCY_5WS /*!< FLASH five wait state */ 00442 #define LL_FLASH_LATENCY_6 FLASH_ACR_LATENCY_6WS /*!< FLASH six wait state */ 00443 #define LL_FLASH_LATENCY_7 FLASH_ACR_LATENCY_7WS /*!< FLASH seven wait states */ 00444 #define LL_FLASH_LATENCY_8 FLASH_ACR_LATENCY_8WS /*!< FLASH eight wait states */ 00445 #define LL_FLASH_LATENCY_9 FLASH_ACR_LATENCY_9WS /*!< FLASH nine wait states */ 00446 #define LL_FLASH_LATENCY_10 FLASH_ACR_LATENCY_10WS /*!< FLASH ten wait states */ 00447 #define LL_FLASH_LATENCY_11 FLASH_ACR_LATENCY_11WS /*!< FLASH eleven wait states */ 00448 #define LL_FLASH_LATENCY_12 FLASH_ACR_LATENCY_12WS /*!< FLASH twelve wait states */ 00449 #define LL_FLASH_LATENCY_13 FLASH_ACR_LATENCY_13WS /*!< FLASH thirteen wait states */ 00450 #define LL_FLASH_LATENCY_14 FLASH_ACR_LATENCY_14WS /*!< FLASH fourteen wait states */ 00451 #define LL_FLASH_LATENCY_15 FLASH_ACR_LATENCY_15WS /*!< FLASH fifteen wait states */ 00452 /** 00453 * @} 00454 */ 00455 00456 /** 00457 * @} 00458 */ 00459 00460 /* Exported macro ------------------------------------------------------------*/ 00461 00462 /* Exported functions --------------------------------------------------------*/ 00463 /** @defgroup SYSTEM_LL_Exported_Functions SYSTEM Exported Functions 00464 * @{ 00465 */ 00466 00467 /** @defgroup SYSTEM_LL_EF_SYSCFG SYSCFG 00468 * @{ 00469 */ 00470 /** 00471 * @brief Set memory mapping at address 0x00000000 00472 * @rmtoll SYSCFG_MEMRMP MEM_MODE LL_SYSCFG_SetRemapMemory 00473 * @param Memory This parameter can be one of the following values: 00474 * @arg @ref LL_SYSCFG_REMAP_FLASH 00475 * @arg @ref LL_SYSCFG_REMAP_SYSTEMFLASH 00476 * @arg @ref LL_SYSCFG_REMAP_SRAM 00477 * @arg @ref LL_SYSCFG_REMAP_FSMC (*) 00478 * @arg @ref LL_SYSCFG_REMAP_FMC (*) 00479 * @retval None 00480 */ 00481 __STATIC_INLINE void LL_SYSCFG_SetRemapMemory(uint32_t Memory) 00482 { 00483 MODIFY_REG(SYSCFG->MEMRMP, SYSCFG_MEMRMP_MEM_MODE, Memory); 00484 } 00485 00486 /** 00487 * @brief Get memory mapping at address 0x00000000 00488 * @rmtoll SYSCFG_MEMRMP MEM_MODE LL_SYSCFG_GetRemapMemory 00489 * @retval Returned value can be one of the following values: 00490 * @arg @ref LL_SYSCFG_REMAP_FLASH 00491 * @arg @ref LL_SYSCFG_REMAP_SYSTEMFLASH 00492 * @arg @ref LL_SYSCFG_REMAP_SRAM 00493 * @arg @ref LL_SYSCFG_REMAP_FSMC (*) 00494 * @arg @ref LL_SYSCFG_REMAP_FMC (*) 00495 */ 00496 __STATIC_INLINE uint32_t LL_SYSCFG_GetRemapMemory(void) 00497 { 00498 return (uint32_t)(READ_BIT(SYSCFG->MEMRMP, SYSCFG_MEMRMP_MEM_MODE)); 00499 } 00500 00501 #if defined(SYSCFG_MEMRMP_SWP_FMC) 00502 /** 00503 * @brief Enables the FMC Memory Mapping Swapping 00504 * @rmtoll SYSCFG_MEMRMP SWP_FMC LL_SYSCFG_EnableFMCMemorySwapping 00505 * @note SDRAM is accessible at 0x60000000 and NOR/RAM 00506 * is accessible at 0xC0000000 00507 * @retval None 00508 */ 00509 __STATIC_INLINE void LL_SYSCFG_EnableFMCMemorySwapping(void) 00510 { 00511 SET_BIT(SYSCFG->MEMRMP, SYSCFG_MEMRMP_SWP_FMC_0); 00512 } 00513 00514 /** 00515 * @brief Disables the FMC Memory Mapping Swapping 00516 * @rmtoll SYSCFG_MEMRMP SWP_FMC LL_SYSCFG_DisableFMCMemorySwapping 00517 * @note SDRAM is accessible at 0xC0000000 (default mapping) 00518 * and NOR/RAM is accessible at 0x60000000 (default mapping) 00519 * @retval None 00520 */ 00521 __STATIC_INLINE void LL_SYSCFG_DisableFMCMemorySwapping(void) 00522 { 00523 CLEAR_BIT(SYSCFG->MEMRMP, SYSCFG_MEMRMP_SWP_FMC); 00524 } 00525 00526 #endif /* SYSCFG_MEMRMP_SWP_FMC */ 00527 /** 00528 * @brief Enables the Compensation cell Power Down 00529 * @rmtoll SYSCFG_CMPCR CMP_PD LL_SYSCFG_EnableCompensationCell 00530 * @note The I/O compensation cell can be used only when the device supply 00531 * voltage ranges from 2.4 to 3.6 V 00532 * @retval None 00533 */ 00534 __STATIC_INLINE void LL_SYSCFG_EnableCompensationCell(void) 00535 { 00536 SET_BIT(SYSCFG->CMPCR, SYSCFG_CMPCR_CMP_PD); 00537 } 00538 00539 /** 00540 * @brief Disables the Compensation cell Power Down 00541 * @rmtoll SYSCFG_CMPCR CMP_PD LL_SYSCFG_DisableCompensationCell 00542 * @note The I/O compensation cell can be used only when the device supply 00543 * voltage ranges from 2.4 to 3.6 V 00544 * @retval None 00545 */ 00546 __STATIC_INLINE void LL_SYSCFG_DisableCompensationCell(void) 00547 { 00548 CLEAR_BIT(SYSCFG->CMPCR, SYSCFG_CMPCR_CMP_PD); 00549 } 00550 00551 /** 00552 * @brief Get Compensation Cell ready Flag 00553 * @rmtoll SYSCFG_CMPCR READY LL_SYSCFG_IsActiveFlag_CMPCR 00554 * @retval State of bit (1 or 0). 00555 */ 00556 __STATIC_INLINE uint32_t LL_SYSCFG_IsActiveFlag_CMPCR(void) 00557 { 00558 return (READ_BIT(SYSCFG->CMPCR, SYSCFG_CMPCR_READY) == (SYSCFG_CMPCR_READY)); 00559 } 00560 00561 #if defined(SYSCFG_PMC_MII_RMII_SEL) 00562 /** 00563 * @brief Select Ethernet PHY interface 00564 * @rmtoll SYSCFG_PMC MII_RMII_SEL LL_SYSCFG_SetPHYInterface 00565 * @param Interface This parameter can be one of the following values: 00566 * @arg @ref LL_SYSCFG_PMC_ETHMII 00567 * @arg @ref LL_SYSCFG_PMC_ETHRMII 00568 * @retval None 00569 */ 00570 __STATIC_INLINE void LL_SYSCFG_SetPHYInterface(uint32_t Interface) 00571 { 00572 MODIFY_REG(SYSCFG->PMC, SYSCFG_PMC_MII_RMII_SEL, Interface); 00573 } 00574 00575 /** 00576 * @brief Get Ethernet PHY interface 00577 * @rmtoll SYSCFG_PMC MII_RMII_SEL LL_SYSCFG_GetPHYInterface 00578 * @retval Returned value can be one of the following values: 00579 * @arg @ref LL_SYSCFG_PMC_ETHMII 00580 * @arg @ref LL_SYSCFG_PMC_ETHRMII 00581 * @retval None 00582 */ 00583 __STATIC_INLINE uint32_t LL_SYSCFG_GetPHYInterface(void) 00584 { 00585 return (uint32_t)(READ_BIT(SYSCFG->PMC, SYSCFG_PMC_MII_RMII_SEL)); 00586 } 00587 #endif /* SYSCFG_PMC_MII_RMII_SEL */ 00588 00589 00590 00591 #if defined(SYSCFG_MEMRMP_UFB_MODE) 00592 /** 00593 * @brief Select Flash bank mode (Bank flashed at 0x08000000) 00594 * @rmtoll SYSCFG_MEMRMP UFB_MODE LL_SYSCFG_SetFlashBankMode 00595 * @param Bank This parameter can be one of the following values: 00596 * @arg @ref LL_SYSCFG_BANKMODE_BANK1 00597 * @arg @ref LL_SYSCFG_BANKMODE_BANK2 00598 * @retval None 00599 */ 00600 __STATIC_INLINE void LL_SYSCFG_SetFlashBankMode(uint32_t Bank) 00601 { 00602 MODIFY_REG(SYSCFG->MEMRMP, SYSCFG_MEMRMP_UFB_MODE, Bank); 00603 } 00604 00605 /** 00606 * @brief Get Flash bank mode (Bank flashed at 0x08000000) 00607 * @rmtoll SYSCFG_MEMRMP UFB_MODE LL_SYSCFG_GetFlashBankMode 00608 * @retval Returned value can be one of the following values: 00609 * @arg @ref LL_SYSCFG_BANKMODE_BANK1 00610 * @arg @ref LL_SYSCFG_BANKMODE_BANK2 00611 */ 00612 __STATIC_INLINE uint32_t LL_SYSCFG_GetFlashBankMode(void) 00613 { 00614 return (uint32_t)(READ_BIT(SYSCFG->MEMRMP, SYSCFG_MEMRMP_UFB_MODE)); 00615 } 00616 #endif /* SYSCFG_MEMRMP_UFB_MODE */ 00617 00618 #if defined(SYSCFG_CFGR_FMPI2C1_SCL) 00619 /** 00620 * @brief Enable the I2C fast mode plus driving capability. 00621 * @rmtoll SYSCFG_CFGR FMPI2C1_SCL LL_SYSCFG_EnableFastModePlus\n 00622 * SYSCFG_CFGR FMPI2C1_SDA LL_SYSCFG_EnableFastModePlus 00623 * @param ConfigFastModePlus This parameter can be a combination of the following values: 00624 * @arg @ref LL_SYSCFG_I2C_FASTMODEPLUS_SCL 00625 * @arg @ref LL_SYSCFG_I2C_FASTMODEPLUS_SDA 00626 * (*) value not defined in all devices 00627 * @retval None 00628 */ 00629 __STATIC_INLINE void LL_SYSCFG_EnableFastModePlus(uint32_t ConfigFastModePlus) 00630 { 00631 SET_BIT(SYSCFG->CFGR, ConfigFastModePlus); 00632 } 00633 00634 /** 00635 * @brief Disable the I2C fast mode plus driving capability. 00636 * @rmtoll SYSCFG_CFGR FMPI2C1_SCL LL_SYSCFG_DisableFastModePlus\n 00637 * SYSCFG_CFGR FMPI2C1_SDA LL_SYSCFG_DisableFastModePlus\n 00638 * @param ConfigFastModePlus This parameter can be a combination of the following values: 00639 * @arg @ref LL_SYSCFG_I2C_FASTMODEPLUS_SCL 00640 * @arg @ref LL_SYSCFG_I2C_FASTMODEPLUS_SDA 00641 * (*) value not defined in all devices 00642 * @retval None 00643 */ 00644 __STATIC_INLINE void LL_SYSCFG_DisableFastModePlus(uint32_t ConfigFastModePlus) 00645 { 00646 CLEAR_BIT(SYSCFG->CFGR, ConfigFastModePlus); 00647 } 00648 #endif /* SYSCFG_CFGR_FMPI2C1_SCL */ 00649 00650 /** 00651 * @brief Configure source input for the EXTI external interrupt. 00652 * @rmtoll SYSCFG_EXTICR1 EXTIx LL_SYSCFG_SetEXTISource\n 00653 * SYSCFG_EXTICR2 EXTIx LL_SYSCFG_SetEXTISource\n 00654 * SYSCFG_EXTICR3 EXTIx LL_SYSCFG_SetEXTISource\n 00655 * SYSCFG_EXTICR4 EXTIx LL_SYSCFG_SetEXTISource 00656 * @param Port This parameter can be one of the following values: 00657 * @arg @ref LL_SYSCFG_EXTI_PORTA 00658 * @arg @ref LL_SYSCFG_EXTI_PORTB 00659 * @arg @ref LL_SYSCFG_EXTI_PORTC 00660 * @arg @ref LL_SYSCFG_EXTI_PORTD 00661 * @arg @ref LL_SYSCFG_EXTI_PORTE 00662 * @arg @ref LL_SYSCFG_EXTI_PORTF (*) 00663 * @arg @ref LL_SYSCFG_EXTI_PORTG (*) 00664 * @arg @ref LL_SYSCFG_EXTI_PORTH 00665 * 00666 * (*) value not defined in all devices 00667 * @param Line This parameter can be one of the following values: 00668 * @arg @ref LL_SYSCFG_EXTI_LINE0 00669 * @arg @ref LL_SYSCFG_EXTI_LINE1 00670 * @arg @ref LL_SYSCFG_EXTI_LINE2 00671 * @arg @ref LL_SYSCFG_EXTI_LINE3 00672 * @arg @ref LL_SYSCFG_EXTI_LINE4 00673 * @arg @ref LL_SYSCFG_EXTI_LINE5 00674 * @arg @ref LL_SYSCFG_EXTI_LINE6 00675 * @arg @ref LL_SYSCFG_EXTI_LINE7 00676 * @arg @ref LL_SYSCFG_EXTI_LINE8 00677 * @arg @ref LL_SYSCFG_EXTI_LINE9 00678 * @arg @ref LL_SYSCFG_EXTI_LINE10 00679 * @arg @ref LL_SYSCFG_EXTI_LINE11 00680 * @arg @ref LL_SYSCFG_EXTI_LINE12 00681 * @arg @ref LL_SYSCFG_EXTI_LINE13 00682 * @arg @ref LL_SYSCFG_EXTI_LINE14 00683 * @arg @ref LL_SYSCFG_EXTI_LINE15 00684 * @retval None 00685 */ 00686 __STATIC_INLINE void LL_SYSCFG_SetEXTISource(uint32_t Port, uint32_t Line) 00687 { 00688 MODIFY_REG(SYSCFG->EXTICR[Line & 0xFF], (Line >> 16), Port << POSITION_VAL((Line >> 16))); 00689 } 00690 00691 /** 00692 * @brief Get the configured defined for specific EXTI Line 00693 * @rmtoll SYSCFG_EXTICR1 EXTIx LL_SYSCFG_GetEXTISource\n 00694 * SYSCFG_EXTICR2 EXTIx LL_SYSCFG_GetEXTISource\n 00695 * SYSCFG_EXTICR3 EXTIx LL_SYSCFG_GetEXTISource\n 00696 * SYSCFG_EXTICR4 EXTIx LL_SYSCFG_GetEXTISource 00697 * @param Line This parameter can be one of the following values: 00698 * @arg @ref LL_SYSCFG_EXTI_LINE0 00699 * @arg @ref LL_SYSCFG_EXTI_LINE1 00700 * @arg @ref LL_SYSCFG_EXTI_LINE2 00701 * @arg @ref LL_SYSCFG_EXTI_LINE3 00702 * @arg @ref LL_SYSCFG_EXTI_LINE4 00703 * @arg @ref LL_SYSCFG_EXTI_LINE5 00704 * @arg @ref LL_SYSCFG_EXTI_LINE6 00705 * @arg @ref LL_SYSCFG_EXTI_LINE7 00706 * @arg @ref LL_SYSCFG_EXTI_LINE8 00707 * @arg @ref LL_SYSCFG_EXTI_LINE9 00708 * @arg @ref LL_SYSCFG_EXTI_LINE10 00709 * @arg @ref LL_SYSCFG_EXTI_LINE11 00710 * @arg @ref LL_SYSCFG_EXTI_LINE12 00711 * @arg @ref LL_SYSCFG_EXTI_LINE13 00712 * @arg @ref LL_SYSCFG_EXTI_LINE14 00713 * @arg @ref LL_SYSCFG_EXTI_LINE15 00714 * @retval Returned value can be one of the following values: 00715 * @arg @ref LL_SYSCFG_EXTI_PORTA 00716 * @arg @ref LL_SYSCFG_EXTI_PORTB 00717 * @arg @ref LL_SYSCFG_EXTI_PORTC 00718 * @arg @ref LL_SYSCFG_EXTI_PORTD 00719 * @arg @ref LL_SYSCFG_EXTI_PORTE 00720 * @arg @ref LL_SYSCFG_EXTI_PORTF (*) 00721 * @arg @ref LL_SYSCFG_EXTI_PORTG (*) 00722 * @arg @ref LL_SYSCFG_EXTI_PORTH 00723 * (*) value not defined in all devices 00724 */ 00725 __STATIC_INLINE uint32_t LL_SYSCFG_GetEXTISource(uint32_t Line) 00726 { 00727 return (uint32_t)(READ_BIT(SYSCFG->EXTICR[Line & 0xFF], (Line >> 16)) >> POSITION_VAL(Line >> 16)); 00728 } 00729 00730 #if defined(SYSCFG_CFGR2_LOCKUP_LOCK) 00731 /** 00732 * @brief Set connections to TIM1/8 break inputs 00733 * @rmtoll SYSCFG_CFGR2 LockUp Lock LL_SYSCFG_SetTIMBreakInputs \n 00734 * SYSCFG_CFGR2 PVD Lock LL_SYSCFG_SetTIMBreakInputs 00735 * @param Break This parameter can be a combination of the following values: 00736 * @arg @ref LL_SYSCFG_TIMBREAK_LOCKUP 00737 * @arg @ref LL_SYSCFG_TIMBREAK_PVD 00738 * @retval None 00739 */ 00740 __STATIC_INLINE void LL_SYSCFG_SetTIMBreakInputs(uint32_t Break) 00741 { 00742 MODIFY_REG(SYSCFG->CFGR2, SYSCFG_CFGR2_LOCKUP_LOCK | SYSCFG_CFGR2_PVD_LOCK, Break); 00743 } 00744 00745 /** 00746 * @brief Get connections to TIM1/8 Break inputs 00747 * @rmtoll SYSCFG_CFGR2 LockUp Lock LL_SYSCFG_SetTIMBreakInputs \n 00748 * SYSCFG_CFGR2 PVD Lock LL_SYSCFG_SetTIMBreakInputs 00749 * @retval Returned value can be can be a combination of the following values: 00750 * @arg @ref LL_SYSCFG_TIMBREAK_LOCKUP 00751 * @arg @ref LL_SYSCFG_TIMBREAK_PVD 00752 */ 00753 __STATIC_INLINE uint32_t LL_SYSCFG_GetTIMBreakInputs(void) 00754 { 00755 return (uint32_t)(READ_BIT(SYSCFG->CFGR2, SYSCFG_CFGR2_LOCKUP_LOCK | SYSCFG_CFGR2_PVD_LOCK)); 00756 } 00757 #endif /* SYSCFG_CFGR2_LOCKUP_LOCK */ 00758 #if defined(SYSCFG_MCHDLYCR_BSCKSEL) 00759 /** 00760 * @brief Select the DFSDM2 or TIM2_OC1 as clock source for the bitstream clock. 00761 * @rmtoll SYSCFG_MCHDLYCR BSCKSEL LL_SYSCFG_DFSDM_SetBitstreamClockSourceSelection 00762 * @param ClockSource This parameter can be one of the following values: 00763 * @arg @ref LL_SYSCFG_BITSTREAM_CLOCK_DFSDM2 00764 * @arg @ref LL_SYSCFG_BITSTREAM_CLOCK_TIM2OC1 00765 * @retval None 00766 */ 00767 __STATIC_INLINE void LL_SYSCFG_DFSDM_SetBitstreamClockSourceSelection(uint32_t ClockSource) 00768 { 00769 MODIFY_REG(SYSCFG->MCHDLYCR, SYSCFG_MCHDLYCR_BSCKSEL, ClockSource); 00770 } 00771 /** 00772 * @brief Get the DFSDM2 or TIM2_OC1 as clock source for the bitstream clock. 00773 * @rmtoll SYSCFG_MCHDLYCR BSCKSEL LL_SYSCFG_DFSDM_GetBitstreamClockSourceSelection 00774 * @retval Returned value can be one of the following values: 00775 * @arg @ref LL_SYSCFG_BITSTREAM_CLOCK_DFSDM2 00776 * @arg @ref LL_SYSCFG_BITSTREAM_CLOCK_TIM2OC1 00777 * @retval None 00778 */ 00779 __STATIC_INLINE uint32_t LL_SYSCFG_DFSDM_GetBitstreamClockSourceSelection(void) 00780 { 00781 return (uint32_t)(READ_BIT(SYSCFG->MCHDLYCR, SYSCFG_MCHDLYCR_BSCKSEL)); 00782 } 00783 /** 00784 * @brief Enables the DFSDM1 or DFSDM2 Delay clock 00785 * @rmtoll SYSCFG_MCHDLYCR MCHDLYEN LL_SYSCFG_DFSDM_EnableDelayClock 00786 * @param MCHDLY This paramater can be one of the following values 00787 * @arg @ref LL_SYSCFG_DFSDM1_MCHDLYEN 00788 * @arg @ref LL_SYSCFG_DFSDM2_MCHDLYEN 00789 * @retval None 00790 */ 00791 __STATIC_INLINE void LL_SYSCFG_DFSDM_EnableDelayClock(uint32_t MCHDLY) 00792 { 00793 SET_BIT(SYSCFG->MCHDLYCR, MCHDLY); 00794 } 00795 00796 /** 00797 * @brief Disables the DFSDM1 or the DFSDM2 Delay clock 00798 * @rmtoll SYSCFG_MCHDLYCR MCHDLY1EN LL_SYSCFG_DFSDM1_DisableDelayClock 00799 * @param MCHDLY This paramater can be one of the following values 00800 * @arg @ref LL_SYSCFG_DFSDM1_MCHDLYEN 00801 * @arg @ref LL_SYSCFG_DFSDM2_MCHDLYEN 00802 * @retval None 00803 */ 00804 __STATIC_INLINE void LL_SYSCFG_DFSDM_DisableDelayClock(uint32_t MCHDLY) 00805 { 00806 CLEAR_BIT(SYSCFG->MCHDLYCR, MCHDLY); 00807 } 00808 00809 /** 00810 * @brief Select the source for DFSDM1 or DFSDM2 DatIn0 00811 * @rmtoll SYSCFG_MCHDLYCR DFSDMD0SEL LL_SYSCFG_DFSDM_SetDataIn0Source 00812 * @param Source This parameter can be one of the following values: 00813 * @arg @ref LL_SYSCFG_DFSDM1_DataIn0_PAD 00814 * @arg @ref LL_SYSCFG_DFSDM1_DataIn0_DM 00815 * @arg @ref LL_SYSCFG_DFSDM2_DataIn0_PAD 00816 * @arg @ref LL_SYSCFG_DFSDM2_DataIn0_DM 00817 * @retval None 00818 */ 00819 __STATIC_INLINE void LL_SYSCFG_DFSDM_SetDataIn0Source(uint32_t Source) 00820 { 00821 MODIFY_REG(SYSCFG->MCHDLYCR, (Source >> 16), (Source & 0x0000FFFF)); 00822 } 00823 /** 00824 * @brief Get the source for DFSDM1 or DFSDM2 DatIn0. 00825 * @rmtoll SYSCFG_MCHDLYCR DFSDMD0SEL LL_SYSCFG_DFSDM_GetDataIn0Source 00826 * @param Source This parameter can be one of the following values: 00827 * @arg @ref LL_SYSCFG_DFSDM1_DataIn0 00828 * @arg @ref LL_SYSCFG_DFSDM2_DataIn0 00829 * @retval Returned value can be one of the following values: 00830 * @arg @ref LL_SYSCFG_DFSDM1_DataIn0_PAD 00831 * @arg @ref LL_SYSCFG_DFSDM1_DataIn0_DM 00832 * @arg @ref LL_SYSCFG_DFSDM2_DataIn0_PAD 00833 * @arg @ref LL_SYSCFG_DFSDM2_DataIn0_DM 00834 * @retval None 00835 */ 00836 __STATIC_INLINE uint32_t LL_SYSCFG_DFSDM_GetDataIn0Source(uint32_t Source) 00837 { 00838 return (uint32_t)(READ_BIT(SYSCFG->MCHDLYCR, Source)); 00839 } 00840 /** 00841 * @brief Select the source for DFSDM1 or DFSDM2 DatIn2 00842 * @rmtoll SYSCFG_MCHDLYCR DFSDMD2SEL LL_SYSCFG_DFSDM_SetDataIn2Source 00843 * @param Source This parameter can be one of the following values: 00844 * @arg @ref LL_SYSCFG_DFSDM1_DataIn2_PAD 00845 * @arg @ref LL_SYSCFG_DFSDM1_DataIn2_DM 00846 * @arg @ref LL_SYSCFG_DFSDM2_DataIn2_PAD 00847 * @arg @ref LL_SYSCFG_DFSDM2_DataIn2_DM 00848 * @retval None 00849 */ 00850 __STATIC_INLINE void LL_SYSCFG_DFSDM_SetDataIn2Source(uint32_t Source) 00851 { 00852 MODIFY_REG(SYSCFG->MCHDLYCR, (Source >> 16), (Source & 0x0000FFFF)); 00853 } 00854 /** 00855 * @brief Get the source for DFSDM1 or DFSDM2 DatIn2. 00856 * @rmtoll SYSCFG_MCHDLYCR DFSDMD2SEL LL_SYSCFG_DFSDM_GetDataIn2Source 00857 * @param Source This parameter can be one of the following values: 00858 * @arg @ref LL_SYSCFG_DFSDM1_DataIn2 00859 * @arg @ref LL_SYSCFG_DFSDM2_DataIn2 00860 * @retval Returned value can be one of the following values: 00861 * @arg @ref LL_SYSCFG_DFSDM1_DataIn2_PAD 00862 * @arg @ref LL_SYSCFG_DFSDM1_DataIn2_DM 00863 * @arg @ref LL_SYSCFG_DFSDM2_DataIn2_PAD 00864 * @arg @ref LL_SYSCFG_DFSDM2_DataIn2_DM 00865 * @retval None 00866 */ 00867 __STATIC_INLINE uint32_t LL_SYSCFG_DFSDM_GetDataIn2Source(uint32_t Source) 00868 { 00869 return (uint32_t)(READ_BIT(SYSCFG->MCHDLYCR, Source)); 00870 } 00871 00872 /** 00873 * @brief Select the distribution of the bitsream lock gated by TIM4 OC2 00874 * @rmtoll SYSCFG_MCHDLYCR DFSDM1CK02SEL LL_SYSCFG_DFSDM1_SetTIM4OC2BitStreamDistribution 00875 * @param Source This parameter can be one of the following values: 00876 * @arg @ref LL_SYSCFG_DFSDM1_TIM4OC2_CLKIN0 00877 * @arg @ref LL_SYSCFG_DFSDM1_TIM4OC2_CLKIN2 00878 * @retval None 00879 */ 00880 __STATIC_INLINE void LL_SYSCFG_DFSDM1_SetTIM4OC2BitStreamDistribution(uint32_t Source) 00881 { 00882 MODIFY_REG(SYSCFG->MCHDLYCR, SYSCFG_MCHDLYCR_DFSDM1CK02SEL, Source); 00883 } 00884 /** 00885 * @brief Get the distribution of the bitsream lock gated by TIM4 OC2 00886 * @rmtoll SYSCFG_MCHDLYCR DFSDM1D2SEL LL_SYSCFG_DFSDM1_GetTIM4OC2BitStreamDistribution 00887 * @retval Returned value can be one of the following values: 00888 * @arg @ref LL_SYSCFG_DFSDM1_TIM4OC2_CLKIN0 00889 * @arg @ref LL_SYSCFG_DFSDM1_TIM4OC2_CLKIN2 00890 * @retval None 00891 */ 00892 __STATIC_INLINE uint32_t LL_SYSCFG_DFSDM1_GetTIM4OC2BitStreamDistribution(void) 00893 { 00894 return (uint32_t)(READ_BIT(SYSCFG->MCHDLYCR, SYSCFG_MCHDLYCR_DFSDM1CK02SEL)); 00895 } 00896 00897 /** 00898 * @brief Select the distribution of the bitsream lock gated by TIM4 OC1 00899 * @rmtoll SYSCFG_MCHDLYCR DFSDM1CK13SEL LL_SYSCFG_DFSDM1_SetTIM4OC1BitStreamDistribution 00900 * @param Source This parameter can be one of the following values: 00901 * @arg @ref LL_SYSCFG_DFSDM1_TIM4OC1_CLKIN1 00902 * @arg @ref LL_SYSCFG_DFSDM1_TIM4OC1_CLKIN3 00903 * @retval None 00904 */ 00905 __STATIC_INLINE void LL_SYSCFG_DFSDM1_SetTIM4OC1BitStreamDistribution(uint32_t Source) 00906 { 00907 MODIFY_REG(SYSCFG->MCHDLYCR, SYSCFG_MCHDLYCR_DFSDM1CK13SEL, Source); 00908 } 00909 /** 00910 * @brief Get the distribution of the bitsream lock gated by TIM4 OC1 00911 * @rmtoll SYSCFG_MCHDLYCR DFSDM1D2SEL LL_SYSCFG_DFSDM1_GetTIM4OC1BitStreamDistribution 00912 * @retval Returned value can be one of the following values: 00913 * @arg @ref LL_SYSCFG_DFSDM1_TIM4OC1_CLKIN1 00914 * @arg @ref LL_SYSCFG_DFSDM1_TIM4OC1_CLKIN3 00915 * @retval None 00916 */ 00917 __STATIC_INLINE uint32_t LL_SYSCFG_DFSDM1_GetTIM4OC1BitStreamDistribution(void) 00918 { 00919 return (uint32_t)(READ_BIT(SYSCFG->MCHDLYCR, SYSCFG_MCHDLYCR_DFSDM1CK13SEL)); 00920 } 00921 00922 /** 00923 * @brief Select the DFSDM1 Clock In 00924 * @rmtoll SYSCFG_MCHDLYCR DFSDM1CFG LL_SYSCFG_DFSDM1_SetClockInSourceSelection 00925 * @param ClockSource This parameter can be one of the following values: 00926 * @arg @ref LL_SYSCFG_DFSDM1_CKIN_PAD 00927 * @arg @ref LL_SYSCFG_DFSDM1_CKIN_DM 00928 * @retval None 00929 */ 00930 __STATIC_INLINE void LL_SYSCFG_DFSDM1_SetClockInSourceSelection(uint32_t ClockSource) 00931 { 00932 MODIFY_REG(SYSCFG->MCHDLYCR, SYSCFG_MCHDLYCR_DFSDM1CFG, ClockSource); 00933 } 00934 /** 00935 * @brief GET the DFSDM1 Clock In 00936 * @rmtoll SYSCFG_MCHDLYCR DFSDM1CFG LL_SYSCFG_DFSDM1_GetClockInSourceSelection 00937 * @retval Returned value can be one of the following values: 00938 * @arg @ref LL_SYSCFG_DFSDM1_CKIN_PAD 00939 * @arg @ref LL_SYSCFG_DFSDM1_CKIN_DM 00940 * @retval None 00941 */ 00942 __STATIC_INLINE uint32_t LL_SYSCFG_DFSDM1_GetClockInSourceSelection(void) 00943 { 00944 return (uint32_t)(READ_BIT(SYSCFG->MCHDLYCR, SYSCFG_MCHDLYCR_DFSDM1CFG)); 00945 } 00946 00947 /** 00948 * @brief Select the DFSDM1 Clock Out 00949 * @rmtoll SYSCFG_MCHDLYCR DFSDM1CKOSEL LL_SYSCFG_DFSDM1_SetClockOutSourceSelection 00950 * @param ClockSource This parameter can be one of the following values: 00951 * @arg @ref LL_SYSCFG_DFSDM1_CKOUT 00952 * @arg @ref LL_SYSCFG_DFSDM1_CKOUT_M27 00953 * @retval None 00954 */ 00955 __STATIC_INLINE void LL_SYSCFG_DFSDM1_SetClockOutSourceSelection(uint32_t ClockSource) 00956 { 00957 MODIFY_REG(SYSCFG->MCHDLYCR, SYSCFG_MCHDLYCR_DFSDM1CKOSEL, ClockSource); 00958 } 00959 /** 00960 * @brief GET the DFSDM1 Clock Out 00961 * @rmtoll SYSCFG_MCHDLYCR DFSDM1CKOSEL LL_SYSCFG_DFSDM1_GetClockOutSourceSelection 00962 * @retval Returned value can be one of the following values: 00963 * @arg @ref LL_SYSCFG_DFSDM1_CKOUT 00964 * @arg @ref LL_SYSCFG_DFSDM1_CKOUT_M27 00965 * @retval None 00966 */ 00967 __STATIC_INLINE uint32_t LL_SYSCFG_DFSDM1_GetClockOutSourceSelection(void) 00968 { 00969 return (uint32_t)(READ_BIT(SYSCFG->MCHDLYCR, SYSCFG_MCHDLYCR_DFSDM1CKOSEL)); 00970 } 00971 00972 /** 00973 * @brief Enables the DFSDM2 Delay clock 00974 * @rmtoll SYSCFG_MCHDLYCR MCHDLY2EN LL_SYSCFG_DFSDM2_EnableDelayClock 00975 * @retval None 00976 */ 00977 __STATIC_INLINE void LL_SYSCFG_DFSDM2_EnableDelayClock(void) 00978 { 00979 SET_BIT(SYSCFG->MCHDLYCR, SYSCFG_MCHDLYCR_MCHDLY2EN); 00980 } 00981 00982 /** 00983 * @brief Disables the DFSDM2 Delay clock 00984 * @rmtoll SYSCFG_MCHDLYCR MCHDLY2EN LL_SYSCFG_DFSDM2_DisableDelayClock 00985 * @retval None 00986 */ 00987 __STATIC_INLINE void LL_SYSCFG_DFSDM2_DisableDelayClock(void) 00988 { 00989 CLEAR_BIT(SYSCFG->MCHDLYCR, SYSCFG_MCHDLYCR_MCHDLY2EN); 00990 } 00991 /** 00992 * @brief Select the source for DFSDM2 DatIn0 00993 * @rmtoll SYSCFG_MCHDLYCR DFSDM2D0SEL LL_SYSCFG_DFSDM2_SetDataIn0Source 00994 * @param Source This parameter can be one of the following values: 00995 * @arg @ref LL_SYSCFG_DFSDM2_DataIn0_PAD 00996 * @arg @ref LL_SYSCFG_DFSDM2_DataIn0_DM 00997 * @retval None 00998 */ 00999 __STATIC_INLINE void LL_SYSCFG_DFSDM2_SetDataIn0Source(uint32_t Source) 01000 { 01001 MODIFY_REG(SYSCFG->MCHDLYCR, SYSCFG_MCHDLYCR_DFSDM2D0SEL, Source); 01002 } 01003 /** 01004 * @brief Get the source for DFSDM2 DatIn0. 01005 * @rmtoll SYSCFG_MCHDLYCR DFSDM2D0SEL LL_SYSCFG_DFSDM2_GetDataIn0Source 01006 * @retval Returned value can be one of the following values: 01007 * @arg @ref LL_SYSCFG_DFSDM2_DataIn0_PAD 01008 * @arg @ref LL_SYSCFG_DFSDM2_DataIn0_DM 01009 * @retval None 01010 */ 01011 __STATIC_INLINE uint32_t LL_SYSCFG_DFSDM2_GetDataIn0Source(void) 01012 { 01013 return (uint32_t)(READ_BIT(SYSCFG->MCHDLYCR, SYSCFG_MCHDLYCR_DFSDM2D0SEL)); 01014 } 01015 01016 /** 01017 * @brief Select the source for DFSDM2 DatIn2 01018 * @rmtoll SYSCFG_MCHDLYCR DFSDM2D2SEL LL_SYSCFG_DFSDM2_SetDataIn2Source 01019 * @param Source This parameter can be one of the following values: 01020 * @arg @ref LL_SYSCFG_DFSDM2_DataIn2_PAD 01021 * @arg @ref LL_SYSCFG_DFSDM2_DataIn2_DM 01022 * @retval None 01023 */ 01024 __STATIC_INLINE void LL_SYSCFG_DFSDM2_SetDataIn2Source(uint32_t Source) 01025 { 01026 MODIFY_REG(SYSCFG->MCHDLYCR, SYSCFG_MCHDLYCR_DFSDM2D2SEL, Source); 01027 } 01028 /** 01029 * @brief Get the source for DFSDM2 DatIn2. 01030 * @rmtoll SYSCFG_MCHDLYCR DFSDM2D2SEL LL_SYSCFG_DFSDM2_GetDataIn2Source 01031 * @retval Returned value can be one of the following values: 01032 * @arg @ref LL_SYSCFG_DFSDM2_DataIn2_PAD 01033 * @arg @ref LL_SYSCFG_DFSDM2_DataIn2_DM 01034 * @retval None 01035 */ 01036 __STATIC_INLINE uint32_t LL_SYSCFG_DFSDM2_GetDataIn2Source(void) 01037 { 01038 return (uint32_t)(READ_BIT(SYSCFG->MCHDLYCR, SYSCFG_MCHDLYCR_DFSDM2D2SEL)); 01039 } 01040 01041 /** 01042 * @brief Select the source for DFSDM2 DatIn4 01043 * @rmtoll SYSCFG_MCHDLYCR DFSDM2D4SEL LL_SYSCFG_DFSDM2_SetDataIn4Source 01044 * @param Source This parameter can be one of the following values: 01045 * @arg @ref LL_SYSCFG_DFSDM2_DataIn4_PAD 01046 * @arg @ref LL_SYSCFG_DFSDM2_DataIn4_DM 01047 * @retval None 01048 */ 01049 __STATIC_INLINE void LL_SYSCFG_DFSDM2_SetDataIn4Source(uint32_t Source) 01050 { 01051 MODIFY_REG(SYSCFG->MCHDLYCR, SYSCFG_MCHDLYCR_DFSDM2D4SEL, Source); 01052 } 01053 /** 01054 * @brief Get the source for DFSDM2 DatIn4. 01055 * @rmtoll SYSCFG_MCHDLYCR DFSDM2D4SEL LL_SYSCFG_DFSDM2_GetDataIn4Source 01056 * @retval Returned value can be one of the following values: 01057 * @arg @ref LL_SYSCFG_DFSDM2_DataIn4_PAD 01058 * @arg @ref LL_SYSCFG_DFSDM2_DataIn4_DM 01059 * @retval None 01060 */ 01061 __STATIC_INLINE uint32_t LL_SYSCFG_DFSDM2_GetDataIn4Source(void) 01062 { 01063 return (uint32_t)(READ_BIT(SYSCFG->MCHDLYCR, SYSCFG_MCHDLYCR_DFSDM2D4SEL)); 01064 } 01065 01066 /** 01067 * @brief Select the source for DFSDM2 DatIn6 01068 * @rmtoll SYSCFG_MCHDLYCR DFSDM2D6SEL LL_SYSCFG_DFSDM2_SetDataIn6Source 01069 * @param Source This parameter can be one of the following values: 01070 * @arg @ref LL_SYSCFG_DFSDM2_DataIn6_PAD 01071 * @arg @ref LL_SYSCFG_DFSDM2_DataIn6_DM 01072 * @retval None 01073 */ 01074 __STATIC_INLINE void LL_SYSCFG_DFSDM2_SetDataIn6Source(uint32_t Source) 01075 { 01076 MODIFY_REG(SYSCFG->MCHDLYCR, SYSCFG_MCHDLYCR_DFSDM2D6SEL, Source); 01077 } 01078 /** 01079 * @brief Get the source for DFSDM2 DatIn6. 01080 * @rmtoll SYSCFG_MCHDLYCR DFSDM2D6SEL LL_SYSCFG_DFSDM2_GetDataIn6Source 01081 * @retval Returned value can be one of the following values: 01082 * @arg @ref LL_SYSCFG_DFSDM2_DataIn6_PAD 01083 * @arg @ref LL_SYSCFG_DFSDM2_DataIn6_DM 01084 * @retval None 01085 */ 01086 __STATIC_INLINE uint32_t LL_SYSCFG_DFSDM2_GetDataIn6Source(void) 01087 { 01088 return (uint32_t)(READ_BIT(SYSCFG->MCHDLYCR, SYSCFG_MCHDLYCR_DFSDM2D6SEL)); 01089 } 01090 01091 /** 01092 * @brief Select the distribution of the bitsream lock gated by TIM3 OC4 01093 * @rmtoll SYSCFG_MCHDLYCR DFSDM2CK04SEL LL_SYSCFG_DFSDM2_SetTIM3OC4BitStreamDistribution 01094 * @param Source This parameter can be one of the following values: 01095 * @arg @ref LL_SYSCFG_DFSDM2_TIM3OC4_CLKIN0 01096 * @arg @ref LL_SYSCFG_DFSDM2_TIM3OC4_CLKIN4 01097 * @retval None 01098 */ 01099 __STATIC_INLINE void LL_SYSCFG_DFSDM2_SetTIM3OC4BitStreamDistribution(uint32_t Source) 01100 { 01101 MODIFY_REG(SYSCFG->MCHDLYCR, SYSCFG_MCHDLYCR_DFSDM2CK04SEL, Source); 01102 } 01103 /** 01104 * @brief Get the distribution of the bitsream lock gated by TIM3 OC4 01105 * @rmtoll SYSCFG_MCHDLYCR DFSDM2CK04SEL LL_SYSCFG_DFSDM2_GetTIM3OC4BitStreamDistribution 01106 * @retval Returned value can be one of the following values: 01107 * @arg @ref LL_SYSCFG_DFSDM2_TIM3OC4_CLKIN0 01108 * @arg @ref LL_SYSCFG_DFSDM2_TIM3OC4_CLKIN4 01109 * @retval None 01110 */ 01111 __STATIC_INLINE uint32_t LL_SYSCFG_DFSDM2_GetTIM3OC4BitStreamDistribution(void) 01112 { 01113 return (uint32_t)(READ_BIT(SYSCFG->MCHDLYCR, SYSCFG_MCHDLYCR_DFSDM2CK04SEL)); 01114 } 01115 01116 /** 01117 * @brief Select the distribution of the bitsream lock gated by TIM3 OC3 01118 * @rmtoll SYSCFG_MCHDLYCR DFSDM2CK15SEL LL_SYSCFG_DFSDM2_SetTIM3OC3BitStreamDistribution 01119 * @param Source This parameter can be one of the following values: 01120 * @arg @ref LL_SYSCFG_DFSDM2_TIM3OC3_CLKIN1 01121 * @arg @ref LL_SYSCFG_DFSDM2_TIM3OC3_CLKIN5 01122 * @retval None 01123 */ 01124 __STATIC_INLINE void LL_SYSCFG_DFSDM2_SetTIM3OC3BitStreamDistribution(uint32_t Source) 01125 { 01126 MODIFY_REG(SYSCFG->MCHDLYCR, SYSCFG_MCHDLYCR_DFSDM2CK15SEL, Source); 01127 } 01128 /** 01129 * @brief Get the distribution of the bitsream lock gated by TIM3 OC4 01130 * @rmtoll SYSCFG_MCHDLYCR DFSDM2CK04SEL LL_SYSCFG_DFSDM2_GetTIM3OC3BitStreamDistribution 01131 * @retval Returned value can be one of the following values: 01132 * @arg @ref LL_SYSCFG_DFSDM2_TIM3OC3_CLKIN1 01133 * @arg @ref LL_SYSCFG_DFSDM2_TIM3OC3_CLKIN5 01134 * @retval None 01135 */ 01136 __STATIC_INLINE uint32_t LL_SYSCFG_DFSDM2_GetTIM3OC3BitStreamDistribution(void) 01137 { 01138 return (uint32_t)(READ_BIT(SYSCFG->MCHDLYCR, SYSCFG_MCHDLYCR_DFSDM2CK15SEL)); 01139 } 01140 01141 /** 01142 * @brief Select the distribution of the bitsream lock gated by TIM3 OC2 01143 * @rmtoll SYSCFG_MCHDLYCR DFSDM2CK26SEL LL_SYSCFG_DFSDM2_SetTIM3OC2BitStreamDistribution 01144 * @param Source This parameter can be one of the following values: 01145 * @arg @ref LL_SYSCFG_DFSDM2_TIM3OC2_CLKIN2 01146 * @arg @ref LL_SYSCFG_DFSDM2_TIM3OC2_CLKIN6 01147 * @retval None 01148 */ 01149 __STATIC_INLINE void LL_SYSCFG_DFSDM2_SetTIM3OC2BitStreamDistribution(uint32_t Source) 01150 { 01151 MODIFY_REG(SYSCFG->MCHDLYCR, SYSCFG_MCHDLYCR_DFSDM2CK26SEL, Source); 01152 } 01153 /** 01154 * @brief Get the distribution of the bitsream lock gated by TIM3 OC2 01155 * @rmtoll SYSCFG_MCHDLYCR DFSDM2CK04SEL LL_SYSCFG_DFSDM2_GetTIM3OC2BitStreamDistribution 01156 * @retval Returned value can be one of the following values: 01157 * @arg @ref LL_SYSCFG_DFSDM2_TIM3OC2_CLKIN2 01158 * @arg @ref LL_SYSCFG_DFSDM2_TIM3OC2_CLKIN6 01159 * @retval None 01160 */ 01161 __STATIC_INLINE uint32_t LL_SYSCFG_DFSDM2_GetTIM3OC2BitStreamDistribution(void) 01162 { 01163 return (uint32_t)(READ_BIT(SYSCFG->MCHDLYCR, SYSCFG_MCHDLYCR_DFSDM2CK26SEL)); 01164 } 01165 01166 /** 01167 * @brief Select the distribution of the bitsream lock gated by TIM3 OC1 01168 * @rmtoll SYSCFG_MCHDLYCR DFSDM2CK37SEL LL_SYSCFG_DFSDM2_SetTIM3OC1BitStreamDistribution 01169 * @param Source This parameter can be one of the following values: 01170 * @arg @ref LL_SYSCFG_DFSDM2_TIM3OC1_CLKIN3 01171 * @arg @ref LL_SYSCFG_DFSDM2_TIM3OC1_CLKIN7 01172 * @retval None 01173 */ 01174 __STATIC_INLINE void LL_SYSCFG_DFSDM2_SetTIM3OC1BitStreamDistribution(uint32_t Source) 01175 { 01176 MODIFY_REG(SYSCFG->MCHDLYCR, SYSCFG_MCHDLYCR_DFSDM2CK37SEL, Source); 01177 } 01178 /** 01179 * @brief Get the distribution of the bitsream lock gated by TIM3 OC1 01180 * @rmtoll SYSCFG_MCHDLYCR DFSDM2CK37SEL LL_SYSCFG_DFSDM2_GetTIM3OC1BitStreamDistribution 01181 * @retval Returned value can be one of the following values: 01182 * @arg @ref LL_SYSCFG_DFSDM2_TIM3OC1_CLKIN3 01183 * @arg @ref LL_SYSCFG_DFSDM2_TIM3OC1_CLKIN7 01184 * @retval None 01185 */ 01186 __STATIC_INLINE uint32_t LL_SYSCFG_DFSDM2_GetTIM3OC1BitStreamDistribution(void) 01187 { 01188 return (uint32_t)(READ_BIT(SYSCFG->MCHDLYCR, SYSCFG_MCHDLYCR_DFSDM2CK37SEL)); 01189 } 01190 01191 /** 01192 * @brief Select the DFSDM2 Clock In 01193 * @rmtoll SYSCFG_MCHDLYCR DFSDM2CFG LL_SYSCFG_DFSDM2_SetClockInSourceSelection 01194 * @param ClockSource This parameter can be one of the following values: 01195 * @arg @ref LL_SYSCFG_DFSDM2_CKIN_PAD 01196 * @arg @ref LL_SYSCFG_DFSDM2_CKIN_DM 01197 * @retval None 01198 */ 01199 __STATIC_INLINE void LL_SYSCFG_DFSDM2_SetClockInSourceSelection(uint32_t ClockSource) 01200 { 01201 MODIFY_REG(SYSCFG->MCHDLYCR, SYSCFG_MCHDLYCR_DFSDM2CFG, ClockSource); 01202 } 01203 /** 01204 * @brief GET the DFSDM2 Clock In 01205 * @rmtoll SYSCFG_MCHDLYCR DFSDM2CFG LL_SYSCFG_DFSDM2_GetClockInSourceSelection 01206 * @retval Returned value can be one of the following values: 01207 * @arg @ref LL_SYSCFG_DFSDM2_CKIN_PAD 01208 * @arg @ref LL_SYSCFG_DFSDM2_CKIN_DM 01209 * @retval None 01210 */ 01211 __STATIC_INLINE uint32_t LL_SYSCFG_DFSDM2_GetClockInSourceSelection(void) 01212 { 01213 return (uint32_t)(READ_BIT(SYSCFG->MCHDLYCR, SYSCFG_MCHDLYCR_DFSDM2CFG)); 01214 } 01215 01216 /** 01217 * @brief Select the DFSDM2 Clock Out 01218 * @rmtoll SYSCFG_MCHDLYCR DFSDM2CKOSEL LL_SYSCFG_DFSDM2_SetClockOutSourceSelection 01219 * @param ClockSource This parameter can be one of the following values: 01220 * @arg @ref LL_SYSCFG_DFSDM2_CKOUT 01221 * @arg @ref LL_SYSCFG_DFSDM2_CKOUT_M27 01222 * @retval None 01223 */ 01224 __STATIC_INLINE void LL_SYSCFG_DFSDM2_SetClockOutSourceSelection(uint32_t ClockSource) 01225 { 01226 MODIFY_REG(SYSCFG->MCHDLYCR, SYSCFG_MCHDLYCR_DFSDM2CKOSEL, ClockSource); 01227 } 01228 /** 01229 * @brief GET the DFSDM2 Clock Out 01230 * @rmtoll SYSCFG_MCHDLYCR DFSDM2CKOSEL LL_SYSCFG_DFSDM2_GetClockOutSourceSelection 01231 * @retval Returned value can be one of the following values: 01232 * @arg @ref LL_SYSCFG_DFSDM2_CKOUT 01233 * @arg @ref LL_SYSCFG_DFSDM2_CKOUT_M27 01234 * @retval None 01235 */ 01236 __STATIC_INLINE uint32_t LL_SYSCFG_DFSDM2_GetClockOutSourceSelection(void) 01237 { 01238 return (uint32_t)(READ_BIT(SYSCFG->MCHDLYCR, SYSCFG_MCHDLYCR_DFSDM2CKOSEL)); 01239 } 01240 01241 #endif /* SYSCFG_MCHDLYCR_BSCKSEL */ 01242 /** 01243 * @} 01244 */ 01245 01246 01247 /** @defgroup SYSTEM_LL_EF_DBGMCU DBGMCU 01248 * @{ 01249 */ 01250 01251 /** 01252 * @brief Return the device identifier 01253 * @note For STM32F405/407xx and STM32F415/417xx devices, the device ID is 0x413 01254 * @note For STM32F42xxx and STM32F43xxx devices, the device ID is 0x419 01255 * @note For STM32F401xx devices, the device ID is 0x423 01256 * @note For STM32F401xx devices, the device ID is 0x433 01257 * @note For STM32F411xx devices, the device ID is 0x431 01258 * @note For STM32F410xx devices, the device ID is 0x458 01259 * @note For STM32F412xx devices, the device ID is 0x441 01260 * @note For STM32F413xx and STM32423xx devices, the device ID is 0x463 01261 * @note For STM32F446xx devices, the device ID is 0x421 01262 * @note For STM32F469xx and STM32F479xx devices, the device ID is 0x434 01263 * @rmtoll DBGMCU_IDCODE DEV_ID LL_DBGMCU_GetDeviceID 01264 * @retval Values between Min_Data=0x00 and Max_Data=0xFFF 01265 */ 01266 __STATIC_INLINE uint32_t LL_DBGMCU_GetDeviceID(void) 01267 { 01268 return (uint32_t)(READ_BIT(DBGMCU->IDCODE, DBGMCU_IDCODE_DEV_ID)); 01269 } 01270 01271 /** 01272 * @brief Return the device revision identifier 01273 * @note This field indicates the revision of the device. 01274 For example, it is read as RevA -> 0x1000, Cat 2 revZ -> 0x1001, rev1 -> 0x1003, rev2 ->0x1007, revY -> 0x100F for STM32F405/407xx and STM32F415/417xx devices 01275 For example, it is read as RevA -> 0x1000, Cat 2 revY -> 0x1003, rev1 -> 0x1007, rev3 ->0x2001 for STM32F42xxx and STM32F43xxx devices 01276 For example, it is read as RevZ -> 0x1000, Cat 2 revA -> 0x1001 for STM32F401xB/C devices 01277 For example, it is read as RevA -> 0x1000, Cat 2 revZ -> 0x1001 for STM32F401xD/E devices 01278 For example, it is read as RevA -> 0x1000 for STM32F411xx,STM32F413/423xx,STM32F469/423xx, STM32F446xx and STM32F410xx devices 01279 For example, it is read as RevZ -> 0x1001, Cat 2 revB -> 0x2000, revC -> 0x3000 for STM32F412xx devices 01280 * @rmtoll DBGMCU_IDCODE REV_ID LL_DBGMCU_GetRevisionID 01281 * @retval Values between Min_Data=0x00 and Max_Data=0xFFFF 01282 */ 01283 __STATIC_INLINE uint32_t LL_DBGMCU_GetRevisionID(void) 01284 { 01285 return (uint32_t)(READ_BIT(DBGMCU->IDCODE, DBGMCU_IDCODE_REV_ID) >> DBGMCU_IDCODE_REV_ID_Pos); 01286 } 01287 01288 /** 01289 * @brief Enable the Debug Module during SLEEP mode 01290 * @rmtoll DBGMCU_CR DBG_SLEEP LL_DBGMCU_EnableDBGSleepMode 01291 * @retval None 01292 */ 01293 __STATIC_INLINE void LL_DBGMCU_EnableDBGSleepMode(void) 01294 { 01295 SET_BIT(DBGMCU->CR, DBGMCU_CR_DBG_SLEEP); 01296 } 01297 01298 /** 01299 * @brief Disable the Debug Module during SLEEP mode 01300 * @rmtoll DBGMCU_CR DBG_SLEEP LL_DBGMCU_DisableDBGSleepMode 01301 * @retval None 01302 */ 01303 __STATIC_INLINE void LL_DBGMCU_DisableDBGSleepMode(void) 01304 { 01305 CLEAR_BIT(DBGMCU->CR, DBGMCU_CR_DBG_SLEEP); 01306 } 01307 01308 /** 01309 * @brief Enable the Debug Module during STOP mode 01310 * @rmtoll DBGMCU_CR DBG_STOP LL_DBGMCU_EnableDBGStopMode 01311 * @retval None 01312 */ 01313 __STATIC_INLINE void LL_DBGMCU_EnableDBGStopMode(void) 01314 { 01315 SET_BIT(DBGMCU->CR, DBGMCU_CR_DBG_STOP); 01316 } 01317 01318 /** 01319 * @brief Disable the Debug Module during STOP mode 01320 * @rmtoll DBGMCU_CR DBG_STOP LL_DBGMCU_DisableDBGStopMode 01321 * @retval None 01322 */ 01323 __STATIC_INLINE void LL_DBGMCU_DisableDBGStopMode(void) 01324 { 01325 CLEAR_BIT(DBGMCU->CR, DBGMCU_CR_DBG_STOP); 01326 } 01327 01328 /** 01329 * @brief Enable the Debug Module during STANDBY mode 01330 * @rmtoll DBGMCU_CR DBG_STANDBY LL_DBGMCU_EnableDBGStandbyMode 01331 * @retval None 01332 */ 01333 __STATIC_INLINE void LL_DBGMCU_EnableDBGStandbyMode(void) 01334 { 01335 SET_BIT(DBGMCU->CR, DBGMCU_CR_DBG_STANDBY); 01336 } 01337 01338 /** 01339 * @brief Disable the Debug Module during STANDBY mode 01340 * @rmtoll DBGMCU_CR DBG_STANDBY LL_DBGMCU_DisableDBGStandbyMode 01341 * @retval None 01342 */ 01343 __STATIC_INLINE void LL_DBGMCU_DisableDBGStandbyMode(void) 01344 { 01345 CLEAR_BIT(DBGMCU->CR, DBGMCU_CR_DBG_STANDBY); 01346 } 01347 01348 /** 01349 * @brief Set Trace pin assignment control 01350 * @rmtoll DBGMCU_CR TRACE_IOEN LL_DBGMCU_SetTracePinAssignment\n 01351 * DBGMCU_CR TRACE_MODE LL_DBGMCU_SetTracePinAssignment 01352 * @param PinAssignment This parameter can be one of the following values: 01353 * @arg @ref LL_DBGMCU_TRACE_NONE 01354 * @arg @ref LL_DBGMCU_TRACE_ASYNCH 01355 * @arg @ref LL_DBGMCU_TRACE_SYNCH_SIZE1 01356 * @arg @ref LL_DBGMCU_TRACE_SYNCH_SIZE2 01357 * @arg @ref LL_DBGMCU_TRACE_SYNCH_SIZE4 01358 * @retval None 01359 */ 01360 __STATIC_INLINE void LL_DBGMCU_SetTracePinAssignment(uint32_t PinAssignment) 01361 { 01362 MODIFY_REG(DBGMCU->CR, DBGMCU_CR_TRACE_IOEN | DBGMCU_CR_TRACE_MODE, PinAssignment); 01363 } 01364 01365 /** 01366 * @brief Get Trace pin assignment control 01367 * @rmtoll DBGMCU_CR TRACE_IOEN LL_DBGMCU_GetTracePinAssignment\n 01368 * DBGMCU_CR TRACE_MODE LL_DBGMCU_GetTracePinAssignment 01369 * @retval Returned value can be one of the following values: 01370 * @arg @ref LL_DBGMCU_TRACE_NONE 01371 * @arg @ref LL_DBGMCU_TRACE_ASYNCH 01372 * @arg @ref LL_DBGMCU_TRACE_SYNCH_SIZE1 01373 * @arg @ref LL_DBGMCU_TRACE_SYNCH_SIZE2 01374 * @arg @ref LL_DBGMCU_TRACE_SYNCH_SIZE4 01375 */ 01376 __STATIC_INLINE uint32_t LL_DBGMCU_GetTracePinAssignment(void) 01377 { 01378 return (uint32_t)(READ_BIT(DBGMCU->CR, DBGMCU_CR_TRACE_IOEN | DBGMCU_CR_TRACE_MODE)); 01379 } 01380 01381 /** 01382 * @brief Freeze APB1 peripherals (group1 peripherals) 01383 * @rmtoll DBGMCU_APB1_FZ DBG_TIM2_STOP LL_DBGMCU_APB1_GRP1_FreezePeriph\n 01384 * DBGMCU_APB1_FZ DBG_TIM3_STOP LL_DBGMCU_APB1_GRP1_FreezePeriph\n 01385 * DBGMCU_APB1_FZ DBG_TIM4_STOP LL_DBGMCU_APB1_GRP1_FreezePeriph\n 01386 * DBGMCU_APB1_FZ DBG_TIM5_STOP LL_DBGMCU_APB1_GRP1_FreezePeriph\n 01387 * DBGMCU_APB1_FZ DBG_TIM6_STOP LL_DBGMCU_APB1_GRP1_FreezePeriph\n 01388 * DBGMCU_APB1_FZ DBG_TIM7_STOP LL_DBGMCU_APB1_GRP1_FreezePeriph\n 01389 * DBGMCU_APB1_FZ DBG_TIM12_STOP LL_DBGMCU_APB1_GRP1_FreezePeriph\n 01390 * DBGMCU_APB1_FZ DBG_TIM13_STOP LL_DBGMCU_APB1_GRP1_FreezePeriph\n 01391 * DBGMCU_APB1_FZ DBG_TIM14_STOP LL_DBGMCU_APB1_GRP1_FreezePeriph\n 01392 * DBGMCU_APB1_FZ DBG_LPTIM_STOP LL_DBGMCU_APB1_GRP1_FreezePeriph\n 01393 * DBGMCU_APB1_FZ DBG_RTC_STOP LL_DBGMCU_APB1_GRP1_FreezePeriph\n 01394 * DBGMCU_APB1_FZ DBG_WWDG_STOP LL_DBGMCU_APB1_GRP1_FreezePeriph\n 01395 * DBGMCU_APB1_FZ DBG_IWDG_STOP LL_DBGMCU_APB1_GRP1_FreezePeriph\n 01396 * DBGMCU_APB1_FZ DBG_I2C1_SMBUS_TIMEOUT LL_DBGMCU_APB1_GRP1_FreezePeriph\n 01397 * DBGMCU_APB1_FZ DBG_I2C2_SMBUS_TIMEOUT LL_DBGMCU_APB1_GRP1_FreezePeriph\n 01398 * DBGMCU_APB1_FZ DBG_I2C3_SMBUS_TIMEOUT LL_DBGMCU_APB1_GRP1_FreezePeriph\n 01399 * DBGMCU_APB1_FZ DBG_I2C4_SMBUS_TIMEOUT LL_DBGMCU_APB1_GRP1_FreezePeriph\n 01400 * DBGMCU_APB1_FZ DBG_CAN1_STOP LL_DBGMCU_APB1_GRP1_FreezePeriph\n 01401 * DBGMCU_APB1_FZ DBG_CAN2_STOP LL_DBGMCU_APB1_GRP1_FreezePeriph\n 01402 * DBGMCU_APB1_FZ DBG_CAN3_STOP LL_DBGMCU_APB1_GRP1_FreezePeriph 01403 * @param Periphs This parameter can be a combination of the following values: 01404 * @arg @ref LL_DBGMCU_APB1_GRP1_TIM2_STOP (*) 01405 * @arg @ref LL_DBGMCU_APB1_GRP1_TIM3_STOP (*) 01406 * @arg @ref LL_DBGMCU_APB1_GRP1_TIM4_STOP (*) 01407 * @arg @ref LL_DBGMCU_APB1_GRP1_TIM5_STOP 01408 * @arg @ref LL_DBGMCU_APB1_GRP1_TIM6_STOP (*) 01409 * @arg @ref LL_DBGMCU_APB1_GRP1_TIM7_STOP (*) 01410 * @arg @ref LL_DBGMCU_APB1_GRP1_TIM12_STOP (*) 01411 * @arg @ref LL_DBGMCU_APB1_GRP1_TIM13_STOP (*) 01412 * @arg @ref LL_DBGMCU_APB1_GRP1_TIM14_STOP (*) 01413 * @arg @ref LL_DBGMCU_APB1_GRP1_LPTIM_STOP (*) 01414 * @arg @ref LL_DBGMCU_APB1_GRP1_RTC_STOP 01415 * @arg @ref LL_DBGMCU_APB1_GRP1_WWDG_STOP 01416 * @arg @ref LL_DBGMCU_APB1_GRP1_IWDG_STOP 01417 * @arg @ref LL_DBGMCU_APB1_GRP1_I2C1_STOP 01418 * @arg @ref LL_DBGMCU_APB1_GRP1_I2C2_STOP 01419 * @arg @ref LL_DBGMCU_APB1_GRP1_I2C3_STOP (*) 01420 * @arg @ref LL_DBGMCU_APB1_GRP1_I2C4_STOP (*) 01421 * @arg @ref LL_DBGMCU_APB1_GRP1_CAN1_STOP (*) 01422 * @arg @ref LL_DBGMCU_APB1_GRP1_CAN2_STOP (*) 01423 * @arg @ref LL_DBGMCU_APB1_GRP1_CAN3_STOP (*) 01424 * 01425 * (*) value not defined in all devices. 01426 * @retval None 01427 */ 01428 __STATIC_INLINE void LL_DBGMCU_APB1_GRP1_FreezePeriph(uint32_t Periphs) 01429 { 01430 SET_BIT(DBGMCU->APB1FZ, Periphs); 01431 } 01432 01433 /** 01434 * @brief Unfreeze APB1 peripherals (group1 peripherals) 01435 * @rmtoll DBGMCU_APB1_FZ DBG_TIM2_STOP LL_DBGMCU_APB1_GRP1_UnFreezePeriph\n 01436 * DBGMCU_APB1_FZ DBG_TIM3_STOP LL_DBGMCU_APB1_GRP1_UnFreezePeriph\n 01437 * DBGMCU_APB1_FZ DBG_TIM4_STOP LL_DBGMCU_APB1_GRP1_UnFreezePeriph\n 01438 * DBGMCU_APB1_FZ DBG_TIM5_STOP LL_DBGMCU_APB1_GRP1_UnFreezePeriph\n 01439 * DBGMCU_APB1_FZ DBG_TIM6_STOP LL_DBGMCU_APB1_GRP1_UnFreezePeriph\n 01440 * DBGMCU_APB1_FZ DBG_TIM7_STOP LL_DBGMCU_APB1_GRP1_UnFreezePeriph\n 01441 * DBGMCU_APB1_FZ DBG_TIM12_STOP LL_DBGMCU_APB1_GRP1_UnFreezePeriph\n 01442 * DBGMCU_APB1_FZ DBG_TIM13_STOP LL_DBGMCU_APB1_GRP1_UnFreezePeriph\n 01443 * DBGMCU_APB1_FZ DBG_TIM14_STOP LL_DBGMCU_APB1_GRP1_UnFreezePeriph\n 01444 * DBGMCU_APB1_FZ DBG_LPTIM_STOP LL_DBGMCU_APB1_GRP1_UnFreezePeriph\n 01445 * DBGMCU_APB1_FZ DBG_RTC_STOP LL_DBGMCU_APB1_GRP1_UnFreezePeriph\n 01446 * DBGMCU_APB1_FZ DBG_WWDG_STOP LL_DBGMCU_APB1_GRP1_UnFreezePeriph\n 01447 * DBGMCU_APB1_FZ DBG_IWDG_STOP LL_DBGMCU_APB1_GRP1_UnFreezePeriph\n 01448 * DBGMCU_APB1_FZ DBG_I2C1_SMBUS_TIMEOUT LL_DBGMCU_APB1_GRP1_UnFreezePeriph\n 01449 * DBGMCU_APB1_FZ DBG_I2C2_SMBUS_TIMEOUT LL_DBGMCU_APB1_GRP1_UnFreezePeriph\n 01450 * DBGMCU_APB1_FZ DBG_I2C3_SMBUS_TIMEOUT LL_DBGMCU_APB1_GRP1_UnFreezePeriph\n 01451 * DBGMCU_APB1_FZ DBG_I2C4_SMBUS_TIMEOUT LL_DBGMCU_APB1_GRP1_UnFreezePeriph\n 01452 * DBGMCU_APB1_FZ DBG_CAN1_STOP LL_DBGMCU_APB1_GRP1_UnFreezePeriph\n 01453 * DBGMCU_APB1_FZ DBG_CAN2_STOP LL_DBGMCU_APB1_GRP1_UnFreezePeriph\n 01454 * DBGMCU_APB1_FZ DBG_CAN3_STOP LL_DBGMCU_APB1_GRP1_UnFreezePeriph 01455 * @param Periphs This parameter can be a combination of the following values: 01456 * @arg @ref LL_DBGMCU_APB1_GRP1_TIM2_STOP (*) 01457 * @arg @ref LL_DBGMCU_APB1_GRP1_TIM3_STOP (*) 01458 * @arg @ref LL_DBGMCU_APB1_GRP1_TIM4_STOP (*) 01459 * @arg @ref LL_DBGMCU_APB1_GRP1_TIM5_STOP 01460 * @arg @ref LL_DBGMCU_APB1_GRP1_TIM6_STOP (*) 01461 * @arg @ref LL_DBGMCU_APB1_GRP1_TIM7_STOP (*) 01462 * @arg @ref LL_DBGMCU_APB1_GRP1_TIM12_STOP (*) 01463 * @arg @ref LL_DBGMCU_APB1_GRP1_TIM13_STOP (*) 01464 * @arg @ref LL_DBGMCU_APB1_GRP1_TIM14_STOP (*) 01465 * @arg @ref LL_DBGMCU_APB1_GRP1_LPTIM_STOP (*) 01466 * @arg @ref LL_DBGMCU_APB1_GRP1_RTC_STOP 01467 * @arg @ref LL_DBGMCU_APB1_GRP1_WWDG_STOP 01468 * @arg @ref LL_DBGMCU_APB1_GRP1_IWDG_STOP 01469 * @arg @ref LL_DBGMCU_APB1_GRP1_I2C1_STOP 01470 * @arg @ref LL_DBGMCU_APB1_GRP1_I2C2_STOP 01471 * @arg @ref LL_DBGMCU_APB1_GRP1_I2C3_STOP (*) 01472 * @arg @ref LL_DBGMCU_APB1_GRP1_I2C4_STOP (*) 01473 * @arg @ref LL_DBGMCU_APB1_GRP1_CAN1_STOP (*) 01474 * @arg @ref LL_DBGMCU_APB1_GRP1_CAN2_STOP (*) 01475 * @arg @ref LL_DBGMCU_APB1_GRP1_CAN3_STOP (*) 01476 * 01477 * (*) value not defined in all devices. 01478 * @retval None 01479 */ 01480 __STATIC_INLINE void LL_DBGMCU_APB1_GRP1_UnFreezePeriph(uint32_t Periphs) 01481 { 01482 CLEAR_BIT(DBGMCU->APB1FZ, Periphs); 01483 } 01484 01485 /** 01486 * @brief Freeze APB2 peripherals 01487 * @rmtoll DBGMCU_APB2_FZ DBG_TIM1_STOP LL_DBGMCU_APB2_GRP1_FreezePeriph\n 01488 * DBGMCU_APB2_FZ DBG_TIM8_STOP LL_DBGMCU_APB2_GRP1_FreezePeriph\n 01489 * DBGMCU_APB2_FZ DBG_TIM9_STOP LL_DBGMCU_APB2_GRP1_FreezePeriph\n 01490 * DBGMCU_APB2_FZ DBG_TIM10_STOP LL_DBGMCU_APB2_GRP1_FreezePeriph\n 01491 * DBGMCU_APB2_FZ DBG_TIM11_STOP LL_DBGMCU_APB2_GRP1_FreezePeriph 01492 * @param Periphs This parameter can be a combination of the following values: 01493 * @arg @ref LL_DBGMCU_APB2_GRP1_TIM1_STOP 01494 * @arg @ref LL_DBGMCU_APB2_GRP1_TIM8_STOP (*) 01495 * @arg @ref LL_DBGMCU_APB2_GRP1_TIM9_STOP (*) 01496 * @arg @ref LL_DBGMCU_APB2_GRP1_TIM10_STOP (*) 01497 * @arg @ref LL_DBGMCU_APB2_GRP1_TIM11_STOP (*) 01498 * 01499 * (*) value not defined in all devices. 01500 * @retval None 01501 */ 01502 __STATIC_INLINE void LL_DBGMCU_APB2_GRP1_FreezePeriph(uint32_t Periphs) 01503 { 01504 SET_BIT(DBGMCU->APB2FZ, Periphs); 01505 } 01506 01507 /** 01508 * @brief Unfreeze APB2 peripherals 01509 * @rmtoll DBGMCU_APB2_FZ DBG_TIM1_STOP LL_DBGMCU_APB2_GRP1_UnFreezePeriph\n 01510 * DBGMCU_APB2_FZ DBG_TIM8_STOP LL_DBGMCU_APB2_GRP1_UnFreezePeriph\n 01511 * DBGMCU_APB2_FZ DBG_TIM9_STOP LL_DBGMCU_APB2_GRP1_UnFreezePeriph\n 01512 * DBGMCU_APB2_FZ DBG_TIM10_STOP LL_DBGMCU_APB2_GRP1_UnFreezePeriph\n 01513 * DBGMCU_APB2_FZ DBG_TIM11_STOP LL_DBGMCU_APB2_GRP1_UnFreezePeriph 01514 * @param Periphs This parameter can be a combination of the following values: 01515 * @arg @ref LL_DBGMCU_APB2_GRP1_TIM1_STOP 01516 * @arg @ref LL_DBGMCU_APB2_GRP1_TIM8_STOP (*) 01517 * @arg @ref LL_DBGMCU_APB2_GRP1_TIM9_STOP (*) 01518 * @arg @ref LL_DBGMCU_APB2_GRP1_TIM10_STOP (*) 01519 * @arg @ref LL_DBGMCU_APB2_GRP1_TIM11_STOP (*) 01520 * 01521 * (*) value not defined in all devices. 01522 * @retval None 01523 */ 01524 __STATIC_INLINE void LL_DBGMCU_APB2_GRP1_UnFreezePeriph(uint32_t Periphs) 01525 { 01526 CLEAR_BIT(DBGMCU->APB2FZ, Periphs); 01527 } 01528 /** 01529 * @} 01530 */ 01531 01532 /** @defgroup SYSTEM_LL_EF_FLASH FLASH 01533 * @{ 01534 */ 01535 01536 /** 01537 * @brief Set FLASH Latency 01538 * @rmtoll FLASH_ACR LATENCY LL_FLASH_SetLatency 01539 * @param Latency This parameter can be one of the following values: 01540 * @arg @ref LL_FLASH_LATENCY_0 01541 * @arg @ref LL_FLASH_LATENCY_1 01542 * @arg @ref LL_FLASH_LATENCY_2 01543 * @arg @ref LL_FLASH_LATENCY_3 01544 * @arg @ref LL_FLASH_LATENCY_4 01545 * @arg @ref LL_FLASH_LATENCY_5 01546 * @arg @ref LL_FLASH_LATENCY_6 01547 * @arg @ref LL_FLASH_LATENCY_7 01548 * @arg @ref LL_FLASH_LATENCY_8 01549 * @arg @ref LL_FLASH_LATENCY_9 01550 * @arg @ref LL_FLASH_LATENCY_10 01551 * @arg @ref LL_FLASH_LATENCY_11 01552 * @arg @ref LL_FLASH_LATENCY_12 01553 * @arg @ref LL_FLASH_LATENCY_13 01554 * @arg @ref LL_FLASH_LATENCY_14 01555 * @arg @ref LL_FLASH_LATENCY_15 01556 * @retval None 01557 */ 01558 __STATIC_INLINE void LL_FLASH_SetLatency(uint32_t Latency) 01559 { 01560 MODIFY_REG(FLASH->ACR, FLASH_ACR_LATENCY, Latency); 01561 } 01562 01563 /** 01564 * @brief Get FLASH Latency 01565 * @rmtoll FLASH_ACR LATENCY LL_FLASH_GetLatency 01566 * @retval Returned value can be one of the following values: 01567 * @arg @ref LL_FLASH_LATENCY_0 01568 * @arg @ref LL_FLASH_LATENCY_1 01569 * @arg @ref LL_FLASH_LATENCY_2 01570 * @arg @ref LL_FLASH_LATENCY_3 01571 * @arg @ref LL_FLASH_LATENCY_4 01572 * @arg @ref LL_FLASH_LATENCY_5 01573 * @arg @ref LL_FLASH_LATENCY_6 01574 * @arg @ref LL_FLASH_LATENCY_7 01575 * @arg @ref LL_FLASH_LATENCY_8 01576 * @arg @ref LL_FLASH_LATENCY_9 01577 * @arg @ref LL_FLASH_LATENCY_10 01578 * @arg @ref LL_FLASH_LATENCY_11 01579 * @arg @ref LL_FLASH_LATENCY_12 01580 * @arg @ref LL_FLASH_LATENCY_13 01581 * @arg @ref LL_FLASH_LATENCY_14 01582 * @arg @ref LL_FLASH_LATENCY_15 01583 */ 01584 __STATIC_INLINE uint32_t LL_FLASH_GetLatency(void) 01585 { 01586 return (uint32_t)(READ_BIT(FLASH->ACR, FLASH_ACR_LATENCY)); 01587 } 01588 01589 /** 01590 * @brief Enable Prefetch 01591 * @rmtoll FLASH_ACR PRFTEN LL_FLASH_EnablePrefetch 01592 * @retval None 01593 */ 01594 __STATIC_INLINE void LL_FLASH_EnablePrefetch(void) 01595 { 01596 SET_BIT(FLASH->ACR, FLASH_ACR_PRFTEN); 01597 } 01598 01599 /** 01600 * @brief Disable Prefetch 01601 * @rmtoll FLASH_ACR PRFTEN LL_FLASH_DisablePrefetch 01602 * @retval None 01603 */ 01604 __STATIC_INLINE void LL_FLASH_DisablePrefetch(void) 01605 { 01606 CLEAR_BIT(FLASH->ACR, FLASH_ACR_PRFTEN); 01607 } 01608 01609 /** 01610 * @brief Check if Prefetch buffer is enabled 01611 * @rmtoll FLASH_ACR PRFTEN LL_FLASH_IsPrefetchEnabled 01612 * @retval State of bit (1 or 0). 01613 */ 01614 __STATIC_INLINE uint32_t LL_FLASH_IsPrefetchEnabled(void) 01615 { 01616 return (READ_BIT(FLASH->ACR, FLASH_ACR_PRFTEN) == (FLASH_ACR_PRFTEN)); 01617 } 01618 01619 /** 01620 * @brief Enable Instruction cache 01621 * @rmtoll FLASH_ACR ICEN LL_FLASH_EnableInstCache 01622 * @retval None 01623 */ 01624 __STATIC_INLINE void LL_FLASH_EnableInstCache(void) 01625 { 01626 SET_BIT(FLASH->ACR, FLASH_ACR_ICEN); 01627 } 01628 01629 /** 01630 * @brief Disable Instruction cache 01631 * @rmtoll FLASH_ACR ICEN LL_FLASH_DisableInstCache 01632 * @retval None 01633 */ 01634 __STATIC_INLINE void LL_FLASH_DisableInstCache(void) 01635 { 01636 CLEAR_BIT(FLASH->ACR, FLASH_ACR_ICEN); 01637 } 01638 01639 /** 01640 * @brief Enable Data cache 01641 * @rmtoll FLASH_ACR DCEN LL_FLASH_EnableDataCache 01642 * @retval None 01643 */ 01644 __STATIC_INLINE void LL_FLASH_EnableDataCache(void) 01645 { 01646 SET_BIT(FLASH->ACR, FLASH_ACR_DCEN); 01647 } 01648 01649 /** 01650 * @brief Disable Data cache 01651 * @rmtoll FLASH_ACR DCEN LL_FLASH_DisableDataCache 01652 * @retval None 01653 */ 01654 __STATIC_INLINE void LL_FLASH_DisableDataCache(void) 01655 { 01656 CLEAR_BIT(FLASH->ACR, FLASH_ACR_DCEN); 01657 } 01658 01659 /** 01660 * @brief Enable Instruction cache reset 01661 * @note bit can be written only when the instruction cache is disabled 01662 * @rmtoll FLASH_ACR ICRST LL_FLASH_EnableInstCacheReset 01663 * @retval None 01664 */ 01665 __STATIC_INLINE void LL_FLASH_EnableInstCacheReset(void) 01666 { 01667 SET_BIT(FLASH->ACR, FLASH_ACR_ICRST); 01668 } 01669 01670 /** 01671 * @brief Disable Instruction cache reset 01672 * @rmtoll FLASH_ACR ICRST LL_FLASH_DisableInstCacheReset 01673 * @retval None 01674 */ 01675 __STATIC_INLINE void LL_FLASH_DisableInstCacheReset(void) 01676 { 01677 CLEAR_BIT(FLASH->ACR, FLASH_ACR_ICRST); 01678 } 01679 01680 /** 01681 * @brief Enable Data cache reset 01682 * @note bit can be written only when the data cache is disabled 01683 * @rmtoll FLASH_ACR DCRST LL_FLASH_EnableDataCacheReset 01684 * @retval None 01685 */ 01686 __STATIC_INLINE void LL_FLASH_EnableDataCacheReset(void) 01687 { 01688 SET_BIT(FLASH->ACR, FLASH_ACR_DCRST); 01689 } 01690 01691 /** 01692 * @brief Disable Data cache reset 01693 * @rmtoll FLASH_ACR DCRST LL_FLASH_DisableDataCacheReset 01694 * @retval None 01695 */ 01696 __STATIC_INLINE void LL_FLASH_DisableDataCacheReset(void) 01697 { 01698 CLEAR_BIT(FLASH->ACR, FLASH_ACR_DCRST); 01699 } 01700 01701 01702 /** 01703 * @} 01704 */ 01705 01706 /** 01707 * @} 01708 */ 01709 01710 /** 01711 * @} 01712 */ 01713 01714 #endif /* defined (FLASH) || defined (SYSCFG) || defined (DBGMCU) */ 01715 01716 /** 01717 * @} 01718 */ 01719 01720 #ifdef __cplusplus 01721 } 01722 #endif 01723 01724 #endif /* __STM32F4xx_LL_SYSTEM_H */ 01725 01726 /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
1.7.6.1