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