STM32L443xx HAL User Manual
stm32l4xx_ll_system.h
Go to the documentation of this file.
00001 /**
00002   ******************************************************************************
00003   * @file    stm32l4xx_ll_system.h
00004   * @author  MCD Application Team
00005   * @brief   Header file of SYSTEM LL module.
00006   *
00007   ******************************************************************************
00008   * @attention
00009   *
00010   * Copyright (c) 2017 STMicroelectronics.
00011   * All rights reserved.
00012   *
00013   * This software is licensed under terms that can be found in the LICENSE file
00014   * in the root directory of this software component.
00015   * If no LICENSE file comes with this software, it is provided AS-IS.
00016   *
00017   ******************************************************************************
00018   @verbatim
00019   ==============================================================================
00020                      ##### How to use this driver #####
00021   ==============================================================================
00022     [..]
00023     The LL SYSTEM driver contains a set of generic APIs that can be
00024     used by user:
00025       (+) Some of the FLASH features need to be handled in the SYSTEM file.
00026       (+) Access to DBGCMU registers
00027       (+) Access to SYSCFG registers
00028       (+) Access to VREFBUF registers
00029 
00030   @endverbatim
00031   ******************************************************************************
00032   */
00033 
00034 /* Define to prevent recursive inclusion -------------------------------------*/
00035 #ifndef STM32L4xx_LL_SYSTEM_H
00036 #define STM32L4xx_LL_SYSTEM_H
00037 
00038 #ifdef __cplusplus
00039 extern "C" {
00040 #endif
00041 
00042 /* Includes ------------------------------------------------------------------*/
00043 #include "stm32l4xx.h"
00044 
00045 /** @addtogroup STM32L4xx_LL_Driver
00046   * @{
00047   */
00048 
00049 #if defined (FLASH) || defined (SYSCFG) || defined (DBGMCU) || defined (VREFBUF)
00050 
00051 /** @defgroup SYSTEM_LL SYSTEM
00052   * @{
00053   */
00054 
00055 /* Private types -------------------------------------------------------------*/
00056 /* Private variables ---------------------------------------------------------*/
00057 
00058 /* Private constants ---------------------------------------------------------*/
00059 /** @defgroup SYSTEM_LL_Private_Constants SYSTEM Private Constants
00060   * @{
00061   */
00062 
00063 /**
00064  * @brief Power-down in Run mode Flash key
00065  */
00066 #define FLASH_PDKEY1                  0x04152637U /*!< Flash power down key1 */
00067 #define FLASH_PDKEY2                  0xFAFBFCFDU /*!< Flash power down key2: used with FLASH_PDKEY1
00068                                                        to unlock the RUN_PD bit in FLASH_ACR */
00069 
00070 /**
00071   * @}
00072   */
00073 
00074 /* Private macros ------------------------------------------------------------*/
00075 
00076 /* Exported types ------------------------------------------------------------*/
00077 /* Exported constants --------------------------------------------------------*/
00078 /** @defgroup SYSTEM_LL_Exported_Constants SYSTEM Exported Constants
00079   * @{
00080   */
00081 
00082 /** @defgroup SYSTEM_LL_EC_REMAP SYSCFG REMAP
00083 * @{
00084 */
00085 #define LL_SYSCFG_REMAP_FLASH              0x00000000U                                           /*!< Main Flash memory mapped at 0x00000000              */
00086 #define LL_SYSCFG_REMAP_SYSTEMFLASH        SYSCFG_MEMRMP_MEM_MODE_0                              /*!< System Flash memory mapped at 0x00000000            */
00087 #define LL_SYSCFG_REMAP_SRAM               (SYSCFG_MEMRMP_MEM_MODE_1 | SYSCFG_MEMRMP_MEM_MODE_0) /*!< SRAM1 mapped at 0x00000000                          */
00088 #if defined(FMC_Bank1_R)
00089 #define LL_SYSCFG_REMAP_FMC                SYSCFG_MEMRMP_MEM_MODE_1                              /*!< FMC bank 1 (NOR/PSRAM 1 and 2) mapped at 0x00000000 */
00090 #endif /* FMC_Bank1_R */
00091 #define LL_SYSCFG_REMAP_QUADSPI            (SYSCFG_MEMRMP_MEM_MODE_2 | SYSCFG_MEMRMP_MEM_MODE_1) /*!< QUADSPI memory mapped at 0x00000000                 */
00092 /**
00093   * @}
00094   */
00095 
00096 #if defined(SYSCFG_MEMRMP_FB_MODE)
00097 /** @defgroup SYSTEM_LL_EC_BANKMODE SYSCFG BANK MODE
00098   * @{
00099   */
00100 #define LL_SYSCFG_BANKMODE_BANK1           0x00000000U               /*!< Flash Bank1 mapped at 0x08000000 (and aliased @0x00000000)
00101                                                                       and Flash Bank2 mapped at 0x08080000 (and aliased at 0x00080000) */
00102 #define LL_SYSCFG_BANKMODE_BANK2           SYSCFG_MEMRMP_FB_MODE     /*!< Flash Bank2 mapped at 0x08000000 (and aliased @0x00000000)
00103                                                                       and Flash Bank1 mapped at 0x08080000 (and aliased at 0x00080000) */
00104 /**
00105   * @}
00106   */
00107 
00108 #endif /* SYSCFG_MEMRMP_FB_MODE */
00109 /** @defgroup SYSTEM_LL_EC_I2C_FASTMODEPLUS SYSCFG I2C FASTMODEPLUS
00110   * @{
00111   */
00112 #define LL_SYSCFG_I2C_FASTMODEPLUS_PB6     SYSCFG_CFGR1_I2C_PB6_FMP  /*!< Enable Fast Mode Plus on PB6       */
00113 #define LL_SYSCFG_I2C_FASTMODEPLUS_PB7     SYSCFG_CFGR1_I2C_PB7_FMP  /*!< Enable Fast Mode Plus on PB7       */
00114 #if defined(SYSCFG_CFGR1_I2C_PB8_FMP)
00115 #define LL_SYSCFG_I2C_FASTMODEPLUS_PB8     SYSCFG_CFGR1_I2C_PB8_FMP  /*!< Enable Fast Mode Plus on PB8       */
00116 #endif /* SYSCFG_CFGR1_I2C_PB8_FMP */
00117 #if defined(SYSCFG_CFGR1_I2C_PB9_FMP)
00118 #define LL_SYSCFG_I2C_FASTMODEPLUS_PB9     SYSCFG_CFGR1_I2C_PB9_FMP  /*!< Enable Fast Mode Plus on PB9       */
00119 #endif /* SYSCFG_CFGR1_I2C_PB9_FMP */
00120 #define LL_SYSCFG_I2C_FASTMODEPLUS_I2C1    SYSCFG_CFGR1_I2C1_FMP     /*!< Enable Fast Mode Plus on I2C1 pins */
00121 #if defined(I2C2)
00122 #define LL_SYSCFG_I2C_FASTMODEPLUS_I2C2    SYSCFG_CFGR1_I2C2_FMP     /*!< Enable Fast Mode Plus on I2C2 pins */
00123 #endif /* I2C2 */
00124 #define LL_SYSCFG_I2C_FASTMODEPLUS_I2C3    SYSCFG_CFGR1_I2C3_FMP     /*!< Enable Fast Mode Plus on I2C3 pins */
00125 #if defined(I2C4)
00126 #define LL_SYSCFG_I2C_FASTMODEPLUS_I2C4    SYSCFG_CFGR1_I2C4_FMP     /*!< Enable Fast Mode Plus on I2C4 pins */
00127 #endif /* I2C4 */
00128 /**
00129   * @}
00130   */
00131 
00132 /** @defgroup SYSTEM_LL_EC_EXTI_PORT SYSCFG EXTI PORT
00133   * @{
00134   */
00135 #define LL_SYSCFG_EXTI_PORTA               0U                        /*!< EXTI PORT A                        */
00136 #define LL_SYSCFG_EXTI_PORTB               1U                        /*!< EXTI PORT B                        */
00137 #define LL_SYSCFG_EXTI_PORTC               2U                        /*!< EXTI PORT C                        */
00138 #define LL_SYSCFG_EXTI_PORTD               3U                        /*!< EXTI PORT D                        */
00139 #define LL_SYSCFG_EXTI_PORTE               4U                        /*!< EXTI PORT E                        */
00140 #if defined(GPIOF)
00141 #define LL_SYSCFG_EXTI_PORTF               5U                        /*!< EXTI PORT F                        */
00142 #endif /* GPIOF */
00143 #if defined(GPIOG)
00144 #define LL_SYSCFG_EXTI_PORTG               6U                        /*!< EXTI PORT G                        */
00145 #endif /* GPIOG */
00146 #define LL_SYSCFG_EXTI_PORTH               7U                        /*!< EXTI PORT H                        */
00147 #if defined(GPIOI)
00148 #define LL_SYSCFG_EXTI_PORTI               8U                        /*!< EXTI PORT I                        */
00149 #endif /* GPIOI */
00150 /**
00151   * @}
00152   */
00153 
00154 /** @defgroup SYSTEM_LL_EC_EXTI_LINE SYSCFG EXTI LINE
00155   * @{
00156   */
00157 #define LL_SYSCFG_EXTI_LINE0               (uint32_t)(0x000FU << 16U | 0U)  /* !< EXTI_POSITION_0  | EXTICR[0] */
00158 #define LL_SYSCFG_EXTI_LINE1               (uint32_t)(0x00F0U << 16U | 0U)  /* !< EXTI_POSITION_4  | EXTICR[0] */
00159 #define LL_SYSCFG_EXTI_LINE2               (uint32_t)(0x0F00U << 16U | 0U)  /* !< EXTI_POSITION_8  | EXTICR[0] */
00160 #define LL_SYSCFG_EXTI_LINE3               (uint32_t)(0xF000U << 16U | 0U)  /* !< EXTI_POSITION_12 | EXTICR[0] */
00161 #define LL_SYSCFG_EXTI_LINE4               (uint32_t)(0x000FU << 16U | 1U)  /* !< EXTI_POSITION_0  | EXTICR[1] */
00162 #define LL_SYSCFG_EXTI_LINE5               (uint32_t)(0x00F0U << 16U | 1U)  /* !< EXTI_POSITION_4  | EXTICR[1] */
00163 #define LL_SYSCFG_EXTI_LINE6               (uint32_t)(0x0F00U << 16U | 1U)  /* !< EXTI_POSITION_8  | EXTICR[1] */
00164 #define LL_SYSCFG_EXTI_LINE7               (uint32_t)(0xF000U << 16U | 1U)  /* !< EXTI_POSITION_12 | EXTICR[1] */
00165 #define LL_SYSCFG_EXTI_LINE8               (uint32_t)(0x000FU << 16U | 2U)  /* !< EXTI_POSITION_0  | EXTICR[2] */
00166 #define LL_SYSCFG_EXTI_LINE9               (uint32_t)(0x00F0U << 16U | 2U)  /* !< EXTI_POSITION_4  | EXTICR[2] */
00167 #define LL_SYSCFG_EXTI_LINE10              (uint32_t)(0x0F00U << 16U | 2U)  /* !< EXTI_POSITION_8  | EXTICR[2] */
00168 #define LL_SYSCFG_EXTI_LINE11              (uint32_t)(0xF000U << 16U | 2U)  /* !< EXTI_POSITION_12 | EXTICR[2] */
00169 #define LL_SYSCFG_EXTI_LINE12              (uint32_t)(0x000FU << 16U | 3U)  /* !< EXTI_POSITION_0  | EXTICR[3] */
00170 #define LL_SYSCFG_EXTI_LINE13              (uint32_t)(0x00F0U << 16U | 3U)  /* !< EXTI_POSITION_4  | EXTICR[3] */
00171 #define LL_SYSCFG_EXTI_LINE14              (uint32_t)(0x0F00U << 16U | 3U)  /* !< EXTI_POSITION_8  | EXTICR[3] */
00172 #define LL_SYSCFG_EXTI_LINE15              (uint32_t)(0xF000U << 16U | 3U)  /* !< EXTI_POSITION_12 | EXTICR[3] */
00173 /**
00174   * @}
00175   */
00176 
00177 /** @defgroup SYSTEM_LL_EC_TIMBREAK SYSCFG TIMER BREAK
00178   * @{
00179   */
00180 #define LL_SYSCFG_TIMBREAK_ECC             SYSCFG_CFGR2_ECCL  /*!< Enables and locks the ECC error signal
00181                                                                    with Break Input of TIM1/8/15/16/17                           */
00182 #define LL_SYSCFG_TIMBREAK_PVD             SYSCFG_CFGR2_PVDL  /*!< Enables and locks the PVD connection
00183                                                                    with TIM1/8/15/16/17 Break Input
00184                                                                    and also the PVDE and PLS bits of the Power Control Interface */
00185 #define LL_SYSCFG_TIMBREAK_SRAM2_PARITY    SYSCFG_CFGR2_SPL   /*!< Enables and locks the SRAM2_PARITY error signal
00186                                                                    with Break Input of TIM1/8/15/16/17                           */
00187 #define LL_SYSCFG_TIMBREAK_LOCKUP          SYSCFG_CFGR2_CLL   /*!< Enables and locks the LOCKUP output of CortexM4
00188                                                                    with Break Input of TIM1/15/16/17                             */
00189 /**
00190   * @}
00191   */
00192 
00193 /** @defgroup SYSTEM_LL_EC_SRAM2WRP SYSCFG SRAM2 WRP
00194   * @{
00195   */
00196 #define LL_SYSCFG_SRAM2WRP_PAGE0           SYSCFG_SWPR_PAGE0  /*!< SRAM2 Write protection page 0  */
00197 #define LL_SYSCFG_SRAM2WRP_PAGE1           SYSCFG_SWPR_PAGE1  /*!< SRAM2 Write protection page 1  */
00198 #define LL_SYSCFG_SRAM2WRP_PAGE2           SYSCFG_SWPR_PAGE2  /*!< SRAM2 Write protection page 2  */
00199 #define LL_SYSCFG_SRAM2WRP_PAGE3           SYSCFG_SWPR_PAGE3  /*!< SRAM2 Write protection page 3  */
00200 #define LL_SYSCFG_SRAM2WRP_PAGE4           SYSCFG_SWPR_PAGE4  /*!< SRAM2 Write protection page 4  */
00201 #define LL_SYSCFG_SRAM2WRP_PAGE5           SYSCFG_SWPR_PAGE5  /*!< SRAM2 Write protection page 5  */
00202 #define LL_SYSCFG_SRAM2WRP_PAGE6           SYSCFG_SWPR_PAGE6  /*!< SRAM2 Write protection page 6  */
00203 #define LL_SYSCFG_SRAM2WRP_PAGE7           SYSCFG_SWPR_PAGE7  /*!< SRAM2 Write protection page 7  */
00204 #define LL_SYSCFG_SRAM2WRP_PAGE8           SYSCFG_SWPR_PAGE8  /*!< SRAM2 Write protection page 8  */
00205 #define LL_SYSCFG_SRAM2WRP_PAGE9           SYSCFG_SWPR_PAGE9  /*!< SRAM2 Write protection page 9  */
00206 #define LL_SYSCFG_SRAM2WRP_PAGE10          SYSCFG_SWPR_PAGE10 /*!< SRAM2 Write protection page 10 */
00207 #define LL_SYSCFG_SRAM2WRP_PAGE11          SYSCFG_SWPR_PAGE11 /*!< SRAM2 Write protection page 11 */
00208 #define LL_SYSCFG_SRAM2WRP_PAGE12          SYSCFG_SWPR_PAGE12 /*!< SRAM2 Write protection page 12 */
00209 #define LL_SYSCFG_SRAM2WRP_PAGE13          SYSCFG_SWPR_PAGE13 /*!< SRAM2 Write protection page 13 */
00210 #define LL_SYSCFG_SRAM2WRP_PAGE14          SYSCFG_SWPR_PAGE14 /*!< SRAM2 Write protection page 14 */
00211 #define LL_SYSCFG_SRAM2WRP_PAGE15          SYSCFG_SWPR_PAGE15 /*!< SRAM2 Write protection page 15 */
00212 #if defined(SYSCFG_SWPR_PAGE31)
00213 #define LL_SYSCFG_SRAM2WRP_PAGE16          SYSCFG_SWPR_PAGE16 /*!< SRAM2 Write protection page 16 */
00214 #define LL_SYSCFG_SRAM2WRP_PAGE17          SYSCFG_SWPR_PAGE17 /*!< SRAM2 Write protection page 17 */
00215 #define LL_SYSCFG_SRAM2WRP_PAGE18          SYSCFG_SWPR_PAGE18 /*!< SRAM2 Write protection page 18 */
00216 #define LL_SYSCFG_SRAM2WRP_PAGE19          SYSCFG_SWPR_PAGE19 /*!< SRAM2 Write protection page 19 */
00217 #define LL_SYSCFG_SRAM2WRP_PAGE20          SYSCFG_SWPR_PAGE20 /*!< SRAM2 Write protection page 20 */
00218 #define LL_SYSCFG_SRAM2WRP_PAGE21          SYSCFG_SWPR_PAGE21 /*!< SRAM2 Write protection page 21 */
00219 #define LL_SYSCFG_SRAM2WRP_PAGE22          SYSCFG_SWPR_PAGE22 /*!< SRAM2 Write protection page 22 */
00220 #define LL_SYSCFG_SRAM2WRP_PAGE23          SYSCFG_SWPR_PAGE23 /*!< SRAM2 Write protection page 23 */
00221 #define LL_SYSCFG_SRAM2WRP_PAGE24          SYSCFG_SWPR_PAGE24 /*!< SRAM2 Write protection page 24 */
00222 #define LL_SYSCFG_SRAM2WRP_PAGE25          SYSCFG_SWPR_PAGE25 /*!< SRAM2 Write protection page 25 */
00223 #define LL_SYSCFG_SRAM2WRP_PAGE26          SYSCFG_SWPR_PAGE26 /*!< SRAM2 Write protection page 26 */
00224 #define LL_SYSCFG_SRAM2WRP_PAGE27          SYSCFG_SWPR_PAGE27 /*!< SRAM2 Write protection page 27 */
00225 #define LL_SYSCFG_SRAM2WRP_PAGE28          SYSCFG_SWPR_PAGE28 /*!< SRAM2 Write protection page 28 */
00226 #define LL_SYSCFG_SRAM2WRP_PAGE29          SYSCFG_SWPR_PAGE29 /*!< SRAM2 Write protection page 29 */
00227 #define LL_SYSCFG_SRAM2WRP_PAGE30          SYSCFG_SWPR_PAGE30 /*!< SRAM2 Write protection page 30 */
00228 #define LL_SYSCFG_SRAM2WRP_PAGE31          SYSCFG_SWPR_PAGE31 /*!< SRAM2 Write protection page 31 */
00229 #endif /* SYSCFG_SWPR_PAGE31 */
00230 #if defined(SYSCFG_SWPR2_PAGE63)
00231 #define LL_SYSCFG_SRAM2WRP_PAGE32          SYSCFG_SWPR2_PAGE32 /*!< SRAM2 Write protection page 32 */
00232 #define LL_SYSCFG_SRAM2WRP_PAGE33          SYSCFG_SWPR2_PAGE33 /*!< SRAM2 Write protection page 33 */
00233 #define LL_SYSCFG_SRAM2WRP_PAGE34          SYSCFG_SWPR2_PAGE34 /*!< SRAM2 Write protection page 34 */
00234 #define LL_SYSCFG_SRAM2WRP_PAGE35          SYSCFG_SWPR2_PAGE35 /*!< SRAM2 Write protection page 35 */
00235 #define LL_SYSCFG_SRAM2WRP_PAGE36          SYSCFG_SWPR2_PAGE36 /*!< SRAM2 Write protection page 36 */
00236 #define LL_SYSCFG_SRAM2WRP_PAGE37          SYSCFG_SWPR2_PAGE37 /*!< SRAM2 Write protection page 37 */
00237 #define LL_SYSCFG_SRAM2WRP_PAGE38          SYSCFG_SWPR2_PAGE38 /*!< SRAM2 Write protection page 38 */
00238 #define LL_SYSCFG_SRAM2WRP_PAGE39          SYSCFG_SWPR2_PAGE39 /*!< SRAM2 Write protection page 39 */
00239 #define LL_SYSCFG_SRAM2WRP_PAGE40          SYSCFG_SWPR2_PAGE40 /*!< SRAM2 Write protection page 40 */
00240 #define LL_SYSCFG_SRAM2WRP_PAGE41          SYSCFG_SWPR2_PAGE41 /*!< SRAM2 Write protection page 41 */
00241 #define LL_SYSCFG_SRAM2WRP_PAGE42          SYSCFG_SWPR2_PAGE42 /*!< SRAM2 Write protection page 42 */
00242 #define LL_SYSCFG_SRAM2WRP_PAGE43          SYSCFG_SWPR2_PAGE43 /*!< SRAM2 Write protection page 43 */
00243 #define LL_SYSCFG_SRAM2WRP_PAGE44          SYSCFG_SWPR2_PAGE44 /*!< SRAM2 Write protection page 44 */
00244 #define LL_SYSCFG_SRAM2WRP_PAGE45          SYSCFG_SWPR2_PAGE45 /*!< SRAM2 Write protection page 45 */
00245 #define LL_SYSCFG_SRAM2WRP_PAGE46          SYSCFG_SWPR2_PAGE46 /*!< SRAM2 Write protection page 46 */
00246 #define LL_SYSCFG_SRAM2WRP_PAGE47          SYSCFG_SWPR2_PAGE47 /*!< SRAM2 Write protection page 47 */
00247 #define LL_SYSCFG_SRAM2WRP_PAGE48          SYSCFG_SWPR2_PAGE48 /*!< SRAM2 Write protection page 48 */
00248 #define LL_SYSCFG_SRAM2WRP_PAGE49          SYSCFG_SWPR2_PAGE49 /*!< SRAM2 Write protection page 49 */
00249 #define LL_SYSCFG_SRAM2WRP_PAGE50          SYSCFG_SWPR2_PAGE50 /*!< SRAM2 Write protection page 50 */
00250 #define LL_SYSCFG_SRAM2WRP_PAGE51          SYSCFG_SWPR2_PAGE51 /*!< SRAM2 Write protection page 51 */
00251 #define LL_SYSCFG_SRAM2WRP_PAGE52          SYSCFG_SWPR2_PAGE52 /*!< SRAM2 Write protection page 52 */
00252 #define LL_SYSCFG_SRAM2WRP_PAGE53          SYSCFG_SWPR2_PAGE53 /*!< SRAM2 Write protection page 53 */
00253 #define LL_SYSCFG_SRAM2WRP_PAGE54          SYSCFG_SWPR2_PAGE54 /*!< SRAM2 Write protection page 54 */
00254 #define LL_SYSCFG_SRAM2WRP_PAGE55          SYSCFG_SWPR2_PAGE55 /*!< SRAM2 Write protection page 55 */
00255 #define LL_SYSCFG_SRAM2WRP_PAGE56          SYSCFG_SWPR2_PAGE56 /*!< SRAM2 Write protection page 56 */
00256 #define LL_SYSCFG_SRAM2WRP_PAGE57          SYSCFG_SWPR2_PAGE57 /*!< SRAM2 Write protection page 57 */
00257 #define LL_SYSCFG_SRAM2WRP_PAGE58          SYSCFG_SWPR2_PAGE58 /*!< SRAM2 Write protection page 58 */
00258 #define LL_SYSCFG_SRAM2WRP_PAGE59          SYSCFG_SWPR2_PAGE59 /*!< SRAM2 Write protection page 59 */
00259 #define LL_SYSCFG_SRAM2WRP_PAGE60          SYSCFG_SWPR2_PAGE60 /*!< SRAM2 Write protection page 60 */
00260 #define LL_SYSCFG_SRAM2WRP_PAGE61          SYSCFG_SWPR2_PAGE61 /*!< SRAM2 Write protection page 61 */
00261 #define LL_SYSCFG_SRAM2WRP_PAGE62          SYSCFG_SWPR2_PAGE62 /*!< SRAM2 Write protection page 62 */
00262 #define LL_SYSCFG_SRAM2WRP_PAGE63          SYSCFG_SWPR2_PAGE63 /*!< SRAM2 Write protection page 63 */
00263 #endif /* SYSCFG_SWPR2_PAGE63 */
00264 /**
00265   * @}
00266   */
00267 
00268 /** @defgroup SYSTEM_LL_EC_TRACE DBGMCU TRACE Pin Assignment
00269   * @{
00270   */
00271 #define LL_DBGMCU_TRACE_NONE               0x00000000U                                     /*!< TRACE pins not assigned (default state) */
00272 #define LL_DBGMCU_TRACE_ASYNCH             DBGMCU_CR_TRACE_IOEN                            /*!< TRACE pin assignment for Asynchronous Mode */
00273 #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 */
00274 #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 */
00275 #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 */
00276 /**
00277   * @}
00278   */
00279 
00280 /** @defgroup SYSTEM_LL_EC_APB1_GRP1_STOP_IP DBGMCU APB1 GRP1 STOP IP
00281   * @{
00282   */
00283 #define LL_DBGMCU_APB1_GRP1_TIM2_STOP      DBGMCU_APB1FZR1_DBG_TIM2_STOP   /*!< The counter clock of TIM2 is stopped when the core is halted*/
00284 #if defined(TIM3)
00285 #define LL_DBGMCU_APB1_GRP1_TIM3_STOP      DBGMCU_APB1FZR1_DBG_TIM3_STOP   /*!< The counter clock of TIM3 is stopped when the core is halted*/
00286 #endif /* TIM3 */
00287 #if defined(TIM4)
00288 #define LL_DBGMCU_APB1_GRP1_TIM4_STOP      DBGMCU_APB1FZR1_DBG_TIM4_STOP   /*!< The counter clock of TIM4 is stopped when the core is halted*/
00289 #endif /* TIM4 */
00290 #if defined(TIM5)
00291 #define LL_DBGMCU_APB1_GRP1_TIM5_STOP      DBGMCU_APB1FZR1_DBG_TIM5_STOP   /*!< The counter clock of TIM5 is stopped when the core is halted*/
00292 #endif /* TIM5 */
00293 #define LL_DBGMCU_APB1_GRP1_TIM6_STOP      DBGMCU_APB1FZR1_DBG_TIM6_STOP   /*!< The counter clock of TIM6 is stopped when the core is halted*/
00294 #if defined(TIM7)
00295 #define LL_DBGMCU_APB1_GRP1_TIM7_STOP      DBGMCU_APB1FZR1_DBG_TIM7_STOP   /*!< The counter clock of TIM7 is stopped when the core is halted*/
00296 #endif /* TIM7 */
00297 #define LL_DBGMCU_APB1_GRP1_RTC_STOP       DBGMCU_APB1FZR1_DBG_RTC_STOP    /*!< The clock of the RTC counter is stopped when the core is halted*/
00298 #define LL_DBGMCU_APB1_GRP1_WWDG_STOP      DBGMCU_APB1FZR1_DBG_WWDG_STOP   /*!< The window watchdog counter clock is stopped when the core is halted*/
00299 #define LL_DBGMCU_APB1_GRP1_IWDG_STOP      DBGMCU_APB1FZR1_DBG_IWDG_STOP   /*!< The independent watchdog counter clock is stopped when the core is halted*/
00300 #define LL_DBGMCU_APB1_GRP1_I2C1_STOP      DBGMCU_APB1FZR1_DBG_I2C1_STOP   /*!< The I2C1 SMBus timeout is frozen*/
00301 #if defined(I2C2)
00302 #define LL_DBGMCU_APB1_GRP1_I2C2_STOP      DBGMCU_APB1FZR1_DBG_I2C2_STOP   /*!< The I2C2 SMBus timeout is frozen*/
00303 #endif /* I2C2 */
00304 #define LL_DBGMCU_APB1_GRP1_I2C3_STOP      DBGMCU_APB1FZR1_DBG_I2C3_STOP   /*!< The I2C3 SMBus timeout is frozen*/
00305 #define LL_DBGMCU_APB1_GRP1_CAN_STOP       DBGMCU_APB1FZR1_DBG_CAN_STOP    /*!< The bxCAN receive registers are frozen*/
00306 #if defined(CAN2)
00307 #define LL_DBGMCU_APB1_GRP1_CAN2_STOP      DBGMCU_APB1FZR1_DBG_CAN2_STOP   /*!< The bxCAN2 receive registers are frozen*/
00308 #endif /* CAN2 */
00309 #define LL_DBGMCU_APB1_GRP1_LPTIM1_STOP    DBGMCU_APB1FZR1_DBG_LPTIM1_STOP /*!< The counter clock of LPTIM1 is stopped when the core is halted*/
00310 /**
00311   * @}
00312   */
00313 
00314 /** @defgroup SYSTEM_LL_EC_APB1_GRP2_STOP_IP DBGMCU APB1 GRP2 STOP IP
00315   * @{
00316   */
00317 #if defined(I2C4)
00318 #define LL_DBGMCU_APB1_GRP2_I2C4_STOP      DBGMCU_APB1FZR2_DBG_I2C4_STOP   /*!< The I2C4 SMBus timeout is frozen*/
00319 #endif /* I2C4 */
00320 #define LL_DBGMCU_APB1_GRP2_LPTIM2_STOP    DBGMCU_APB1FZR2_DBG_LPTIM2_STOP /*!< The counter clock of LPTIM2 is stopped when the core is halted*/
00321 /**
00322   * @}
00323   */
00324 
00325 /** @defgroup SYSTEM_LL_EC_APB2_GRP1_STOP_IP DBGMCU APB2 GRP1 STOP IP
00326   * @{
00327   */
00328 #define LL_DBGMCU_APB2_GRP1_TIM1_STOP      DBGMCU_APB2FZ_DBG_TIM1_STOP     /*!< The counter clock of TIM1 is stopped when the core is halted*/
00329 #if defined(TIM8)
00330 #define LL_DBGMCU_APB2_GRP1_TIM8_STOP      DBGMCU_APB2FZ_DBG_TIM8_STOP     /*!< The counter clock of TIM8 is stopped when the core is halted*/
00331 #endif /* TIM8 */
00332 #define LL_DBGMCU_APB2_GRP1_TIM15_STOP     DBGMCU_APB2FZ_DBG_TIM15_STOP    /*!< The counter clock of TIM15 is stopped when the core is halted*/
00333 #define LL_DBGMCU_APB2_GRP1_TIM16_STOP     DBGMCU_APB2FZ_DBG_TIM16_STOP    /*!< The counter clock of TIM16 is stopped when the core is halted*/
00334 #if defined(TIM17)
00335 #define LL_DBGMCU_APB2_GRP1_TIM17_STOP     DBGMCU_APB2FZ_DBG_TIM17_STOP    /*!< The counter clock of TIM17 is stopped when the core is halted*/
00336 #endif /* TIM17 */
00337 /**
00338   * @}
00339   */
00340 
00341 #if defined(VREFBUF)
00342 /** @defgroup SYSTEM_LL_EC_VOLTAGE VREFBUF VOLTAGE
00343   * @{
00344   */
00345 #define LL_VREFBUF_VOLTAGE_SCALE0          ((uint32_t)0x00000000) /*!< Voltage reference scale 0 (VREF_OUT1) */
00346 #define LL_VREFBUF_VOLTAGE_SCALE1          VREFBUF_CSR_VRS        /*!< Voltage reference scale 1 (VREF_OUT2) */
00347 /**
00348   * @}
00349   */
00350 #endif /* VREFBUF */
00351 
00352 /** @defgroup SYSTEM_LL_EC_LATENCY FLASH LATENCY
00353   * @{
00354   */
00355 #define LL_FLASH_LATENCY_0                 FLASH_ACR_LATENCY_0WS   /*!< FLASH Zero wait state */
00356 #define LL_FLASH_LATENCY_1                 FLASH_ACR_LATENCY_1WS   /*!< FLASH One wait state */
00357 #define LL_FLASH_LATENCY_2                 FLASH_ACR_LATENCY_2WS   /*!< FLASH Two wait states */
00358 #define LL_FLASH_LATENCY_3                 FLASH_ACR_LATENCY_3WS   /*!< FLASH Three wait states */
00359 #define LL_FLASH_LATENCY_4                 FLASH_ACR_LATENCY_4WS   /*!< FLASH Four wait states */
00360 #if defined(FLASH_ACR_LATENCY_5WS)
00361 #define LL_FLASH_LATENCY_5                 FLASH_ACR_LATENCY_5WS   /*!< FLASH five wait state */
00362 #define LL_FLASH_LATENCY_6                 FLASH_ACR_LATENCY_6WS   /*!< FLASH six wait state */
00363 #define LL_FLASH_LATENCY_7                 FLASH_ACR_LATENCY_7WS   /*!< FLASH seven wait states */
00364 #define LL_FLASH_LATENCY_8                 FLASH_ACR_LATENCY_8WS   /*!< FLASH eight wait states */
00365 #define LL_FLASH_LATENCY_9                 FLASH_ACR_LATENCY_9WS   /*!< FLASH nine wait states */
00366 #define LL_FLASH_LATENCY_10                FLASH_ACR_LATENCY_10WS  /*!< FLASH ten wait states */
00367 #define LL_FLASH_LATENCY_11                FLASH_ACR_LATENCY_11WS  /*!< FLASH eleven wait states */
00368 #define LL_FLASH_LATENCY_12                FLASH_ACR_LATENCY_12WS  /*!< FLASH twelve wait states */
00369 #define LL_FLASH_LATENCY_13                FLASH_ACR_LATENCY_13WS  /*!< FLASH thirteen wait states */
00370 #define LL_FLASH_LATENCY_14                FLASH_ACR_LATENCY_14WS  /*!< FLASH fourteen wait states */
00371 #define LL_FLASH_LATENCY_15                FLASH_ACR_LATENCY_15WS  /*!< FLASH fifteen wait states */
00372 #endif
00373 /**
00374   * @}
00375   */
00376 
00377 /**
00378   * @}
00379   */
00380 
00381 /* Exported macro ------------------------------------------------------------*/
00382 
00383 /* Exported functions --------------------------------------------------------*/
00384 /** @defgroup SYSTEM_LL_Exported_Functions SYSTEM Exported Functions
00385   * @{
00386   */
00387 
00388 /** @defgroup SYSTEM_LL_EF_SYSCFG SYSCFG
00389   * @{
00390   */
00391 
00392 /**
00393   * @brief  Set memory mapping at address 0x00000000
00394   * @rmtoll SYSCFG_MEMRMP MEM_MODE      LL_SYSCFG_SetRemapMemory
00395   * @param  Memory This parameter can be one of the following values:
00396   *         @arg @ref LL_SYSCFG_REMAP_FLASH
00397   *         @arg @ref LL_SYSCFG_REMAP_SYSTEMFLASH
00398   *         @arg @ref LL_SYSCFG_REMAP_SRAM
00399   *         @arg @ref LL_SYSCFG_REMAP_FMC (*)
00400   *         @arg @ref LL_SYSCFG_REMAP_QUADSPI
00401   *
00402   *         (*) value not defined in all devices
00403   * @retval None
00404   */
00405 __STATIC_INLINE void LL_SYSCFG_SetRemapMemory(uint32_t Memory)
00406 {
00407   MODIFY_REG(SYSCFG->MEMRMP, SYSCFG_MEMRMP_MEM_MODE, Memory);
00408 }
00409 
00410 /**
00411   * @brief  Get memory mapping at address 0x00000000
00412   * @rmtoll SYSCFG_MEMRMP MEM_MODE      LL_SYSCFG_GetRemapMemory
00413   * @retval Returned value can be one of the following values:
00414   *         @arg @ref LL_SYSCFG_REMAP_FLASH
00415   *         @arg @ref LL_SYSCFG_REMAP_SYSTEMFLASH
00416   *         @arg @ref LL_SYSCFG_REMAP_SRAM
00417   *         @arg @ref LL_SYSCFG_REMAP_FMC (*)
00418   *         @arg @ref LL_SYSCFG_REMAP_QUADSPI
00419   *
00420   *         (*) value not defined in all devices
00421   */
00422 __STATIC_INLINE uint32_t LL_SYSCFG_GetRemapMemory(void)
00423 {
00424   return (uint32_t)(READ_BIT(SYSCFG->MEMRMP, SYSCFG_MEMRMP_MEM_MODE));
00425 }
00426 
00427 #if defined(SYSCFG_MEMRMP_FB_MODE)
00428 /**
00429   * @brief  Select Flash bank mode (Bank flashed at 0x08000000)
00430   * @rmtoll SYSCFG_MEMRMP FB_MODE       LL_SYSCFG_SetFlashBankMode
00431   * @param  Bank This parameter can be one of the following values:
00432   *         @arg @ref LL_SYSCFG_BANKMODE_BANK1
00433   *         @arg @ref LL_SYSCFG_BANKMODE_BANK2
00434   * @retval None
00435   */
00436 __STATIC_INLINE void LL_SYSCFG_SetFlashBankMode(uint32_t Bank)
00437 {
00438   MODIFY_REG(SYSCFG->MEMRMP, SYSCFG_MEMRMP_FB_MODE, Bank);
00439 }
00440 
00441 /**
00442   * @brief  Get Flash bank mode (Bank flashed at 0x08000000)
00443   * @rmtoll SYSCFG_MEMRMP FB_MODE       LL_SYSCFG_GetFlashBankMode
00444   * @retval Returned value can be one of the following values:
00445   *         @arg @ref LL_SYSCFG_BANKMODE_BANK1
00446   *         @arg @ref LL_SYSCFG_BANKMODE_BANK2
00447   */
00448 __STATIC_INLINE uint32_t LL_SYSCFG_GetFlashBankMode(void)
00449 {
00450   return (uint32_t)(READ_BIT(SYSCFG->MEMRMP, SYSCFG_MEMRMP_FB_MODE));
00451 }
00452 #endif /* SYSCFG_MEMRMP_FB_MODE */
00453 
00454 /**
00455   * @brief  Firewall protection enabled
00456   * @rmtoll SYSCFG_CFGR1 FWDIS         LL_SYSCFG_EnableFirewall
00457   * @retval None
00458   */
00459 __STATIC_INLINE void LL_SYSCFG_EnableFirewall(void)
00460 {
00461   CLEAR_BIT(SYSCFG->CFGR1, SYSCFG_CFGR1_FWDIS);
00462 }
00463 
00464 /**
00465   * @brief  Check if Firewall protection is enabled or not
00466   * @rmtoll SYSCFG_CFGR1 FWDIS         LL_SYSCFG_IsEnabledFirewall
00467   * @retval State of bit (1 or 0).
00468   */
00469 __STATIC_INLINE uint32_t LL_SYSCFG_IsEnabledFirewall(void)
00470 {
00471   return !(READ_BIT(SYSCFG->CFGR1, SYSCFG_CFGR1_FWDIS) == SYSCFG_CFGR1_FWDIS);
00472 }
00473 
00474 /**
00475   * @brief  Enable I/O analog switch voltage booster.
00476   * @note   When voltage booster is enabled, I/O analog switches are supplied
00477   *         by a dedicated voltage booster, from VDD power domain. This is
00478   *         the recommended configuration with low VDDA voltage operation.
00479   * @note   The I/O analog switch voltage booster is relevant for peripherals
00480   *         using I/O in analog input: ADC, COMP, OPAMP.
00481   *         However, COMP and OPAMP inputs have a high impedance and
00482   *         voltage booster do not impact performance significantly.
00483   *         Therefore, the voltage booster is mainly intended for
00484   *         usage with ADC.
00485   * @rmtoll SYSCFG_CFGR1 BOOSTEN       LL_SYSCFG_EnableAnalogBooster
00486   * @retval None
00487   */
00488 __STATIC_INLINE void LL_SYSCFG_EnableAnalogBooster(void)
00489 {
00490   SET_BIT(SYSCFG->CFGR1, SYSCFG_CFGR1_BOOSTEN);
00491 }
00492 
00493 /**
00494   * @brief  Disable I/O analog switch voltage booster.
00495   * @note   When voltage booster is enabled, I/O analog switches are supplied
00496   *         by a dedicated voltage booster, from VDD power domain. This is
00497   *         the recommended configuration with low VDDA voltage operation.
00498   * @note   The I/O analog switch voltage booster is relevant for peripherals
00499   *         using I/O in analog input: ADC, COMP, OPAMP.
00500   *         However, COMP and OPAMP inputs have a high impedance and
00501   *         voltage booster do not impact performance significantly.
00502   *         Therefore, the voltage booster is mainly intended for
00503   *         usage with ADC.
00504   * @rmtoll SYSCFG_CFGR1 BOOSTEN       LL_SYSCFG_DisableAnalogBooster
00505   * @retval None
00506   */
00507 __STATIC_INLINE void LL_SYSCFG_DisableAnalogBooster(void)
00508 {
00509   CLEAR_BIT(SYSCFG->CFGR1, SYSCFG_CFGR1_BOOSTEN);
00510 }
00511 
00512 /**
00513   * @brief  Enable the I2C fast mode plus driving capability.
00514   * @rmtoll SYSCFG_CFGR1 I2C_PBx_FMP   LL_SYSCFG_EnableFastModePlus\n
00515   *         SYSCFG_CFGR1 I2Cx_FMP      LL_SYSCFG_EnableFastModePlus
00516   * @param  ConfigFastModePlus This parameter can be a combination of the following values:
00517   *         @arg @ref LL_SYSCFG_I2C_FASTMODEPLUS_PB6
00518   *         @arg @ref LL_SYSCFG_I2C_FASTMODEPLUS_PB7
00519   *         @arg @ref LL_SYSCFG_I2C_FASTMODEPLUS_PB8 (*)
00520   *         @arg @ref LL_SYSCFG_I2C_FASTMODEPLUS_PB9 (*)
00521   *         @arg @ref LL_SYSCFG_I2C_FASTMODEPLUS_I2C1
00522   *         @arg @ref LL_SYSCFG_I2C_FASTMODEPLUS_I2C2 (*)
00523   *         @arg @ref LL_SYSCFG_I2C_FASTMODEPLUS_I2C3
00524   *         @arg @ref LL_SYSCFG_I2C_FASTMODEPLUS_I2C4 (*)
00525   *
00526   *         (*) value not defined in all devices
00527   * @retval None
00528   */
00529 __STATIC_INLINE void LL_SYSCFG_EnableFastModePlus(uint32_t ConfigFastModePlus)
00530 {
00531   SET_BIT(SYSCFG->CFGR1, ConfigFastModePlus);
00532 }
00533 
00534 /**
00535   * @brief  Disable the I2C fast mode plus driving capability.
00536   * @rmtoll SYSCFG_CFGR1 I2C_PBx_FMP   LL_SYSCFG_DisableFastModePlus\n
00537   *         SYSCFG_CFGR1 I2Cx_FMP      LL_SYSCFG_DisableFastModePlus
00538   * @param  ConfigFastModePlus This parameter can be a combination of the following values:
00539   *         @arg @ref LL_SYSCFG_I2C_FASTMODEPLUS_PB6
00540   *         @arg @ref LL_SYSCFG_I2C_FASTMODEPLUS_PB7
00541   *         @arg @ref LL_SYSCFG_I2C_FASTMODEPLUS_PB8 (*)
00542   *         @arg @ref LL_SYSCFG_I2C_FASTMODEPLUS_PB9 (*)
00543   *         @arg @ref LL_SYSCFG_I2C_FASTMODEPLUS_I2C1
00544   *         @arg @ref LL_SYSCFG_I2C_FASTMODEPLUS_I2C2 (*)
00545   *         @arg @ref LL_SYSCFG_I2C_FASTMODEPLUS_I2C3
00546   *         @arg @ref LL_SYSCFG_I2C_FASTMODEPLUS_I2C4 (*)
00547   *
00548   *         (*) value not defined in all devices
00549   * @retval None
00550   */
00551 __STATIC_INLINE void LL_SYSCFG_DisableFastModePlus(uint32_t ConfigFastModePlus)
00552 {
00553   CLEAR_BIT(SYSCFG->CFGR1, ConfigFastModePlus);
00554 }
00555 
00556 /**
00557   * @brief  Enable Floating Point Unit Invalid operation Interrupt
00558   * @rmtoll SYSCFG_CFGR1 FPU_IE_0      LL_SYSCFG_EnableIT_FPU_IOC
00559   * @retval None
00560   */
00561 __STATIC_INLINE void LL_SYSCFG_EnableIT_FPU_IOC(void)
00562 {
00563   SET_BIT(SYSCFG->CFGR1, SYSCFG_CFGR1_FPU_IE_0);
00564 }
00565 
00566 /**
00567   * @brief  Enable Floating Point Unit Divide-by-zero Interrupt
00568   * @rmtoll SYSCFG_CFGR1 FPU_IE_1      LL_SYSCFG_EnableIT_FPU_DZC
00569   * @retval None
00570   */
00571 __STATIC_INLINE void LL_SYSCFG_EnableIT_FPU_DZC(void)
00572 {
00573   SET_BIT(SYSCFG->CFGR1, SYSCFG_CFGR1_FPU_IE_1);
00574 }
00575 
00576 /**
00577   * @brief  Enable Floating Point Unit Underflow Interrupt
00578   * @rmtoll SYSCFG_CFGR1 FPU_IE_2      LL_SYSCFG_EnableIT_FPU_UFC
00579   * @retval None
00580   */
00581 __STATIC_INLINE void LL_SYSCFG_EnableIT_FPU_UFC(void)
00582 {
00583   SET_BIT(SYSCFG->CFGR1, SYSCFG_CFGR1_FPU_IE_2);
00584 }
00585 
00586 /**
00587   * @brief  Enable Floating Point Unit Overflow Interrupt
00588   * @rmtoll SYSCFG_CFGR1 FPU_IE_3      LL_SYSCFG_EnableIT_FPU_OFC
00589   * @retval None
00590   */
00591 __STATIC_INLINE void LL_SYSCFG_EnableIT_FPU_OFC(void)
00592 {
00593   SET_BIT(SYSCFG->CFGR1, SYSCFG_CFGR1_FPU_IE_3);
00594 }
00595 
00596 /**
00597   * @brief  Enable Floating Point Unit Input denormal Interrupt
00598   * @rmtoll SYSCFG_CFGR1 FPU_IE_4      LL_SYSCFG_EnableIT_FPU_IDC
00599   * @retval None
00600   */
00601 __STATIC_INLINE void LL_SYSCFG_EnableIT_FPU_IDC(void)
00602 {
00603   SET_BIT(SYSCFG->CFGR1, SYSCFG_CFGR1_FPU_IE_4);
00604 }
00605 
00606 /**
00607   * @brief  Enable Floating Point Unit Inexact Interrupt
00608   * @rmtoll SYSCFG_CFGR1 FPU_IE_5      LL_SYSCFG_EnableIT_FPU_IXC
00609   * @retval None
00610   */
00611 __STATIC_INLINE void LL_SYSCFG_EnableIT_FPU_IXC(void)
00612 {
00613   SET_BIT(SYSCFG->CFGR1, SYSCFG_CFGR1_FPU_IE_5);
00614 }
00615 
00616 /**
00617   * @brief  Disable Floating Point Unit Invalid operation Interrupt
00618   * @rmtoll SYSCFG_CFGR1 FPU_IE_0      LL_SYSCFG_DisableIT_FPU_IOC
00619   * @retval None
00620   */
00621 __STATIC_INLINE void LL_SYSCFG_DisableIT_FPU_IOC(void)
00622 {
00623   CLEAR_BIT(SYSCFG->CFGR1, SYSCFG_CFGR1_FPU_IE_0);
00624 }
00625 
00626 /**
00627   * @brief  Disable Floating Point Unit Divide-by-zero Interrupt
00628   * @rmtoll SYSCFG_CFGR1 FPU_IE_1      LL_SYSCFG_DisableIT_FPU_DZC
00629   * @retval None
00630   */
00631 __STATIC_INLINE void LL_SYSCFG_DisableIT_FPU_DZC(void)
00632 {
00633   CLEAR_BIT(SYSCFG->CFGR1, SYSCFG_CFGR1_FPU_IE_1);
00634 }
00635 
00636 /**
00637   * @brief  Disable Floating Point Unit Underflow Interrupt
00638   * @rmtoll SYSCFG_CFGR1 FPU_IE_2      LL_SYSCFG_DisableIT_FPU_UFC
00639   * @retval None
00640   */
00641 __STATIC_INLINE void LL_SYSCFG_DisableIT_FPU_UFC(void)
00642 {
00643   CLEAR_BIT(SYSCFG->CFGR1, SYSCFG_CFGR1_FPU_IE_2);
00644 }
00645 
00646 /**
00647   * @brief  Disable Floating Point Unit Overflow Interrupt
00648   * @rmtoll SYSCFG_CFGR1 FPU_IE_3      LL_SYSCFG_DisableIT_FPU_OFC
00649   * @retval None
00650   */
00651 __STATIC_INLINE void LL_SYSCFG_DisableIT_FPU_OFC(void)
00652 {
00653   CLEAR_BIT(SYSCFG->CFGR1, SYSCFG_CFGR1_FPU_IE_3);
00654 }
00655 
00656 /**
00657   * @brief  Disable Floating Point Unit Input denormal Interrupt
00658   * @rmtoll SYSCFG_CFGR1 FPU_IE_4      LL_SYSCFG_DisableIT_FPU_IDC
00659   * @retval None
00660   */
00661 __STATIC_INLINE void LL_SYSCFG_DisableIT_FPU_IDC(void)
00662 {
00663   CLEAR_BIT(SYSCFG->CFGR1, SYSCFG_CFGR1_FPU_IE_4);
00664 }
00665 
00666 /**
00667   * @brief  Disable Floating Point Unit Inexact Interrupt
00668   * @rmtoll SYSCFG_CFGR1 FPU_IE_5      LL_SYSCFG_DisableIT_FPU_IXC
00669   * @retval None
00670   */
00671 __STATIC_INLINE void LL_SYSCFG_DisableIT_FPU_IXC(void)
00672 {
00673   CLEAR_BIT(SYSCFG->CFGR1, SYSCFG_CFGR1_FPU_IE_5);
00674 }
00675 
00676 /**
00677   * @brief  Check if Floating Point Unit Invalid operation Interrupt source is enabled or disabled.
00678   * @rmtoll SYSCFG_CFGR1 FPU_IE_0      LL_SYSCFG_IsEnabledIT_FPU_IOC
00679   * @retval State of bit (1 or 0).
00680   */
00681 __STATIC_INLINE uint32_t LL_SYSCFG_IsEnabledIT_FPU_IOC(void)
00682 {
00683   return (READ_BIT(SYSCFG->CFGR1, SYSCFG_CFGR1_FPU_IE_0) == (SYSCFG_CFGR1_FPU_IE_0));
00684 }
00685 
00686 /**
00687   * @brief  Check if Floating Point Unit Divide-by-zero Interrupt source is enabled or disabled.
00688   * @rmtoll SYSCFG_CFGR1 FPU_IE_1      LL_SYSCFG_IsEnabledIT_FPU_DZC
00689   * @retval State of bit (1 or 0).
00690   */
00691 __STATIC_INLINE uint32_t LL_SYSCFG_IsEnabledIT_FPU_DZC(void)
00692 {
00693   return (READ_BIT(SYSCFG->CFGR1, SYSCFG_CFGR1_FPU_IE_1) == (SYSCFG_CFGR1_FPU_IE_1));
00694 }
00695 
00696 /**
00697   * @brief  Check if Floating Point Unit Underflow Interrupt source is enabled or disabled.
00698   * @rmtoll SYSCFG_CFGR1 FPU_IE_2      LL_SYSCFG_IsEnabledIT_FPU_UFC
00699   * @retval State of bit (1 or 0).
00700   */
00701 __STATIC_INLINE uint32_t LL_SYSCFG_IsEnabledIT_FPU_UFC(void)
00702 {
00703   return (READ_BIT(SYSCFG->CFGR1, SYSCFG_CFGR1_FPU_IE_2) == (SYSCFG_CFGR1_FPU_IE_2));
00704 }
00705 
00706 /**
00707   * @brief  Check if Floating Point Unit Overflow Interrupt source is enabled or disabled.
00708   * @rmtoll SYSCFG_CFGR1 FPU_IE_3      LL_SYSCFG_IsEnabledIT_FPU_OFC
00709   * @retval State of bit (1 or 0).
00710   */
00711 __STATIC_INLINE uint32_t LL_SYSCFG_IsEnabledIT_FPU_OFC(void)
00712 {
00713   return (READ_BIT(SYSCFG->CFGR1, SYSCFG_CFGR1_FPU_IE_3) == (SYSCFG_CFGR1_FPU_IE_3));
00714 }
00715 
00716 /**
00717   * @brief  Check if Floating Point Unit Input denormal Interrupt source is enabled or disabled.
00718   * @rmtoll SYSCFG_CFGR1 FPU_IE_4      LL_SYSCFG_IsEnabledIT_FPU_IDC
00719   * @retval State of bit (1 or 0).
00720   */
00721 __STATIC_INLINE uint32_t LL_SYSCFG_IsEnabledIT_FPU_IDC(void)
00722 {
00723   return (READ_BIT(SYSCFG->CFGR1, SYSCFG_CFGR1_FPU_IE_4) == (SYSCFG_CFGR1_FPU_IE_4));
00724 }
00725 
00726 /**
00727   * @brief  Check if Floating Point Unit Inexact Interrupt source is enabled or disabled.
00728   * @rmtoll SYSCFG_CFGR1 FPU_IE_5      LL_SYSCFG_IsEnabledIT_FPU_IXC
00729   * @retval State of bit (1 or 0).
00730   */
00731 __STATIC_INLINE uint32_t LL_SYSCFG_IsEnabledIT_FPU_IXC(void)
00732 {
00733   return (READ_BIT(SYSCFG->CFGR1, SYSCFG_CFGR1_FPU_IE_5) == (SYSCFG_CFGR1_FPU_IE_5));
00734 }
00735 
00736 /**
00737   * @brief  Configure source input for the EXTI external interrupt.
00738   * @rmtoll SYSCFG_EXTICR1 EXTIx         LL_SYSCFG_SetEXTISource\n
00739   *         SYSCFG_EXTICR2 EXTIx         LL_SYSCFG_SetEXTISource\n
00740   *         SYSCFG_EXTICR3 EXTIx         LL_SYSCFG_SetEXTISource\n
00741   *         SYSCFG_EXTICR4 EXTIx         LL_SYSCFG_SetEXTISource
00742   * @param  Port This parameter can be one of the following values:
00743   *         @arg @ref LL_SYSCFG_EXTI_PORTA
00744   *         @arg @ref LL_SYSCFG_EXTI_PORTB
00745   *         @arg @ref LL_SYSCFG_EXTI_PORTC
00746   *         @arg @ref LL_SYSCFG_EXTI_PORTD
00747   *         @arg @ref LL_SYSCFG_EXTI_PORTE
00748   *         @arg @ref LL_SYSCFG_EXTI_PORTF (*)
00749   *         @arg @ref LL_SYSCFG_EXTI_PORTG (*)
00750   *         @arg @ref LL_SYSCFG_EXTI_PORTH
00751   *         @arg @ref LL_SYSCFG_EXTI_PORTI (*)
00752   *
00753   *         (*) value not defined in all devices
00754   * @param  Line This parameter can be one of the following values:
00755   *         @arg @ref LL_SYSCFG_EXTI_LINE0
00756   *         @arg @ref LL_SYSCFG_EXTI_LINE1
00757   *         @arg @ref LL_SYSCFG_EXTI_LINE2
00758   *         @arg @ref LL_SYSCFG_EXTI_LINE3
00759   *         @arg @ref LL_SYSCFG_EXTI_LINE4
00760   *         @arg @ref LL_SYSCFG_EXTI_LINE5
00761   *         @arg @ref LL_SYSCFG_EXTI_LINE6
00762   *         @arg @ref LL_SYSCFG_EXTI_LINE7
00763   *         @arg @ref LL_SYSCFG_EXTI_LINE8
00764   *         @arg @ref LL_SYSCFG_EXTI_LINE9
00765   *         @arg @ref LL_SYSCFG_EXTI_LINE10
00766   *         @arg @ref LL_SYSCFG_EXTI_LINE11
00767   *         @arg @ref LL_SYSCFG_EXTI_LINE12
00768   *         @arg @ref LL_SYSCFG_EXTI_LINE13
00769   *         @arg @ref LL_SYSCFG_EXTI_LINE14
00770   *         @arg @ref LL_SYSCFG_EXTI_LINE15
00771   * @retval None
00772   */
00773 __STATIC_INLINE void LL_SYSCFG_SetEXTISource(uint32_t Port, uint32_t Line)
00774 {
00775   MODIFY_REG(SYSCFG->EXTICR[Line & 0xFFU], (Line >> 16U), Port << POSITION_VAL((Line >> 16U)));
00776 }
00777 
00778 /**
00779   * @brief  Get the configured defined for specific EXTI Line
00780   * @rmtoll SYSCFG_EXTICR1 EXTIx         LL_SYSCFG_GetEXTISource\n
00781   *         SYSCFG_EXTICR2 EXTIx         LL_SYSCFG_GetEXTISource\n
00782   *         SYSCFG_EXTICR3 EXTIx         LL_SYSCFG_GetEXTISource\n
00783   *         SYSCFG_EXTICR4 EXTIx         LL_SYSCFG_GetEXTISource
00784   * @param  Line This parameter can be one of the following values:
00785   *         @arg @ref LL_SYSCFG_EXTI_LINE0
00786   *         @arg @ref LL_SYSCFG_EXTI_LINE1
00787   *         @arg @ref LL_SYSCFG_EXTI_LINE2
00788   *         @arg @ref LL_SYSCFG_EXTI_LINE3
00789   *         @arg @ref LL_SYSCFG_EXTI_LINE4
00790   *         @arg @ref LL_SYSCFG_EXTI_LINE5
00791   *         @arg @ref LL_SYSCFG_EXTI_LINE6
00792   *         @arg @ref LL_SYSCFG_EXTI_LINE7
00793   *         @arg @ref LL_SYSCFG_EXTI_LINE8
00794   *         @arg @ref LL_SYSCFG_EXTI_LINE9
00795   *         @arg @ref LL_SYSCFG_EXTI_LINE10
00796   *         @arg @ref LL_SYSCFG_EXTI_LINE11
00797   *         @arg @ref LL_SYSCFG_EXTI_LINE12
00798   *         @arg @ref LL_SYSCFG_EXTI_LINE13
00799   *         @arg @ref LL_SYSCFG_EXTI_LINE14
00800   *         @arg @ref LL_SYSCFG_EXTI_LINE15
00801   * @retval Returned value can be one of the following values:
00802   *         @arg @ref LL_SYSCFG_EXTI_PORTA
00803   *         @arg @ref LL_SYSCFG_EXTI_PORTB
00804   *         @arg @ref LL_SYSCFG_EXTI_PORTC
00805   *         @arg @ref LL_SYSCFG_EXTI_PORTD
00806   *         @arg @ref LL_SYSCFG_EXTI_PORTE
00807   *         @arg @ref LL_SYSCFG_EXTI_PORTF (*)
00808   *         @arg @ref LL_SYSCFG_EXTI_PORTG (*)
00809   *         @arg @ref LL_SYSCFG_EXTI_PORTH
00810   *         @arg @ref LL_SYSCFG_EXTI_PORTI (*)
00811   *
00812   *         (*) value not defined in all devices
00813   */
00814 __STATIC_INLINE uint32_t LL_SYSCFG_GetEXTISource(uint32_t Line)
00815 {
00816   return (uint32_t)(READ_BIT(SYSCFG->EXTICR[Line & 0xFFU], (Line >> 16U)) >> POSITION_VAL(Line >> 16U));
00817 }
00818 
00819 /**
00820   * @brief  Enable SRAM2 Erase (starts a hardware SRAM2 erase operation. This bit is
00821   * automatically cleared at the end of the SRAM2 erase operation.)
00822   * @note This bit is write-protected: setting this bit is possible only after the
00823   *       correct key sequence is written in the SYSCFG_SKR register as described in
00824   *       the Reference Manual.
00825   * @rmtoll SYSCFG_SCSR  SRAM2ER       LL_SYSCFG_EnableSRAM2Erase
00826   * @retval None
00827   */
00828 __STATIC_INLINE void LL_SYSCFG_EnableSRAM2Erase(void)
00829 {
00830   /* Starts a hardware SRAM2 erase operation*/
00831   SET_BIT(SYSCFG->SCSR, SYSCFG_SCSR_SRAM2ER);
00832 }
00833 
00834 /**
00835   * @brief  Check if SRAM2 erase operation is on going
00836   * @rmtoll SYSCFG_SCSR  SRAM2BSY      LL_SYSCFG_IsSRAM2EraseOngoing
00837   * @retval State of bit (1 or 0).
00838   */
00839 __STATIC_INLINE uint32_t LL_SYSCFG_IsSRAM2EraseOngoing(void)
00840 {
00841   return (READ_BIT(SYSCFG->SCSR, SYSCFG_SCSR_SRAM2BSY) == (SYSCFG_SCSR_SRAM2BSY));
00842 }
00843 
00844 /**
00845   * @brief  Set connections to TIM1/8/15/16/17 Break inputs
00846   * @rmtoll SYSCFG_CFGR2 CLL           LL_SYSCFG_SetTIMBreakInputs\n
00847   *         SYSCFG_CFGR2 SPL           LL_SYSCFG_SetTIMBreakInputs\n
00848   *         SYSCFG_CFGR2 PVDL          LL_SYSCFG_SetTIMBreakInputs\n
00849   *         SYSCFG_CFGR2 ECCL          LL_SYSCFG_SetTIMBreakInputs
00850   * @param  Break This parameter can be a combination of the following values:
00851   *         @arg @ref LL_SYSCFG_TIMBREAK_ECC
00852   *         @arg @ref LL_SYSCFG_TIMBREAK_PVD
00853   *         @arg @ref LL_SYSCFG_TIMBREAK_SRAM2_PARITY
00854   *         @arg @ref LL_SYSCFG_TIMBREAK_LOCKUP
00855   * @retval None
00856   */
00857 __STATIC_INLINE void LL_SYSCFG_SetTIMBreakInputs(uint32_t Break)
00858 {
00859   MODIFY_REG(SYSCFG->CFGR2, SYSCFG_CFGR2_CLL | SYSCFG_CFGR2_SPL | SYSCFG_CFGR2_PVDL | SYSCFG_CFGR2_ECCL, Break);
00860 }
00861 
00862 /**
00863   * @brief  Get connections to TIM1/8/15/16/17 Break inputs
00864   * @rmtoll SYSCFG_CFGR2 CLL           LL_SYSCFG_GetTIMBreakInputs\n
00865   *         SYSCFG_CFGR2 SPL           LL_SYSCFG_GetTIMBreakInputs\n
00866   *         SYSCFG_CFGR2 PVDL          LL_SYSCFG_GetTIMBreakInputs\n
00867   *         SYSCFG_CFGR2 ECCL          LL_SYSCFG_GetTIMBreakInputs
00868   * @retval Returned value can be can be a combination of the following values:
00869   *         @arg @ref LL_SYSCFG_TIMBREAK_ECC
00870   *         @arg @ref LL_SYSCFG_TIMBREAK_PVD
00871   *         @arg @ref LL_SYSCFG_TIMBREAK_SRAM2_PARITY
00872   *         @arg @ref LL_SYSCFG_TIMBREAK_LOCKUP
00873   */
00874 __STATIC_INLINE uint32_t LL_SYSCFG_GetTIMBreakInputs(void)
00875 {
00876   return (uint32_t)(READ_BIT(SYSCFG->CFGR2, SYSCFG_CFGR2_CLL | SYSCFG_CFGR2_SPL | SYSCFG_CFGR2_PVDL | SYSCFG_CFGR2_ECCL));
00877 }
00878 
00879 /**
00880   * @brief  Check if SRAM2 parity error detected
00881   * @rmtoll SYSCFG_CFGR2 SPF           LL_SYSCFG_IsActiveFlag_SP
00882   * @retval State of bit (1 or 0).
00883   */
00884 __STATIC_INLINE uint32_t LL_SYSCFG_IsActiveFlag_SP(void)
00885 {
00886   return (READ_BIT(SYSCFG->CFGR2, SYSCFG_CFGR2_SPF) == (SYSCFG_CFGR2_SPF));
00887 }
00888 
00889 /**
00890   * @brief  Clear SRAM2 parity error flag
00891   * @rmtoll SYSCFG_CFGR2 SPF           LL_SYSCFG_ClearFlag_SP
00892   * @retval None
00893   */
00894 __STATIC_INLINE void LL_SYSCFG_ClearFlag_SP(void)
00895 {
00896   SET_BIT(SYSCFG->CFGR2, SYSCFG_CFGR2_SPF);
00897 }
00898 
00899 /**
00900   * @brief  Enable SRAM2 page write protection for Pages in range 0 to 31
00901   * @note Write protection is cleared only by a system reset
00902   * @rmtoll SYSCFG_SWPR  PxWP         LL_SYSCFG_EnableSRAM2PageWRP_0_31
00903   * @param  SRAM2WRP This parameter can be a combination of the following values:
00904   *         @arg @ref LL_SYSCFG_SRAM2WRP_PAGE0
00905   *         @arg @ref LL_SYSCFG_SRAM2WRP_PAGE1
00906   *         @arg @ref LL_SYSCFG_SRAM2WRP_PAGE2
00907   *         @arg @ref LL_SYSCFG_SRAM2WRP_PAGE3
00908   *         @arg @ref LL_SYSCFG_SRAM2WRP_PAGE4
00909   *         @arg @ref LL_SYSCFG_SRAM2WRP_PAGE5
00910   *         @arg @ref LL_SYSCFG_SRAM2WRP_PAGE6
00911   *         @arg @ref LL_SYSCFG_SRAM2WRP_PAGE7
00912   *         @arg @ref LL_SYSCFG_SRAM2WRP_PAGE8
00913   *         @arg @ref LL_SYSCFG_SRAM2WRP_PAGE9
00914   *         @arg @ref LL_SYSCFG_SRAM2WRP_PAGE10
00915   *         @arg @ref LL_SYSCFG_SRAM2WRP_PAGE11
00916   *         @arg @ref LL_SYSCFG_SRAM2WRP_PAGE12
00917   *         @arg @ref LL_SYSCFG_SRAM2WRP_PAGE13
00918   *         @arg @ref LL_SYSCFG_SRAM2WRP_PAGE14
00919   *         @arg @ref LL_SYSCFG_SRAM2WRP_PAGE15
00920   *         @arg @ref LL_SYSCFG_SRAM2WRP_PAGE16 (*)
00921   *         @arg @ref LL_SYSCFG_SRAM2WRP_PAGE17 (*)
00922   *         @arg @ref LL_SYSCFG_SRAM2WRP_PAGE18 (*)
00923   *         @arg @ref LL_SYSCFG_SRAM2WRP_PAGE19 (*)
00924   *         @arg @ref LL_SYSCFG_SRAM2WRP_PAGE20 (*)
00925   *         @arg @ref LL_SYSCFG_SRAM2WRP_PAGE21 (*)
00926   *         @arg @ref LL_SYSCFG_SRAM2WRP_PAGE22 (*)
00927   *         @arg @ref LL_SYSCFG_SRAM2WRP_PAGE23 (*)
00928   *         @arg @ref LL_SYSCFG_SRAM2WRP_PAGE24 (*)
00929   *         @arg @ref LL_SYSCFG_SRAM2WRP_PAGE25 (*)
00930   *         @arg @ref LL_SYSCFG_SRAM2WRP_PAGE26 (*)
00931   *         @arg @ref LL_SYSCFG_SRAM2WRP_PAGE27 (*)
00932   *         @arg @ref LL_SYSCFG_SRAM2WRP_PAGE28 (*)
00933   *         @arg @ref LL_SYSCFG_SRAM2WRP_PAGE29 (*)
00934   *         @arg @ref LL_SYSCFG_SRAM2WRP_PAGE30 (*)
00935   *         @arg @ref LL_SYSCFG_SRAM2WRP_PAGE31 (*)
00936   *
00937   *         (*) value not defined in all devices
00938   * @retval None
00939   */
00940 /* Legacy define */
00941 #define LL_SYSCFG_EnableSRAM2PageWRP    LL_SYSCFG_EnableSRAM2PageWRP_0_31
00942 __STATIC_INLINE void LL_SYSCFG_EnableSRAM2PageWRP_0_31(uint32_t SRAM2WRP)
00943 {
00944   SET_BIT(SYSCFG->SWPR, SRAM2WRP);
00945 }
00946 
00947 #if defined(SYSCFG_SWPR2_PAGE63)
00948 /**
00949   * @brief  Enable SRAM2 page write protection for Pages in range 32 to 63
00950   * @note Write protection is cleared only by a system reset
00951   * @rmtoll SYSCFG_SWPR2 PxWP          LL_SYSCFG_EnableSRAM2PageWRP_32_63
00952   * @param  SRAM2WRP This parameter can be a combination of the following values:
00953   *         @arg @ref LL_SYSCFG_SRAM2WRP_PAGE32 (*)
00954   *         @arg @ref LL_SYSCFG_SRAM2WRP_PAGE33 (*)
00955   *         @arg @ref LL_SYSCFG_SRAM2WRP_PAGE34 (*)
00956   *         @arg @ref LL_SYSCFG_SRAM2WRP_PAGE35 (*)
00957   *         @arg @ref LL_SYSCFG_SRAM2WRP_PAGE36 (*)
00958   *         @arg @ref LL_SYSCFG_SRAM2WRP_PAGE37 (*)
00959   *         @arg @ref LL_SYSCFG_SRAM2WRP_PAGE38 (*)
00960   *         @arg @ref LL_SYSCFG_SRAM2WRP_PAGE39 (*)
00961   *         @arg @ref LL_SYSCFG_SRAM2WRP_PAGE40 (*)
00962   *         @arg @ref LL_SYSCFG_SRAM2WRP_PAGE41 (*)
00963   *         @arg @ref LL_SYSCFG_SRAM2WRP_PAGE42 (*)
00964   *         @arg @ref LL_SYSCFG_SRAM2WRP_PAGE43 (*)
00965   *         @arg @ref LL_SYSCFG_SRAM2WRP_PAGE44 (*)
00966   *         @arg @ref LL_SYSCFG_SRAM2WRP_PAGE45 (*)
00967   *         @arg @ref LL_SYSCFG_SRAM2WRP_PAGE46 (*)
00968   *         @arg @ref LL_SYSCFG_SRAM2WRP_PAGE47 (*)
00969   *         @arg @ref LL_SYSCFG_SRAM2WRP_PAGE48 (*)
00970   *         @arg @ref LL_SYSCFG_SRAM2WRP_PAGE49 (*)
00971   *         @arg @ref LL_SYSCFG_SRAM2WRP_PAGE50 (*)
00972   *         @arg @ref LL_SYSCFG_SRAM2WRP_PAGE51 (*)
00973   *         @arg @ref LL_SYSCFG_SRAM2WRP_PAGE52 (*)
00974   *         @arg @ref LL_SYSCFG_SRAM2WRP_PAGE53 (*)
00975   *         @arg @ref LL_SYSCFG_SRAM2WRP_PAGE54 (*)
00976   *         @arg @ref LL_SYSCFG_SRAM2WRP_PAGE55 (*)
00977   *         @arg @ref LL_SYSCFG_SRAM2WRP_PAGE56 (*)
00978   *         @arg @ref LL_SYSCFG_SRAM2WRP_PAGE57 (*)
00979   *         @arg @ref LL_SYSCFG_SRAM2WRP_PAGE58 (*)
00980   *         @arg @ref LL_SYSCFG_SRAM2WRP_PAGE59 (*)
00981   *         @arg @ref LL_SYSCFG_SRAM2WRP_PAGE60 (*)
00982   *         @arg @ref LL_SYSCFG_SRAM2WRP_PAGE61 (*)
00983   *         @arg @ref LL_SYSCFG_SRAM2WRP_PAGE62 (*)
00984   *         @arg @ref LL_SYSCFG_SRAM2WRP_PAGE63 (*)
00985   *
00986   *         (*) value not defined in all devices
00987   * @retval None
00988   */
00989 __STATIC_INLINE void LL_SYSCFG_EnableSRAM2PageWRP_32_63(uint32_t SRAM2WRP)
00990 {
00991   SET_BIT(SYSCFG->SWPR2, SRAM2WRP);
00992 }
00993 #endif /* SYSCFG_SWPR2_PAGE63 */
00994 
00995 /**
00996   * @brief  SRAM2 page write protection lock prior to erase
00997   * @rmtoll SYSCFG_SKR   KEY           LL_SYSCFG_LockSRAM2WRP
00998   * @retval None
00999   */
01000 __STATIC_INLINE void LL_SYSCFG_LockSRAM2WRP(void)
01001 {
01002   /* Writing a wrong key reactivates the write protection */
01003   WRITE_REG(SYSCFG->SKR, 0x00);
01004 }
01005 
01006 /**
01007   * @brief  SRAM2 page write protection unlock prior to erase
01008   * @rmtoll SYSCFG_SKR   KEY           LL_SYSCFG_UnlockSRAM2WRP
01009   * @retval None
01010   */
01011 __STATIC_INLINE void LL_SYSCFG_UnlockSRAM2WRP(void)
01012 {
01013   /* unlock the write protection of the SRAM2ER bit */
01014   WRITE_REG(SYSCFG->SKR, 0xCA);
01015   WRITE_REG(SYSCFG->SKR, 0x53);
01016 }
01017 
01018 /**
01019   * @}
01020   */
01021 
01022 
01023 /** @defgroup SYSTEM_LL_EF_DBGMCU DBGMCU
01024   * @{
01025   */
01026 
01027 /**
01028   * @brief  Return the device identifier
01029   * @rmtoll DBGMCU_IDCODE DEV_ID        LL_DBGMCU_GetDeviceID
01030   * @retval Values between Min_Data=0x00 and Max_Data=0xFFFF (ex: device ID is 0x6415)
01031   */
01032 __STATIC_INLINE uint32_t LL_DBGMCU_GetDeviceID(void)
01033 {
01034   return (uint32_t)(READ_BIT(DBGMCU->IDCODE, DBGMCU_IDCODE_DEV_ID));
01035 }
01036 
01037 /**
01038   * @brief  Return the device revision identifier
01039   * @note This field indicates the revision of the device.
01040   * @rmtoll DBGMCU_IDCODE REV_ID        LL_DBGMCU_GetRevisionID
01041   * @retval Values between Min_Data=0x00 and Max_Data=0xFFFF
01042   */
01043 __STATIC_INLINE uint32_t LL_DBGMCU_GetRevisionID(void)
01044 {
01045   return (uint32_t)(READ_BIT(DBGMCU->IDCODE, DBGMCU_IDCODE_REV_ID) >> DBGMCU_IDCODE_REV_ID_Pos);
01046 }
01047 
01048 /**
01049   * @brief  Enable the Debug Module during SLEEP mode
01050   * @rmtoll DBGMCU_CR    DBG_SLEEP     LL_DBGMCU_EnableDBGSleepMode
01051   * @retval None
01052   */
01053 __STATIC_INLINE void LL_DBGMCU_EnableDBGSleepMode(void)
01054 {
01055   SET_BIT(DBGMCU->CR, DBGMCU_CR_DBG_SLEEP);
01056 }
01057 
01058 /**
01059   * @brief  Disable the Debug Module during SLEEP mode
01060   * @rmtoll DBGMCU_CR    DBG_SLEEP     LL_DBGMCU_DisableDBGSleepMode
01061   * @retval None
01062   */
01063 __STATIC_INLINE void LL_DBGMCU_DisableDBGSleepMode(void)
01064 {
01065   CLEAR_BIT(DBGMCU->CR, DBGMCU_CR_DBG_SLEEP);
01066 }
01067 
01068 /**
01069   * @brief  Enable the Debug Module during STOP mode
01070   * @rmtoll DBGMCU_CR    DBG_STOP      LL_DBGMCU_EnableDBGStopMode
01071   * @retval None
01072   */
01073 __STATIC_INLINE void LL_DBGMCU_EnableDBGStopMode(void)
01074 {
01075   SET_BIT(DBGMCU->CR, DBGMCU_CR_DBG_STOP);
01076 }
01077 
01078 /**
01079   * @brief  Disable the Debug Module during STOP mode
01080   * @rmtoll DBGMCU_CR    DBG_STOP      LL_DBGMCU_DisableDBGStopMode
01081   * @retval None
01082   */
01083 __STATIC_INLINE void LL_DBGMCU_DisableDBGStopMode(void)
01084 {
01085   CLEAR_BIT(DBGMCU->CR, DBGMCU_CR_DBG_STOP);
01086 }
01087 
01088 /**
01089   * @brief  Enable the Debug Module during STANDBY mode
01090   * @rmtoll DBGMCU_CR    DBG_STANDBY   LL_DBGMCU_EnableDBGStandbyMode
01091   * @retval None
01092   */
01093 __STATIC_INLINE void LL_DBGMCU_EnableDBGStandbyMode(void)
01094 {
01095   SET_BIT(DBGMCU->CR, DBGMCU_CR_DBG_STANDBY);
01096 }
01097 
01098 /**
01099   * @brief  Disable the Debug Module during STANDBY mode
01100   * @rmtoll DBGMCU_CR    DBG_STANDBY   LL_DBGMCU_DisableDBGStandbyMode
01101   * @retval None
01102   */
01103 __STATIC_INLINE void LL_DBGMCU_DisableDBGStandbyMode(void)
01104 {
01105   CLEAR_BIT(DBGMCU->CR, DBGMCU_CR_DBG_STANDBY);
01106 }
01107 
01108 /**
01109   * @brief  Set Trace pin assignment control
01110   * @rmtoll DBGMCU_CR    TRACE_IOEN    LL_DBGMCU_SetTracePinAssignment\n
01111   *         DBGMCU_CR    TRACE_MODE    LL_DBGMCU_SetTracePinAssignment
01112   * @param  PinAssignment This parameter can be one of the following values:
01113   *         @arg @ref LL_DBGMCU_TRACE_NONE
01114   *         @arg @ref LL_DBGMCU_TRACE_ASYNCH
01115   *         @arg @ref LL_DBGMCU_TRACE_SYNCH_SIZE1
01116   *         @arg @ref LL_DBGMCU_TRACE_SYNCH_SIZE2
01117   *         @arg @ref LL_DBGMCU_TRACE_SYNCH_SIZE4
01118   * @retval None
01119   */
01120 __STATIC_INLINE void LL_DBGMCU_SetTracePinAssignment(uint32_t PinAssignment)
01121 {
01122   MODIFY_REG(DBGMCU->CR, DBGMCU_CR_TRACE_IOEN | DBGMCU_CR_TRACE_MODE, PinAssignment);
01123 }
01124 
01125 /**
01126   * @brief  Get Trace pin assignment control
01127   * @rmtoll DBGMCU_CR    TRACE_IOEN    LL_DBGMCU_GetTracePinAssignment\n
01128   *         DBGMCU_CR    TRACE_MODE    LL_DBGMCU_GetTracePinAssignment
01129   * @retval Returned value can be one of the following values:
01130   *         @arg @ref LL_DBGMCU_TRACE_NONE
01131   *         @arg @ref LL_DBGMCU_TRACE_ASYNCH
01132   *         @arg @ref LL_DBGMCU_TRACE_SYNCH_SIZE1
01133   *         @arg @ref LL_DBGMCU_TRACE_SYNCH_SIZE2
01134   *         @arg @ref LL_DBGMCU_TRACE_SYNCH_SIZE4
01135   */
01136 __STATIC_INLINE uint32_t LL_DBGMCU_GetTracePinAssignment(void)
01137 {
01138   return (uint32_t)(READ_BIT(DBGMCU->CR, DBGMCU_CR_TRACE_IOEN | DBGMCU_CR_TRACE_MODE));
01139 }
01140 
01141 /**
01142   * @brief  Freeze APB1 peripherals (group1 peripherals)
01143   * @rmtoll DBGMCU_APB1FZR1 DBG_xxxx_STOP  LL_DBGMCU_APB1_GRP1_FreezePeriph
01144   * @param  Periphs This parameter can be a combination of the following values:
01145   *         @arg @ref LL_DBGMCU_APB1_GRP1_TIM2_STOP
01146   *         @arg @ref LL_DBGMCU_APB1_GRP1_TIM3_STOP (*)
01147   *         @arg @ref LL_DBGMCU_APB1_GRP1_TIM4_STOP (*)
01148   *         @arg @ref LL_DBGMCU_APB1_GRP1_TIM5_STOP (*)
01149   *         @arg @ref LL_DBGMCU_APB1_GRP1_TIM6_STOP
01150   *         @arg @ref LL_DBGMCU_APB1_GRP1_TIM7_STOP (*)
01151   *         @arg @ref LL_DBGMCU_APB1_GRP1_RTC_STOP
01152   *         @arg @ref LL_DBGMCU_APB1_GRP1_WWDG_STOP
01153   *         @arg @ref LL_DBGMCU_APB1_GRP1_IWDG_STOP
01154   *         @arg @ref LL_DBGMCU_APB1_GRP1_I2C1_STOP
01155   *         @arg @ref LL_DBGMCU_APB1_GRP1_I2C2_STOP (*)
01156   *         @arg @ref LL_DBGMCU_APB1_GRP1_I2C3_STOP
01157   *         @arg @ref LL_DBGMCU_APB1_GRP1_CAN_STOP
01158   *         @arg @ref LL_DBGMCU_APB1_GRP1_CAN2_STOP (*)
01159   *         @arg @ref LL_DBGMCU_APB1_GRP1_LPTIM1_STOP
01160   *
01161   *         (*) value not defined in all devices.
01162   * @retval None
01163   */
01164 __STATIC_INLINE void LL_DBGMCU_APB1_GRP1_FreezePeriph(uint32_t Periphs)
01165 {
01166   SET_BIT(DBGMCU->APB1FZR1, Periphs);
01167 }
01168 
01169 /**
01170   * @brief  Freeze APB1 peripherals (group2 peripherals)
01171   * @rmtoll DBGMCU_APB1FZR2 DBG_xxxx_STOP  LL_DBGMCU_APB1_GRP2_FreezePeriph
01172   * @param  Periphs This parameter can be a combination of the following values:
01173   *         @arg @ref LL_DBGMCU_APB1_GRP2_I2C4_STOP (*)
01174   *         @arg @ref LL_DBGMCU_APB1_GRP2_LPTIM2_STOP
01175   *
01176   *         (*) value not defined in all devices.
01177   * @retval None
01178   */
01179 __STATIC_INLINE void LL_DBGMCU_APB1_GRP2_FreezePeriph(uint32_t Periphs)
01180 {
01181   SET_BIT(DBGMCU->APB1FZR2, Periphs);
01182 }
01183 
01184 /**
01185   * @brief  Unfreeze APB1 peripherals (group1 peripherals)
01186   * @rmtoll DBGMCU_APB1FZR1 DBG_xxxx_STOP  LL_DBGMCU_APB1_GRP1_UnFreezePeriph
01187   * @param  Periphs This parameter can be a combination of the following values:
01188   *         @arg @ref LL_DBGMCU_APB1_GRP1_TIM2_STOP
01189   *         @arg @ref LL_DBGMCU_APB1_GRP1_TIM3_STOP (*)
01190   *         @arg @ref LL_DBGMCU_APB1_GRP1_TIM4_STOP (*)
01191   *         @arg @ref LL_DBGMCU_APB1_GRP1_TIM5_STOP (*)
01192   *         @arg @ref LL_DBGMCU_APB1_GRP1_TIM6_STOP
01193   *         @arg @ref LL_DBGMCU_APB1_GRP1_TIM7_STOP (*)
01194   *         @arg @ref LL_DBGMCU_APB1_GRP1_RTC_STOP
01195   *         @arg @ref LL_DBGMCU_APB1_GRP1_WWDG_STOP
01196   *         @arg @ref LL_DBGMCU_APB1_GRP1_IWDG_STOP
01197   *         @arg @ref LL_DBGMCU_APB1_GRP1_I2C1_STOP
01198   *         @arg @ref LL_DBGMCU_APB1_GRP1_I2C2_STOP (*)
01199   *         @arg @ref LL_DBGMCU_APB1_GRP1_I2C3_STOP
01200   *         @arg @ref LL_DBGMCU_APB1_GRP1_CAN_STOP
01201   *         @arg @ref LL_DBGMCU_APB1_GRP1_CAN2_STOP (*)
01202   *         @arg @ref LL_DBGMCU_APB1_GRP1_LPTIM1_STOP
01203   *
01204   *         (*) value not defined in all devices.
01205   * @retval None
01206   */
01207 __STATIC_INLINE void LL_DBGMCU_APB1_GRP1_UnFreezePeriph(uint32_t Periphs)
01208 {
01209   CLEAR_BIT(DBGMCU->APB1FZR1, Periphs);
01210 }
01211 
01212 /**
01213   * @brief  Unfreeze APB1 peripherals (group2 peripherals)
01214   * @rmtoll DBGMCU_APB1FZR2 DBG_xxxx_STOP  LL_DBGMCU_APB1_GRP2_UnFreezePeriph
01215   * @param  Periphs This parameter can be a combination of the following values:
01216   *         @arg @ref LL_DBGMCU_APB1_GRP2_I2C4_STOP (*)
01217   *         @arg @ref LL_DBGMCU_APB1_GRP2_LPTIM2_STOP
01218   *
01219   *         (*) value not defined in all devices.
01220   * @retval None
01221   */
01222 __STATIC_INLINE void LL_DBGMCU_APB1_GRP2_UnFreezePeriph(uint32_t Periphs)
01223 {
01224   CLEAR_BIT(DBGMCU->APB1FZR2, Periphs);
01225 }
01226 
01227 /**
01228   * @brief  Freeze APB2 peripherals
01229   * @rmtoll DBGMCU_APB2FZ DBG_TIMx_STOP  LL_DBGMCU_APB2_GRP1_FreezePeriph
01230   * @param  Periphs This parameter can be a combination of the following values:
01231   *         @arg @ref LL_DBGMCU_APB2_GRP1_TIM1_STOP
01232   *         @arg @ref LL_DBGMCU_APB2_GRP1_TIM8_STOP (*)
01233   *         @arg @ref LL_DBGMCU_APB2_GRP1_TIM15_STOP
01234   *         @arg @ref LL_DBGMCU_APB2_GRP1_TIM16_STOP
01235   *         @arg @ref LL_DBGMCU_APB2_GRP1_TIM17_STOP (*)
01236   *
01237   *         (*) value not defined in all devices.
01238   * @retval None
01239   */
01240 __STATIC_INLINE void LL_DBGMCU_APB2_GRP1_FreezePeriph(uint32_t Periphs)
01241 {
01242   SET_BIT(DBGMCU->APB2FZ, Periphs);
01243 }
01244 
01245 /**
01246   * @brief  Unfreeze APB2 peripherals
01247   * @rmtoll DBGMCU_APB2FZ DBG_TIMx_STOP  LL_DBGMCU_APB2_GRP1_UnFreezePeriph
01248   * @param  Periphs This parameter can be a combination of the following values:
01249   *         @arg @ref LL_DBGMCU_APB2_GRP1_TIM1_STOP
01250   *         @arg @ref LL_DBGMCU_APB2_GRP1_TIM8_STOP (*)
01251   *         @arg @ref LL_DBGMCU_APB2_GRP1_TIM15_STOP
01252   *         @arg @ref LL_DBGMCU_APB2_GRP1_TIM16_STOP
01253   *         @arg @ref LL_DBGMCU_APB2_GRP1_TIM17_STOP (*)
01254   *
01255   *         (*) value not defined in all devices.
01256   * @retval None
01257   */
01258 __STATIC_INLINE void LL_DBGMCU_APB2_GRP1_UnFreezePeriph(uint32_t Periphs)
01259 {
01260   CLEAR_BIT(DBGMCU->APB2FZ, Periphs);
01261 }
01262 
01263 /**
01264   * @}
01265   */
01266 
01267 #if defined(VREFBUF)
01268 /** @defgroup SYSTEM_LL_EF_VREFBUF VREFBUF
01269   * @{
01270   */
01271 
01272 /**
01273   * @brief  Enable Internal voltage reference
01274   * @rmtoll VREFBUF_CSR  ENVR          LL_VREFBUF_Enable
01275   * @retval None
01276   */
01277 __STATIC_INLINE void LL_VREFBUF_Enable(void)
01278 {
01279   SET_BIT(VREFBUF->CSR, VREFBUF_CSR_ENVR);
01280 }
01281 
01282 /**
01283   * @brief  Disable Internal voltage reference
01284   * @rmtoll VREFBUF_CSR  ENVR          LL_VREFBUF_Disable
01285   * @retval None
01286   */
01287 __STATIC_INLINE void LL_VREFBUF_Disable(void)
01288 {
01289   CLEAR_BIT(VREFBUF->CSR, VREFBUF_CSR_ENVR);
01290 }
01291 
01292 /**
01293   * @brief  Enable high impedance (VREF+pin is high impedance)
01294   * @rmtoll VREFBUF_CSR  HIZ           LL_VREFBUF_EnableHIZ
01295   * @retval None
01296   */
01297 __STATIC_INLINE void LL_VREFBUF_EnableHIZ(void)
01298 {
01299   SET_BIT(VREFBUF->CSR, VREFBUF_CSR_HIZ);
01300 }
01301 
01302 /**
01303   * @brief  Disable high impedance (VREF+pin is internally connected to the voltage reference buffer output)
01304   * @rmtoll VREFBUF_CSR  HIZ           LL_VREFBUF_DisableHIZ
01305   * @retval None
01306   */
01307 __STATIC_INLINE void LL_VREFBUF_DisableHIZ(void)
01308 {
01309   CLEAR_BIT(VREFBUF->CSR, VREFBUF_CSR_HIZ);
01310 }
01311 
01312 /**
01313   * @brief  Set the Voltage reference scale
01314   * @rmtoll VREFBUF_CSR  VRS           LL_VREFBUF_SetVoltageScaling
01315   * @param  Scale This parameter can be one of the following values:
01316   *         @arg @ref LL_VREFBUF_VOLTAGE_SCALE0
01317   *         @arg @ref LL_VREFBUF_VOLTAGE_SCALE1
01318   * @retval None
01319   */
01320 __STATIC_INLINE void LL_VREFBUF_SetVoltageScaling(uint32_t Scale)
01321 {
01322   MODIFY_REG(VREFBUF->CSR, VREFBUF_CSR_VRS, Scale);
01323 }
01324 
01325 /**
01326   * @brief  Get the Voltage reference scale
01327   * @rmtoll VREFBUF_CSR  VRS           LL_VREFBUF_GetVoltageScaling
01328   * @retval Returned value can be one of the following values:
01329   *         @arg @ref LL_VREFBUF_VOLTAGE_SCALE0
01330   *         @arg @ref LL_VREFBUF_VOLTAGE_SCALE1
01331   */
01332 __STATIC_INLINE uint32_t LL_VREFBUF_GetVoltageScaling(void)
01333 {
01334   return (uint32_t)(READ_BIT(VREFBUF->CSR, VREFBUF_CSR_VRS));
01335 }
01336 
01337 /**
01338   * @brief  Check if Voltage reference buffer is ready
01339   * @rmtoll VREFBUF_CSR  VRR           LL_VREFBUF_IsVREFReady
01340   * @retval State of bit (1 or 0).
01341   */
01342 __STATIC_INLINE uint32_t LL_VREFBUF_IsVREFReady(void)
01343 {
01344   return (READ_BIT(VREFBUF->CSR, VREFBUF_CSR_VRR) == (VREFBUF_CSR_VRR));
01345 }
01346 
01347 /**
01348   * @brief  Get the trimming code for VREFBUF calibration
01349   * @rmtoll VREFBUF_CCR  TRIM          LL_VREFBUF_GetTrimming
01350   * @retval Between 0 and 0x3F
01351   */
01352 __STATIC_INLINE uint32_t LL_VREFBUF_GetTrimming(void)
01353 {
01354   return (uint32_t)(READ_BIT(VREFBUF->CCR, VREFBUF_CCR_TRIM));
01355 }
01356 
01357 /**
01358   * @brief  Set the trimming code for VREFBUF calibration (Tune the internal reference buffer voltage)
01359   * @rmtoll VREFBUF_CCR  TRIM          LL_VREFBUF_SetTrimming
01360   * @param  Value Between 0 and 0x3F
01361   * @retval None
01362   */
01363 __STATIC_INLINE void LL_VREFBUF_SetTrimming(uint32_t Value)
01364 {
01365   WRITE_REG(VREFBUF->CCR, Value);
01366 }
01367 
01368 /**
01369   * @}
01370   */
01371 #endif /* VREFBUF */
01372 
01373 /** @defgroup SYSTEM_LL_EF_FLASH FLASH
01374   * @{
01375   */
01376 
01377 /**
01378   * @brief  Set FLASH Latency
01379   * @rmtoll FLASH_ACR    LATENCY       LL_FLASH_SetLatency
01380   * @param  Latency This parameter can be one of the following values:
01381   *         @arg @ref LL_FLASH_LATENCY_0
01382   *         @arg @ref LL_FLASH_LATENCY_1
01383   *         @arg @ref LL_FLASH_LATENCY_2
01384   *         @arg @ref LL_FLASH_LATENCY_3
01385   *         @arg @ref LL_FLASH_LATENCY_4
01386   *         @arg @ref LL_FLASH_LATENCY_5 (*)
01387   *         @arg @ref LL_FLASH_LATENCY_6 (*)
01388   *         @arg @ref LL_FLASH_LATENCY_7 (*)
01389   *         @arg @ref LL_FLASH_LATENCY_8 (*)
01390   *         @arg @ref LL_FLASH_LATENCY_9 (*)
01391   *         @arg @ref LL_FLASH_LATENCY_10 (*)
01392   *         @arg @ref LL_FLASH_LATENCY_11 (*)
01393   *         @arg @ref LL_FLASH_LATENCY_12 (*)
01394   *         @arg @ref LL_FLASH_LATENCY_13 (*)
01395   *         @arg @ref LL_FLASH_LATENCY_14 (*)
01396   *         @arg @ref LL_FLASH_LATENCY_15 (*)
01397   *
01398   *         (*) value not defined in all devices.
01399   * @retval None
01400   */
01401 __STATIC_INLINE void LL_FLASH_SetLatency(uint32_t Latency)
01402 {
01403   MODIFY_REG(FLASH->ACR, FLASH_ACR_LATENCY, Latency);
01404 }
01405 
01406 /**
01407   * @brief  Get FLASH Latency
01408   * @rmtoll FLASH_ACR    LATENCY       LL_FLASH_GetLatency
01409   * @retval Returned value can be one of the following values:
01410   *         @arg @ref LL_FLASH_LATENCY_0
01411   *         @arg @ref LL_FLASH_LATENCY_1
01412   *         @arg @ref LL_FLASH_LATENCY_2
01413   *         @arg @ref LL_FLASH_LATENCY_3
01414   *         @arg @ref LL_FLASH_LATENCY_4
01415   *         @arg @ref LL_FLASH_LATENCY_5 (*)
01416   *         @arg @ref LL_FLASH_LATENCY_6 (*)
01417   *         @arg @ref LL_FLASH_LATENCY_7 (*)
01418   *         @arg @ref LL_FLASH_LATENCY_8 (*)
01419   *         @arg @ref LL_FLASH_LATENCY_9 (*)
01420   *         @arg @ref LL_FLASH_LATENCY_10 (*)
01421   *         @arg @ref LL_FLASH_LATENCY_11 (*)
01422   *         @arg @ref LL_FLASH_LATENCY_12 (*)
01423   *         @arg @ref LL_FLASH_LATENCY_13 (*)
01424   *         @arg @ref LL_FLASH_LATENCY_14 (*)
01425   *         @arg @ref LL_FLASH_LATENCY_15 (*)
01426   *
01427   *         (*) value not defined in all devices.
01428   */
01429 __STATIC_INLINE uint32_t LL_FLASH_GetLatency(void)
01430 {
01431   return (uint32_t)(READ_BIT(FLASH->ACR, FLASH_ACR_LATENCY));
01432 }
01433 
01434 /**
01435   * @brief  Enable Prefetch
01436   * @rmtoll FLASH_ACR    PRFTEN        LL_FLASH_EnablePrefetch
01437   * @retval None
01438   */
01439 __STATIC_INLINE void LL_FLASH_EnablePrefetch(void)
01440 {
01441   SET_BIT(FLASH->ACR, FLASH_ACR_PRFTEN);
01442 }
01443 
01444 /**
01445   * @brief  Disable Prefetch
01446   * @rmtoll FLASH_ACR    PRFTEN        LL_FLASH_DisablePrefetch
01447   * @retval None
01448   */
01449 __STATIC_INLINE void LL_FLASH_DisablePrefetch(void)
01450 {
01451   CLEAR_BIT(FLASH->ACR, FLASH_ACR_PRFTEN);
01452 }
01453 
01454 /**
01455   * @brief  Check if Prefetch buffer is enabled
01456   * @rmtoll FLASH_ACR    PRFTEN        LL_FLASH_IsPrefetchEnabled
01457   * @retval State of bit (1 or 0).
01458   */
01459 __STATIC_INLINE uint32_t LL_FLASH_IsPrefetchEnabled(void)
01460 {
01461   return (READ_BIT(FLASH->ACR, FLASH_ACR_PRFTEN) == (FLASH_ACR_PRFTEN));
01462 }
01463 
01464 /**
01465   * @brief  Enable Instruction cache
01466   * @rmtoll FLASH_ACR    ICEN          LL_FLASH_EnableInstCache
01467   * @retval None
01468   */
01469 __STATIC_INLINE void LL_FLASH_EnableInstCache(void)
01470 {
01471   SET_BIT(FLASH->ACR, FLASH_ACR_ICEN);
01472 }
01473 
01474 /**
01475   * @brief  Disable Instruction cache
01476   * @rmtoll FLASH_ACR    ICEN          LL_FLASH_DisableInstCache
01477   * @retval None
01478   */
01479 __STATIC_INLINE void LL_FLASH_DisableInstCache(void)
01480 {
01481   CLEAR_BIT(FLASH->ACR, FLASH_ACR_ICEN);
01482 }
01483 
01484 /**
01485   * @brief  Enable Data cache
01486   * @rmtoll FLASH_ACR    DCEN          LL_FLASH_EnableDataCache
01487   * @retval None
01488   */
01489 __STATIC_INLINE void LL_FLASH_EnableDataCache(void)
01490 {
01491   SET_BIT(FLASH->ACR, FLASH_ACR_DCEN);
01492 }
01493 
01494 /**
01495   * @brief  Disable Data cache
01496   * @rmtoll FLASH_ACR    DCEN          LL_FLASH_DisableDataCache
01497   * @retval None
01498   */
01499 __STATIC_INLINE void LL_FLASH_DisableDataCache(void)
01500 {
01501   CLEAR_BIT(FLASH->ACR, FLASH_ACR_DCEN);
01502 }
01503 
01504 /**
01505   * @brief  Enable Instruction cache reset
01506   * @note  bit can be written only when the instruction cache is disabled
01507   * @rmtoll FLASH_ACR    ICRST         LL_FLASH_EnableInstCacheReset
01508   * @retval None
01509   */
01510 __STATIC_INLINE void LL_FLASH_EnableInstCacheReset(void)
01511 {
01512   SET_BIT(FLASH->ACR, FLASH_ACR_ICRST);
01513 }
01514 
01515 /**
01516   * @brief  Disable Instruction cache reset
01517   * @rmtoll FLASH_ACR    ICRST         LL_FLASH_DisableInstCacheReset
01518   * @retval None
01519   */
01520 __STATIC_INLINE void LL_FLASH_DisableInstCacheReset(void)
01521 {
01522   CLEAR_BIT(FLASH->ACR, FLASH_ACR_ICRST);
01523 }
01524 
01525 /**
01526   * @brief  Enable Data cache reset
01527   * @note bit can be written only when the data cache is disabled
01528   * @rmtoll FLASH_ACR    DCRST         LL_FLASH_EnableDataCacheReset
01529   * @retval None
01530   */
01531 __STATIC_INLINE void LL_FLASH_EnableDataCacheReset(void)
01532 {
01533   SET_BIT(FLASH->ACR, FLASH_ACR_DCRST);
01534 }
01535 
01536 /**
01537   * @brief  Disable Data cache reset
01538   * @rmtoll FLASH_ACR    DCRST         LL_FLASH_DisableDataCacheReset
01539   * @retval None
01540   */
01541 __STATIC_INLINE void LL_FLASH_DisableDataCacheReset(void)
01542 {
01543   CLEAR_BIT(FLASH->ACR, FLASH_ACR_DCRST);
01544 }
01545 
01546 /**
01547   * @brief  Enable Flash Power-down mode during run mode or Low-power run mode
01548   * @note Flash memory can be put in power-down mode only when the code is executed
01549   *       from RAM
01550   * @note Flash must not be accessed when power down is enabled
01551   * @note Flash must not be put in power-down while a program or an erase operation
01552   *       is on-going
01553   * @rmtoll FLASH_ACR    RUN_PD        LL_FLASH_EnableRunPowerDown\n
01554   *         FLASH_PDKEYR PDKEY1        LL_FLASH_EnableRunPowerDown\n
01555   *         FLASH_PDKEYR PDKEY2        LL_FLASH_EnableRunPowerDown
01556   * @retval None
01557   */
01558 __STATIC_INLINE void LL_FLASH_EnableRunPowerDown(void)
01559 {
01560   /* Following values must be written consecutively to unlock the RUN_PD bit in
01561      FLASH_ACR */
01562   WRITE_REG(FLASH->PDKEYR, FLASH_PDKEY1);
01563   WRITE_REG(FLASH->PDKEYR, FLASH_PDKEY2);
01564   SET_BIT(FLASH->ACR, FLASH_ACR_RUN_PD);
01565 }
01566 
01567 /**
01568   * @brief  Disable Flash Power-down mode during run mode or Low-power run mode
01569   * @rmtoll FLASH_ACR    RUN_PD        LL_FLASH_DisableRunPowerDown\n
01570   *         FLASH_PDKEYR PDKEY1        LL_FLASH_DisableRunPowerDown\n
01571   *         FLASH_PDKEYR PDKEY2        LL_FLASH_DisableRunPowerDown
01572   * @retval None
01573   */
01574 __STATIC_INLINE void LL_FLASH_DisableRunPowerDown(void)
01575 {
01576   /* Following values must be written consecutively to unlock the RUN_PD bit in
01577      FLASH_ACR */
01578   WRITE_REG(FLASH->PDKEYR, FLASH_PDKEY1);
01579   WRITE_REG(FLASH->PDKEYR, FLASH_PDKEY2);
01580   CLEAR_BIT(FLASH->ACR, FLASH_ACR_RUN_PD);
01581 }
01582 
01583 /**
01584   * @brief  Enable Flash Power-down mode during Sleep or Low-power sleep mode
01585   * @note Flash must not be put in power-down while a program or an erase operation
01586   *       is on-going
01587   * @rmtoll FLASH_ACR    SLEEP_PD      LL_FLASH_EnableSleepPowerDown
01588   * @retval None
01589   */
01590 __STATIC_INLINE void LL_FLASH_EnableSleepPowerDown(void)
01591 {
01592   SET_BIT(FLASH->ACR, FLASH_ACR_SLEEP_PD);
01593 }
01594 
01595 /**
01596   * @brief  Disable Flash Power-down mode during Sleep or Low-power sleep mode
01597   * @rmtoll FLASH_ACR    SLEEP_PD      LL_FLASH_DisableSleepPowerDown
01598   * @retval None
01599   */
01600 __STATIC_INLINE void LL_FLASH_DisableSleepPowerDown(void)
01601 {
01602   CLEAR_BIT(FLASH->ACR, FLASH_ACR_SLEEP_PD);
01603 }
01604 
01605 /**
01606   * @}
01607   */
01608 
01609 /**
01610   * @}
01611   */
01612 
01613 /**
01614   * @}
01615   */
01616 
01617 #endif /* defined (FLASH) || defined (SYSCFG) || defined (DBGMCU) || defined (VREFBUF) */
01618 
01619 /**
01620   * @}
01621   */
01622 
01623 #ifdef __cplusplus
01624 }
01625 #endif
01626 
01627 #endif /* STM32L4xx_LL_SYSTEM_H */