]> git.sur5r.net Git - freertos/blob - FreeRTOS/Demo/CORTEX_M7_M4_AMP_STM32H745I_Discovery_IAR/ST_code/STM32H7xx_HAL_Driver/Inc/stm32h7xx_hal_rcc.h
Add M7/M4 AMP demo.
[freertos] / FreeRTOS / Demo / CORTEX_M7_M4_AMP_STM32H745I_Discovery_IAR / ST_code / STM32H7xx_HAL_Driver / Inc / stm32h7xx_hal_rcc.h
1 /**\r
2   ******************************************************************************\r
3   * @file    stm32h7xx_hal_rcc.h\r
4   * @author  MCD Application Team\r
5   * @brief   Header file of RCC HAL module.\r
6   ******************************************************************************\r
7   * @attention\r
8   *\r
9   * <h2><center>&copy; COPYRIGHT(c) 2017 STMicroelectronics.\r
10   * All rights reserved.</center></h2>\r
11   *\r
12   * This software component is licensed by ST under BSD 3-Clause license,\r
13   * the "License"; You may not use this file except in compliance with the\r
14   * License. You may obtain a copy of the License at:\r
15   *                        opensource.org/licenses/BSD-3-Clause\r
16   *\r
17   ******************************************************************************\r
18   */\r
19 \r
20 /* Define to prevent recursive inclusion -------------------------------------*/\r
21 #ifndef STM32H7xx_HAL_RCC_H\r
22 #define STM32H7xx_HAL_RCC_H\r
23 \r
24 #ifdef __cplusplus\r
25  extern "C" {\r
26 #endif\r
27 \r
28 /* Includes ------------------------------------------------------------------*/\r
29 #include "stm32h7xx_hal_def.h"\r
30 \r
31 /** @addtogroup STM32H7xx_HAL_Driver\r
32   * @{\r
33   */\r
34 \r
35 /** @addtogroup RCC\r
36   * @{\r
37   */\r
38 \r
39 /* Exported types ------------------------------------------------------------*/\r
40 \r
41 /** @defgroup RCC_Exported_Types RCC Exported Types\r
42   * @{\r
43   */\r
44 \r
45 /**\r
46   * @brief  RCC PLL configuration structure definition\r
47   */\r
48 typedef struct\r
49 {\r
50   uint32_t PLLState;   /*!< The new state of the PLL.\r
51                             This parameter can be a value of @ref RCC_PLL_Config                      */\r
52 \r
53   uint32_t PLLSource;  /*!< RCC_PLLSource: PLL entry clock source.\r
54                             This parameter must be a value of @ref RCC_PLL_Clock_Source               */\r
55 \r
56   uint32_t PLLM;       /*!< PLLM: Division factor for PLL VCO input clock.\r
57                             This parameter must be a number between Min_Data = 1 and Max_Data = 63    */\r
58 \r
59   uint32_t PLLN;       /*!< PLLN: Multiplication factor for PLL VCO output clock.\r
60                             This parameter must be a number between Min_Data = 4 and Max_Data = 512   */\r
61 \r
62   uint32_t PLLP;       /*!< PLLP: Division factor for system clock.\r
63                             This parameter must be a number between Min_Data = 2 and Max_Data = 128\r
64                           odd division factors are not allowed                                        */\r
65 \r
66   uint32_t PLLQ;       /*!< PLLQ: Division factor for peripheral clocks.\r
67                             This parameter must be a number between Min_Data = 1 and Max_Data = 128   */\r
68 \r
69   uint32_t PLLR;       /*!< PLLR: Division factor for peripheral clocks.\r
70                             This parameter must be a number between Min_Data = 1 and Max_Data = 128   */\r
71   uint32_t PLLRGE;     /*!<PLLRGE: PLL1 clock Input range\r
72                          This parameter must be a value of @ref RCC_PLL1_VCI_Range                    */\r
73   uint32_t PLLVCOSEL;  /*!<PLLVCOSEL: PLL1 clock Output range\r
74                          This parameter must be a value of @ref RCC_PLL1_VCO_Range                    */\r
75 \r
76   uint32_t PLLFRACN;   /*!<PLLFRACN: Specifies Fractional Part Of The Multiplication Factor for\r
77                         PLL1 VCO It should be a value between 0 and 8191                              */\r
78 \r
79 }RCC_PLLInitTypeDef;\r
80 \r
81 \r
82 /**\r
83   * @brief  RCC Internal/External Oscillator (HSE, HSI, CSI, LSE and LSI) configuration structure definition\r
84   */\r
85 typedef struct\r
86 {\r
87   uint32_t OscillatorType;       /*!< The oscillators to be configured.\r
88                                       This parameter can be a value of @ref RCC_Oscillator_Type                   */\r
89 \r
90   uint32_t HSEState;             /*!< The new state of the HSE.\r
91                                       This parameter can be a value of @ref RCC_HSE_Config                        */\r
92 \r
93   uint32_t LSEState;             /*!< The new state of the LSE.\r
94                                       This parameter can be a value of @ref RCC_LSE_Config                        */\r
95 \r
96   uint32_t HSIState;             /*!< The new state of the HSI.\r
97                                       This parameter can be a value of @ref RCC_HSI_Config                        */\r
98 \r
99   uint32_t HSICalibrationValue;  /*!< The calibration trimming value.\r
100                                       This parameter must be a number between Min_Data = 0x00 and Max_Data = 0x3F for STM32H7 rev.Y\r
101                                       This parameter must be a number between Min_Data = 0x00 and Max_Data = 0x7F for STM32H7 rev.B and above */\r
102 \r
103   uint32_t LSIState;             /*!< The new state of the LSI.\r
104                                       This parameter can be a value of @ref RCC_LSI_Config                        */\r
105 \r
106  uint32_t HSI48State;            /*!< The new state of the HSI48.\r
107                                       This parameter can be a value of @ref RCC_HSI48_Config                      */\r
108 \r
109   uint32_t CSIState;             /*!< The new state of the CSI.\r
110                                       This parameter can be a value of @ref RCC_CSI_Config */\r
111 \r
112   uint32_t CSICalibrationValue;  /*!< The calibration trimming value.\r
113                                       This parameter must be a number between Min_Data = 0x00 and Max_Data = 0x1F for STM32H7 rev.Y\r
114                                       This parameter must be a number between Min_Data = 0x00 and Max_Data = 0x3F for STM32H7 rev.B and above */\r
115 \r
116   RCC_PLLInitTypeDef PLL;        /*!< PLL structure parameters                                                    */\r
117 \r
118 }RCC_OscInitTypeDef;\r
119 \r
120 /**\r
121   * @brief  RCC System, AHB and APB busses clock configuration structure definition\r
122   */\r
123 typedef struct\r
124 {\r
125   uint32_t ClockType;             /*!< The clock to be configured.\r
126                                        This parameter can be a value of @ref RCC_System_Clock_Type                          */\r
127 \r
128   uint32_t SYSCLKSource;          /*!< The clock source (SYSCLKS) used as system clock.\r
129                                        This parameter can be a value of @ref RCC_System_Clock_Source                        */\r
130 \r
131   uint32_t SYSCLKDivider;         /*!< The system clock  divider. This parameter can be\r
132                                        a value of @ref RCC_SYS_Clock_Source                                                 */\r
133 \r
134   uint32_t AHBCLKDivider;         /*!< The AHB clock (HCLK) divider. This clock is derived from the system clock (SYSCLK).\r
135                                        This parameter can be a value of @ref RCC_HCLK_Clock_Source                          */\r
136 \r
137   uint32_t APB3CLKDivider;        /*!< The APB3 clock (D1PCLK1) divider. This clock is derived from the AHB clock (HCLK).\r
138                                        This parameter can be a value of @ref RCC_APB3_Clock_Source                        */\r
139 \r
140   uint32_t APB1CLKDivider;        /*!< The APB1 clock (PCLK1) divider. This clock is derived from the AHB clock (HCLK).\r
141                                        This parameter can be a value of @ref RCC_APB1_Clock_Source                        */\r
142   uint32_t APB2CLKDivider;        /*!< The APB2 clock (PCLK2) divider. This clock is derived from the AHB clock (HCLK).\r
143                                        This parameter can be a value of @ref RCC_APB2_Clock_Source                        */\r
144   uint32_t APB4CLKDivider;      /*!< The APB4 clock (D3PCLK1) divider. This clock is derived from the AHB clock (HCLK).\r
145                                        This parameter can be a value of @ref RCC_APB4_Clock_Source                        */\r
146 }RCC_ClkInitTypeDef;\r
147 \r
148 /**\r
149   * @}\r
150   */\r
151 \r
152 /* Exported constants --------------------------------------------------------*/\r
153 \r
154 /** @defgroup RCC_Exported_Constants RCC Exported Constants\r
155   * @{\r
156   */\r
157 \r
158 /** @defgroup RCC_Oscillator_Type  RCC Oscillator Type\r
159   * @{\r
160   */\r
161 #define RCC_OSCILLATORTYPE_NONE        (0x00000000U)\r
162 #define RCC_OSCILLATORTYPE_HSE         (0x00000001U)\r
163 #define RCC_OSCILLATORTYPE_HSI         (0x00000002U)\r
164 #define RCC_OSCILLATORTYPE_LSE         (0x00000004U)\r
165 #define RCC_OSCILLATORTYPE_LSI         (0x00000008U)\r
166 #define RCC_OSCILLATORTYPE_CSI         (0x00000010U)\r
167 #define RCC_OSCILLATORTYPE_HSI48       (0x00000020U)\r
168 \r
169 /**\r
170   * @}\r
171   */\r
172 \r
173 /** @defgroup RCC_HSE_Config  RCC HSE Config\r
174   * @{\r
175   */\r
176 #define RCC_HSE_OFF                    (0x00000000U)\r
177 #define RCC_HSE_ON                     RCC_CR_HSEON\r
178 #define RCC_HSE_BYPASS                 ((uint32_t)(RCC_CR_HSEBYP | RCC_CR_HSEON))\r
179 \r
180 /**\r
181   * @}\r
182   */\r
183 \r
184 /** @defgroup RCC_LSE_Config  RCC LSE Config\r
185   * @{\r
186   */\r
187 #define RCC_LSE_OFF                    (0x00000000U)\r
188 #define RCC_LSE_ON                     RCC_BDCR_LSEON\r
189 #define RCC_LSE_BYPASS                 ((uint32_t)(RCC_BDCR_LSEBYP | RCC_BDCR_LSEON))\r
190 \r
191 /**\r
192   * @}\r
193   */\r
194 \r
195 /** @defgroup RCC_HSI_Config  RCC HSI Config\r
196   * @{\r
197   */\r
198 #define RCC_HSI_OFF                      (0x00000000U)           /*!< HSI clock deactivation */\r
199 #define RCC_HSI_ON                       RCC_CR_HSION                     /*!< HSI clock activation */\r
200 \r
201 #define RCC_HSI_DIV1                     (RCC_CR_HSIDIV_1 | RCC_CR_HSION) /*!< HSI_DIV1 clock activation */\r
202 #define RCC_HSI_DIV2                     (RCC_CR_HSIDIV_2 | RCC_CR_HSION) /*!< HSI_DIV2 clock activation */\r
203 #define RCC_HSI_DIV4                     (RCC_CR_HSIDIV_4 | RCC_CR_HSION) /*!< HSI_DIV4 clock activation */\r
204 #define RCC_HSI_DIV8                     (RCC_CR_HSIDIV | RCC_CR_HSION)   /*!< HSI_DIV8 clock activation */\r
205 \r
206 \r
207 \r
208 #define RCC_HSICALIBRATION_DEFAULT     (0x20U)         /* Default HSI calibration trimming value */\r
209 /**\r
210   * @}\r
211   */\r
212 \r
213 /** @defgroup RCC_HSI48_Config  RCC HSI48 Config\r
214   * @{\r
215   */\r
216 #define RCC_HSI48_OFF                      ((uint8_t)0x00)\r
217 #define RCC_HSI48_ON                       ((uint8_t)0x01)\r
218 \r
219 /**\r
220   * @}\r
221   */\r
222 \r
223 /** @defgroup RCC_LSI_Config  RCC LSI Config\r
224   * @{\r
225   */\r
226 #define RCC_LSI_OFF                    (0x00000000U)\r
227 #define RCC_LSI_ON                     RCC_CSR_LSION\r
228 \r
229 /**\r
230   * @}\r
231   */\r
232 \r
233 /** @defgroup RCC_CSI_Config  RCC CSI Config\r
234   * @{\r
235   */\r
236 #define RCC_CSI_OFF                    (0x00000000U)\r
237 #define RCC_CSI_ON                     RCC_CR_CSION\r
238 \r
239 #define RCC_CSICALIBRATION_DEFAULT     (0x10U)         /* Default CSI calibration trimming value */\r
240 \r
241 /**\r
242   * @}\r
243   */\r
244 \r
245 /** @defgroup RCC_PLL_Config  RCC PLL Config\r
246   * @{\r
247   */\r
248 #define RCC_PLL_NONE                   (0x00000000U)\r
249 #define RCC_PLL_OFF                    (0x00000001U)\r
250 #define RCC_PLL_ON                     (0x00000002U)\r
251 \r
252 /**\r
253   * @}\r
254   */\r
255 \r
256 \r
257 /** @defgroup RCC_PLL_Clock_Source  RCC PLL Clock Source\r
258   * @{\r
259   */\r
260 #define RCC_PLLSOURCE_HSI              (0x00000000U)\r
261 #define RCC_PLLSOURCE_CSI              (0x00000001U)\r
262 #define RCC_PLLSOURCE_HSE              (0x00000002U)\r
263 #define RCC_PLLSOURCE_NONE             (0x00000003U)\r
264 /**\r
265   * @}\r
266   */\r
267 \r
268 /** @defgroup RCC_PLL_Clock_Output  RCC PLL Clock Output\r
269   * @{\r
270   */\r
271 #define RCC_PLL1_DIVP                RCC_PLLCFGR_DIVP1EN\r
272 #define RCC_PLL1_DIVQ                RCC_PLLCFGR_DIVQ1EN\r
273 #define RCC_PLL1_DIVR                RCC_PLLCFGR_DIVR1EN\r
274 \r
275 /**\r
276   * @}\r
277   */\r
278 \r
279 \r
280 \r
281 /** @defgroup RCC_PLL1_VCI_Range  RCC PLL1 VCI Range\r
282   * @{\r
283   */\r
284 #define RCC_PLL1VCIRANGE_0                RCC_PLLCFGR_PLL1RGE_0\r
285 #define RCC_PLL1VCIRANGE_1                RCC_PLLCFGR_PLL1RGE_1\r
286 #define RCC_PLL1VCIRANGE_2                RCC_PLLCFGR_PLL1RGE_2\r
287 #define RCC_PLL1VCIRANGE_3                RCC_PLLCFGR_PLL1RGE_3\r
288 \r
289 \r
290 /**\r
291   * @}\r
292   */\r
293 \r
294 \r
295 /** @defgroup RCC_PLL1_VCO_Range  RCC PLL1 VCO Range\r
296   * @{\r
297   */\r
298 #define RCC_PLL1VCOWIDE                 (0x00000000U)\r
299 #define RCC_PLL1VCOMEDIUM               RCC_PLLCFGR_PLL1VCOSEL\r
300 \r
301 /**\r
302   * @}\r
303   */\r
304 \r
305 \r
306 /** @defgroup RCC_System_Clock_Type  RCC System Clock Type\r
307   * @{\r
308   */\r
309 #define RCC_CLOCKTYPE_SYSCLK           (0x00000001U)\r
310 #define RCC_CLOCKTYPE_HCLK             (0x00000002U)\r
311 #define RCC_CLOCKTYPE_D1PCLK1          (0x00000004U)\r
312 #define RCC_CLOCKTYPE_PCLK1            (0x00000008U)\r
313 #define RCC_CLOCKTYPE_PCLK2            (0x00000010U)\r
314 #define RCC_CLOCKTYPE_D3PCLK1          (0x00000020U)\r
315 \r
316 /**\r
317   * @}\r
318   */\r
319 \r
320 /** @defgroup RCC_System_Clock_Source  RCC System Clock Source\r
321   * @{\r
322   */\r
323 #define RCC_SYSCLKSOURCE_CSI           RCC_CFGR_SW_CSI\r
324 #define RCC_SYSCLKSOURCE_HSI           RCC_CFGR_SW_HSI\r
325 #define RCC_SYSCLKSOURCE_HSE           RCC_CFGR_SW_HSE\r
326 #define RCC_SYSCLKSOURCE_PLLCLK        RCC_CFGR_SW_PLL1\r
327 \r
328 /**\r
329   * @}\r
330   */\r
331 \r
332 /** @defgroup RCC_System_Clock_Source_Status System Clock Source Status\r
333   * @{\r
334   */\r
335 #define RCC_SYSCLKSOURCE_STATUS_CSI    RCC_CFGR_SWS_CSI   /*!< CSI used as system clock */\r
336 #define RCC_SYSCLKSOURCE_STATUS_HSI    RCC_CFGR_SWS_HSI   /*!< HSI used as system clock */\r
337 #define RCC_SYSCLKSOURCE_STATUS_HSE    RCC_CFGR_SWS_HSE   /*!< HSE used as system clock */\r
338 #define RCC_SYSCLKSOURCE_STATUS_PLLCLK RCC_CFGR_SWS_PLL1  /*!< PLL1 used as system clock */\r
339 /**\r
340   * @}\r
341   */\r
342 \r
343 /** @defgroup RCC_SYS_Clock_Source  RCC SYS Clock Source\r
344   * @{\r
345   */\r
346 #define RCC_SYSCLK_DIV1                RCC_D1CFGR_D1CPRE_DIV1\r
347 #define RCC_SYSCLK_DIV2                RCC_D1CFGR_D1CPRE_DIV2\r
348 #define RCC_SYSCLK_DIV4                RCC_D1CFGR_D1CPRE_DIV4\r
349 #define RCC_SYSCLK_DIV8                RCC_D1CFGR_D1CPRE_DIV8\r
350 #define RCC_SYSCLK_DIV16               RCC_D1CFGR_D1CPRE_DIV16\r
351 #define RCC_SYSCLK_DIV64               RCC_D1CFGR_D1CPRE_DIV64\r
352 #define RCC_SYSCLK_DIV128              RCC_D1CFGR_D1CPRE_DIV128\r
353 #define RCC_SYSCLK_DIV256              RCC_D1CFGR_D1CPRE_DIV256\r
354 #define RCC_SYSCLK_DIV512              RCC_D1CFGR_D1CPRE_DIV512\r
355 \r
356 /**\r
357   * @}\r
358   */\r
359 \r
360 \r
361 /** @defgroup RCC_HCLK_Clock_Source  RCC HCLK Clock Source\r
362   * @{\r
363   */\r
364 #define RCC_HCLK_DIV1                RCC_D1CFGR_HPRE_DIV1\r
365 #define RCC_HCLK_DIV2                RCC_D1CFGR_HPRE_DIV2\r
366 #define RCC_HCLK_DIV4                RCC_D1CFGR_HPRE_DIV4\r
367 #define RCC_HCLK_DIV8                RCC_D1CFGR_HPRE_DIV8\r
368 #define RCC_HCLK_DIV16               RCC_D1CFGR_HPRE_DIV16\r
369 #define RCC_HCLK_DIV64               RCC_D1CFGR_HPRE_DIV64\r
370 #define RCC_HCLK_DIV128              RCC_D1CFGR_HPRE_DIV128\r
371 #define RCC_HCLK_DIV256              RCC_D1CFGR_HPRE_DIV256\r
372 #define RCC_HCLK_DIV512              RCC_D1CFGR_HPRE_DIV512\r
373 \r
374 /**\r
375   * @}\r
376   */\r
377 \r
378 /** @defgroup RCC_APB3_Clock_Source  RCC APB3 Clock Source\r
379   * @{\r
380   */\r
381 #define RCC_APB3_DIV1                  RCC_D1CFGR_D1PPRE_DIV1\r
382 #define RCC_APB3_DIV2                  RCC_D1CFGR_D1PPRE_DIV2\r
383 #define RCC_APB3_DIV4                  RCC_D1CFGR_D1PPRE_DIV4\r
384 #define RCC_APB3_DIV8                  RCC_D1CFGR_D1PPRE_DIV8\r
385 #define RCC_APB3_DIV16                 RCC_D1CFGR_D1PPRE_DIV16\r
386 \r
387 /**\r
388   * @}\r
389   */\r
390 \r
391 /** @defgroup RCC_APB1_Clock_Source  RCC APB1 Clock Source\r
392   * @{\r
393   */\r
394 #define RCC_APB1_DIV1                  RCC_D2CFGR_D2PPRE1_DIV1\r
395 #define RCC_APB1_DIV2                  RCC_D2CFGR_D2PPRE1_DIV2\r
396 #define RCC_APB1_DIV4                  RCC_D2CFGR_D2PPRE1_DIV4\r
397 #define RCC_APB1_DIV8                  RCC_D2CFGR_D2PPRE1_DIV8\r
398 #define RCC_APB1_DIV16                 RCC_D2CFGR_D2PPRE1_DIV16\r
399 \r
400 /**\r
401   * @}\r
402   */\r
403 \r
404 /** @defgroup RCC_APB2_Clock_Source  RCC APB2 Clock Source\r
405   * @{\r
406   */\r
407 #define RCC_APB2_DIV1                  RCC_D2CFGR_D2PPRE2_DIV1\r
408 #define RCC_APB2_DIV2                  RCC_D2CFGR_D2PPRE2_DIV2\r
409 #define RCC_APB2_DIV4                  RCC_D2CFGR_D2PPRE2_DIV4\r
410 #define RCC_APB2_DIV8                  RCC_D2CFGR_D2PPRE2_DIV8\r
411 #define RCC_APB2_DIV16                 RCC_D2CFGR_D2PPRE2_DIV16\r
412 \r
413 /**\r
414   * @}\r
415   */\r
416 \r
417 /** @defgroup RCC_APB4_Clock_Source  RCC APB4 Clock Source\r
418   * @{\r
419   */\r
420 #define RCC_APB4_DIV1                  RCC_D3CFGR_D3PPRE_DIV1\r
421 #define RCC_APB4_DIV2                  RCC_D3CFGR_D3PPRE_DIV2\r
422 #define RCC_APB4_DIV4                  RCC_D3CFGR_D3PPRE_DIV4\r
423 #define RCC_APB4_DIV8                  RCC_D3CFGR_D3PPRE_DIV8\r
424 #define RCC_APB4_DIV16                 RCC_D3CFGR_D3PPRE_DIV16\r
425 \r
426 /**\r
427   * @}\r
428   */\r
429 \r
430 /** @defgroup RCC_RTC_Clock_Source  RCC RTC Clock Source\r
431   * @{\r
432   */\r
433 #define RCC_RTCCLKSOURCE_LSE             (0x00000100U)\r
434 #define RCC_RTCCLKSOURCE_LSI             (0x00000200U)\r
435 #define RCC_RTCCLKSOURCE_HSE_DIV2        (0x00002300U)\r
436 #define RCC_RTCCLKSOURCE_HSE_DIV3        (0x00003300U)\r
437 #define RCC_RTCCLKSOURCE_HSE_DIV4        (0x00004300U)\r
438 #define RCC_RTCCLKSOURCE_HSE_DIV5        (0x00005300U)\r
439 #define RCC_RTCCLKSOURCE_HSE_DIV6        (0x00006300U)\r
440 #define RCC_RTCCLKSOURCE_HSE_DIV7        (0x00007300U)\r
441 #define RCC_RTCCLKSOURCE_HSE_DIV8        (0x00008300U)\r
442 #define RCC_RTCCLKSOURCE_HSE_DIV9        (0x00009300U)\r
443 #define RCC_RTCCLKSOURCE_HSE_DIV10       (0x0000A300U)\r
444 #define RCC_RTCCLKSOURCE_HSE_DIV11       (0x0000B300U)\r
445 #define RCC_RTCCLKSOURCE_HSE_DIV12       (0x0000C300U)\r
446 #define RCC_RTCCLKSOURCE_HSE_DIV13       (0x0000D300U)\r
447 #define RCC_RTCCLKSOURCE_HSE_DIV14       (0x0000E300U)\r
448 #define RCC_RTCCLKSOURCE_HSE_DIV15       (0x0000F300U)\r
449 #define RCC_RTCCLKSOURCE_HSE_DIV16       (0x00010300U)\r
450 #define RCC_RTCCLKSOURCE_HSE_DIV17       (0x00011300U)\r
451 #define RCC_RTCCLKSOURCE_HSE_DIV18       (0x00012300U)\r
452 #define RCC_RTCCLKSOURCE_HSE_DIV19       (0x00013300U)\r
453 #define RCC_RTCCLKSOURCE_HSE_DIV20       (0x00014300U)\r
454 #define RCC_RTCCLKSOURCE_HSE_DIV21       (0x00015300U)\r
455 #define RCC_RTCCLKSOURCE_HSE_DIV22       (0x00016300U)\r
456 #define RCC_RTCCLKSOURCE_HSE_DIV23       (0x00017300U)\r
457 #define RCC_RTCCLKSOURCE_HSE_DIV24       (0x00018300U)\r
458 #define RCC_RTCCLKSOURCE_HSE_DIV25       (0x00019300U)\r
459 #define RCC_RTCCLKSOURCE_HSE_DIV26       (0x0001A300U)\r
460 #define RCC_RTCCLKSOURCE_HSE_DIV27       (0x0001B300U)\r
461 #define RCC_RTCCLKSOURCE_HSE_DIV28       (0x0001C300U)\r
462 #define RCC_RTCCLKSOURCE_HSE_DIV29       (0x0001D300U)\r
463 #define RCC_RTCCLKSOURCE_HSE_DIV30       (0x0001E300U)\r
464 #define RCC_RTCCLKSOURCE_HSE_DIV31       (0x0001F300U)\r
465 #define RCC_RTCCLKSOURCE_HSE_DIV32       (0x00020300U)\r
466 #define RCC_RTCCLKSOURCE_HSE_DIV33       (0x00021300U)\r
467 #define RCC_RTCCLKSOURCE_HSE_DIV34       (0x00022300U)\r
468 #define RCC_RTCCLKSOURCE_HSE_DIV35       (0x00023300U)\r
469 #define RCC_RTCCLKSOURCE_HSE_DIV36       (0x00024300U)\r
470 #define RCC_RTCCLKSOURCE_HSE_DIV37       (0x00025300U)\r
471 #define RCC_RTCCLKSOURCE_HSE_DIV38       (0x00026300U)\r
472 #define RCC_RTCCLKSOURCE_HSE_DIV39       (0x00027300U)\r
473 #define RCC_RTCCLKSOURCE_HSE_DIV40       (0x00028300U)\r
474 #define RCC_RTCCLKSOURCE_HSE_DIV41       (0x00029300U)\r
475 #define RCC_RTCCLKSOURCE_HSE_DIV42       (0x0002A300U)\r
476 #define RCC_RTCCLKSOURCE_HSE_DIV43       (0x0002B300U)\r
477 #define RCC_RTCCLKSOURCE_HSE_DIV44       (0x0002C300U)\r
478 #define RCC_RTCCLKSOURCE_HSE_DIV45       (0x0002D300U)\r
479 #define RCC_RTCCLKSOURCE_HSE_DIV46       (0x0002E300U)\r
480 #define RCC_RTCCLKSOURCE_HSE_DIV47       (0x0002F300U)\r
481 #define RCC_RTCCLKSOURCE_HSE_DIV48       (0x00030300U)\r
482 #define RCC_RTCCLKSOURCE_HSE_DIV49       (0x00031300U)\r
483 #define RCC_RTCCLKSOURCE_HSE_DIV50       (0x00032300U)\r
484 #define RCC_RTCCLKSOURCE_HSE_DIV51       (0x00033300U)\r
485 #define RCC_RTCCLKSOURCE_HSE_DIV52       (0x00034300U)\r
486 #define RCC_RTCCLKSOURCE_HSE_DIV53       (0x00035300U)\r
487 #define RCC_RTCCLKSOURCE_HSE_DIV54       (0x00036300U)\r
488 #define RCC_RTCCLKSOURCE_HSE_DIV55       (0x00037300U)\r
489 #define RCC_RTCCLKSOURCE_HSE_DIV56       (0x00038300U)\r
490 #define RCC_RTCCLKSOURCE_HSE_DIV57       (0x00039300U)\r
491 #define RCC_RTCCLKSOURCE_HSE_DIV58       (0x0003A300U)\r
492 #define RCC_RTCCLKSOURCE_HSE_DIV59       (0x0003B300U)\r
493 #define RCC_RTCCLKSOURCE_HSE_DIV60       (0x0003C300U)\r
494 #define RCC_RTCCLKSOURCE_HSE_DIV61       (0x0003D300U)\r
495 #define RCC_RTCCLKSOURCE_HSE_DIV62       (0x0003E300U)\r
496 #define RCC_RTCCLKSOURCE_HSE_DIV63       (0x0003F300U)\r
497 \r
498 \r
499 /**\r
500   * @}\r
501   */\r
502 \r
503 \r
504 /** @defgroup RCC_MCO_Index  RCC MCO Index\r
505   * @{\r
506   */\r
507 #define RCC_MCO1                         (0x00000000U)\r
508 #define RCC_MCO2                         (0x00000001U)\r
509 \r
510 /**\r
511   * @}\r
512   */\r
513 \r
514 /** @defgroup RCC_MCO1_Clock_Source  RCC MCO1 Clock Source\r
515   * @{\r
516   */\r
517 #define RCC_MCO1SOURCE_HSI               (0x00000000U)\r
518 #define RCC_MCO1SOURCE_LSE               RCC_CFGR_MCO1_0\r
519 #define RCC_MCO1SOURCE_HSE               RCC_CFGR_MCO1_1\r
520 #define RCC_MCO1SOURCE_PLL1QCLK          ((uint32_t)RCC_CFGR_MCO1_0 | RCC_CFGR_MCO1_1)\r
521 #define RCC_MCO1SOURCE_HSI48              RCC_CFGR_MCO1_2\r
522 \r
523 /**\r
524   * @}\r
525   */\r
526 \r
527 /** @defgroup RCC_MCO2_Clock_Source  RCC MCO2 Clock Source\r
528   * @{\r
529   */\r
530 #define RCC_MCO2SOURCE_SYSCLK            (0x00000000U)\r
531 #define RCC_MCO2SOURCE_PLL2PCLK          RCC_CFGR_MCO2_0\r
532 #define RCC_MCO2SOURCE_HSE               RCC_CFGR_MCO2_1\r
533 #define RCC_MCO2SOURCE_PLLCLK            ((uint32_t)RCC_CFGR_MCO2_0 | RCC_CFGR_MCO2_1)\r
534 #define RCC_MCO2SOURCE_CSICLK            RCC_CFGR_MCO2_2\r
535 #define RCC_MCO2SOURCE_LSICLK            ((uint32_t)RCC_CFGR_MCO2_0 | RCC_CFGR_MCO2_2)\r
536 \r
537 /**\r
538   * @}\r
539   */\r
540 \r
541 /** @defgroup RCC_MCOx_Clock_Prescaler  RCC MCOx Clock Prescaler\r
542   * @{\r
543   */\r
544 #define RCC_MCODIV_1                    RCC_CFGR_MCO1PRE_0\r
545 #define RCC_MCODIV_2                    RCC_CFGR_MCO1PRE_1\r
546 #define RCC_MCODIV_3                    ((uint32_t)RCC_CFGR_MCO1PRE_0 | RCC_CFGR_MCO1PRE_1)\r
547 #define RCC_MCODIV_4                    RCC_CFGR_MCO1PRE_2\r
548 #define RCC_MCODIV_5                    ((uint32_t)RCC_CFGR_MCO1PRE_0 | RCC_CFGR_MCO1PRE_2)\r
549 #define RCC_MCODIV_6                    ((uint32_t)RCC_CFGR_MCO1PRE_1 | RCC_CFGR_MCO1PRE_2)\r
550 #define RCC_MCODIV_7                    ((uint32_t)RCC_CFGR_MCO1PRE_0 | RCC_CFGR_MCO1PRE_1 | RCC_CFGR_MCO1PRE_2)\r
551 #define RCC_MCODIV_8                    RCC_CFGR_MCO1PRE_3\r
552 #define RCC_MCODIV_9                    ((uint32_t)RCC_CFGR_MCO1PRE_0 | RCC_CFGR_MCO1PRE_3)\r
553 #define RCC_MCODIV_10                   ((uint32_t)RCC_CFGR_MCO1PRE_1 | RCC_CFGR_MCO1PRE_3)\r
554 #define RCC_MCODIV_11                   ((uint32_t)RCC_CFGR_MCO1PRE_0 | RCC_CFGR_MCO1PRE_1 | RCC_CFGR_MCO1PRE_3)\r
555 #define RCC_MCODIV_12                   ((uint32_t)RCC_CFGR_MCO1PRE_2 | RCC_CFGR_MCO1PRE_3)\r
556 #define RCC_MCODIV_13                   ((uint32_t)RCC_CFGR_MCO1PRE_0 | RCC_CFGR_MCO1PRE_2 | RCC_CFGR_MCO1PRE_3)\r
557 #define RCC_MCODIV_14                   ((uint32_t)RCC_CFGR_MCO1PRE_1 | RCC_CFGR_MCO1PRE_2 | RCC_CFGR_MCO1PRE_3)\r
558 #define RCC_MCODIV_15                   RCC_CFGR_MCO1PRE\r
559 \r
560 \r
561 /**\r
562   * @}\r
563   */\r
564 \r
565 /** @defgroup RCC_Interrupt  RCC Interrupt\r
566   * @{\r
567   */\r
568 #define RCC_IT_LSIRDY                  (0x00000001U)\r
569 #define RCC_IT_LSERDY                  (0x00000002U)\r
570 #define RCC_IT_HSIRDY                  (0x00000004U)\r
571 #define RCC_IT_HSERDY                  (0x00000008U)\r
572 #define RCC_IT_CSIRDY                  (0x00000010U)\r
573 #define RCC_IT_HSI48RDY                (0x00000020U)\r
574 #define RCC_IT_PLLRDY                  (0x00000040U)\r
575 #define RCC_IT_PLL2RDY                 (0x00000080U)\r
576 #define RCC_IT_PLL3RDY                 (0x00000100U)\r
577 #define RCC_IT_LSECSS                  (0x00000200U)\r
578 #define RCC_IT_CSS                     (0x00000400U)\r
579 /**\r
580   * @}\r
581   */\r
582 \r
583 /** @defgroup RCC_Flag  RCC Flag\r
584   *        Elements values convention: XXXYYYYYb\r
585   *           - YYYYY  : Flag position in the register\r
586   *           - XXX  : Register index\r
587   *                 - 001: CR register\r
588   *                 - 010: BDCR register\r
589   *                 - 011: CSR register\r
590   *                 - 100: RSR register\r
591   * @{\r
592   */\r
593 /* Flags in the CR register */\r
594 #define RCC_FLAG_HSIRDY                ((uint8_t)0x22)\r
595 #define RCC_FLAG_HSIDIV                ((uint8_t)0x25)\r
596 #define RCC_FLAG_CSIRDY                ((uint8_t)0x28)\r
597 #define RCC_FLAG_HSI48RDY              ((uint8_t)0x2D)\r
598 #define RCC_FLAG_D1CKRDY               ((uint8_t)0x2E)\r
599 #define RCC_FLAG_D2CKRDY               ((uint8_t)0x2F)\r
600 #define RCC_FLAG_HSERDY                ((uint8_t)0x31)\r
601 #define RCC_FLAG_PLLRDY                ((uint8_t)0x39)\r
602 #define RCC_FLAG_PLL2RDY               ((uint8_t)0x3B)\r
603 #define RCC_FLAG_PLL3RDY               ((uint8_t)0x3D)\r
604 /* Flags in the BDCR register */\r
605 #define RCC_FLAG_LSERDY                ((uint8_t)0x41)\r
606 \r
607 /* Flags in the CSR register */\r
608 #define RCC_FLAG_LSIRDY                ((uint8_t)0x61)\r
609 \r
610 /* Flags in the RSR register */\r
611 #define RCC_FLAG_CPURST                ((uint8_t)0x91)\r
612 \r
613 #define RCC_FLAG_D1RST                 ((uint8_t)0x93)\r
614 #define RCC_FLAG_D2RST                 ((uint8_t)0x94)\r
615 #define RCC_FLAG_BORRST                ((uint8_t)0x95)\r
616 #define RCC_FLAG_PINRST                ((uint8_t)0x96)\r
617 #define RCC_FLAG_PORRST                ((uint8_t)0x97)\r
618 #define RCC_FLAG_SFTRST                ((uint8_t)0x98)\r
619 #define RCC_FLAG_IWDG1RST              ((uint8_t)0x9A)\r
620 #define RCC_FLAG_WWDG1RST              ((uint8_t)0x9C)\r
621 #define RCC_FLAG_LPWR1RST              ((uint8_t)0x9E)\r
622 #define RCC_FLAG_LPWR2RST              ((uint8_t)0x9F)\r
623 \r
624 #if defined(DUAL_CORE)\r
625 #define RCC_FLAG_C1RST                 (RCC_FLAG_CPURST)\r
626 #define RCC_FLAG_C2RST                 ((uint8_t)0x92)\r
627 #define RCC_FLAG_SFTR1ST               (RCC_FLAG_SFTRST)\r
628 #define RCC_FLAG_SFTR2ST               ((uint8_t)0x99)\r
629 #define RCC_FLAG_WWDG2RST              ((uint8_t)0x9D)\r
630 #define RCC_FLAG_IWDG2RST              ((uint8_t)0x9B)\r
631 #endif /*DUAL_CORE*/\r
632 \r
633 \r
634 /**\r
635   * @}\r
636   */\r
637 \r
638 /** @defgroup RCC_LSEDrive_Config LSE Drive Config\r
639   * @{\r
640   */\r
641 #define RCC_LSEDRIVE_LOW                 (0x00000000U) /*!< LSE low drive capability */\r
642 #define RCC_LSEDRIVE_MEDIUMLOW           RCC_BDCR_LSEDRV_0      /*!< LSE medium low drive capability */\r
643 #define RCC_LSEDRIVE_MEDIUMHIGH          RCC_BDCR_LSEDRV_1      /*!< LSE medium high drive capability */\r
644 #define RCC_LSEDRIVE_HIGH                RCC_BDCR_LSEDRV        /*!< LSE high drive capability */\r
645 /**\r
646   * @}\r
647   */\r
648 \r
649 /** @defgroup RCC_Stop_WakeUpClock  RCC Stop WakeUpClock\r
650   * @{\r
651   */\r
652 #define RCC_STOP_WAKEUPCLOCK_HSI       (0x00000000U)\r
653 #define RCC_STOP_WAKEUPCLOCK_CSI       RCC_CFGR_STOPWUCK\r
654 \r
655 /**\r
656   * @}\r
657   */\r
658 \r
659 /** @defgroup RCC_Stop_KernelWakeUpClock  RCC Stop KernelWakeUpClock\r
660   * @{\r
661   */\r
662 #define RCC_STOP_KERWAKEUPCLOCK_HSI       (0x00000000U)\r
663 #define RCC_STOP_KERWAKEUPCLOCK_CSI        RCC_CFGR_STOPKERWUCK\r
664 \r
665 \r
666 /**\r
667   * @}\r
668   */\r
669 /**\r
670   * @}\r
671   */\r
672 \r
673 /* Exported macros -----------------------------------------------------------*/\r
674 \r
675 /** @defgroup RCC_Exported_Macros RCC Exported Macros\r
676   * @{\r
677   */\r
678 \r
679 /** @brief  Enable or disable the AHB3 peripheral clock.\r
680   * @note   After reset, the peripheral clock (used for registers read/write access)\r
681   *         is disabled and the application software has to enable this clock before\r
682   *         using it.\r
683   */\r
684 #define __HAL_RCC_MDMA_CLK_ENABLE()   do { \\r
685                                         __IO uint32_t tmpreg; \\r
686                                         SET_BIT(RCC->AHB3ENR, RCC_AHB3ENR_MDMAEN);\\r
687                                         /* Delay after an RCC peripheral clock enabling */ \\r
688                                         tmpreg = READ_BIT(RCC->AHB3ENR, RCC_AHB3ENR_MDMAEN);\\r
689                                         UNUSED(tmpreg); \\r
690                                        } while(0)\r
691 \r
692 #define __HAL_RCC_DMA2D_CLK_ENABLE()   do { \\r
693                                         __IO uint32_t tmpreg; \\r
694                                         SET_BIT(RCC->AHB3ENR, RCC_AHB3ENR_DMA2DEN);\\r
695                                         /* Delay after an RCC peripheral clock enabling */ \\r
696                                         tmpreg = READ_BIT(RCC->AHB3ENR, RCC_AHB3ENR_DMA2DEN);\\r
697                                         UNUSED(tmpreg); \\r
698                                        } while(0)\r
699 #if defined(JPEG)\r
700 #define __HAL_RCC_JPGDECEN_CLK_ENABLE()   do { \\r
701                                         __IO uint32_t tmpreg; \\r
702                                         SET_BIT(RCC->AHB3ENR, RCC_AHB3ENR_JPGDECEN);\\r
703                                         /* Delay after an RCC peripheral clock enabling */ \\r
704                                         tmpreg = READ_BIT(RCC->AHB3ENR, RCC_AHB3ENR_JPGDECEN);\\r
705                                         UNUSED(tmpreg); \\r
706                                        } while(0)\r
707 #endif /* JPEG */\r
708 \r
709 \r
710 #define __HAL_RCC_FMC_CLK_ENABLE()   do { \\r
711                                         __IO uint32_t tmpreg; \\r
712                                         SET_BIT(RCC->AHB3ENR, RCC_AHB3ENR_FMCEN);\\r
713                                         /* Delay after an RCC peripheral clock enabling */ \\r
714                                         tmpreg = READ_BIT(RCC->AHB3ENR, RCC_AHB3ENR_FMCEN);\\r
715                                         UNUSED(tmpreg); \\r
716                                        } while(0)\r
717 \r
718 #define __HAL_RCC_QSPI_CLK_ENABLE()   do { \\r
719                                         __IO uint32_t tmpreg; \\r
720                                         SET_BIT(RCC->AHB3ENR, RCC_AHB3ENR_QSPIEN);\\r
721                                         /* Delay after an RCC peripheral clock enabling */ \\r
722                                         tmpreg = READ_BIT(RCC->AHB3ENR, RCC_AHB3ENR_QSPIEN);\\r
723                                         UNUSED(tmpreg); \\r
724                                        } while(0)\r
725 \r
726 #define __HAL_RCC_SDMMC1_CLK_ENABLE()   do { \\r
727                                         __IO uint32_t tmpreg; \\r
728                                         SET_BIT(RCC->AHB3ENR, RCC_AHB3ENR_SDMMC1EN);\\r
729                                         /* Delay after an RCC peripheral clock enabling */ \\r
730                                         tmpreg = READ_BIT(RCC->AHB3ENR, RCC_AHB3ENR_SDMMC1EN);\\r
731                                         UNUSED(tmpreg); \\r
732                                        } while(0)\r
733 \r
734 \r
735 #define __HAL_RCC_MDMA_CLK_DISABLE()            (RCC->AHB3ENR &= ~ (RCC_AHB3ENR_MDMAEN))\r
736 #define __HAL_RCC_DMA2D_CLK_DISABLE()           (RCC->AHB3ENR &= ~ (RCC_AHB3ENR_DMA2DEN))\r
737 \r
738 #if defined(JPEG)\r
739 #define __HAL_RCC_JPGDECEN_CLK_DISABLE()        (RCC->AHB3ENR &= ~ (RCC_AHB3ENR_JPGDECEN))\r
740 #endif /* JPEG */\r
741 \r
742 #define __HAL_RCC_FMC_CLK_DISABLE()             (RCC->AHB3ENR &= ~ (RCC_AHB3ENR_FMCEN))\r
743 #define __HAL_RCC_QSPI_CLK_DISABLE()            (RCC->AHB3ENR &= ~ (RCC_AHB3ENR_QSPIEN))\r
744 #define __HAL_RCC_SDMMC1_CLK_DISABLE()          (RCC->AHB3ENR &= ~ (RCC_AHB3ENR_SDMMC1EN))\r
745 \r
746 \r
747 /** @brief  Get the enable or disable status of the AHB3 peripheral clock\r
748   * @note   After reset, the peripheral clock (used for registers read/write access)\r
749   *         is disabled and the application software has to enable this clock before\r
750   *         using it.\r
751   */\r
752 \r
753 #define __HAL_RCC_MDMA_IS_CLK_ENABLED()          ((RCC->AHB3ENR & RCC_AHB3ENR_MDMAEN)   != 0U)\r
754 #define __HAL_RCC_DMA2D_IS_CLK_ENABLED()         ((RCC->AHB3ENR & RCC_AHB3ENR_DMA2DEN)  != 0U)\r
755 \r
756 #if defined(JPEG)\r
757 #define __HAL_RCC_JPGDECEN_IS_CLK_ENABLED()      ((RCC->AHB3ENR & RCC_AHB3ENR_JPGDECEN) != 0U)\r
758 #endif /* JPEG */\r
759 \r
760 #define __HAL_RCC_FMC_IS_CLK_ENABLED()           ((RCC->AHB3ENR & RCC_AHB3ENR_FMCEN)    != 0U)\r
761 #define __HAL_RCC_QSPI_IS_CLK_ENABLED()          ((RCC->AHB3ENR & RCC_AHB3ENR_QSPIEN)   != 0U)\r
762 #define __HAL_RCC_SDMMC1_IS_CLK_ENABLED()        ((RCC->AHB3ENR & RCC_AHB3ENR_SDMMC1EN) != 0U)\r
763 \r
764 #define __HAL_RCC_MDMA_IS_CLK_DISABLED()         ((RCC->AHB3ENR & RCC_AHB3ENR_MDMAEN)   == 0U)\r
765 #define __HAL_RCC_DMA2D_IS_CLK_DISABLED()        ((RCC->AHB3ENR & RCC_AHB3ENR_DMA2DEN)  == 0U)\r
766 \r
767 #if defined(JPEG)\r
768 #define __HAL_RCC_JPGDECEN_IS_CLK_DISABLED()     ((RCC->AHB3ENR & RCC_AHB3ENR_JPGDECEN) == 0U)\r
769 #endif /* JPEG */\r
770 \r
771 #define __HAL_RCC_FMC_IS_CLK_DISABLED()          ((RCC->AHB3ENR & RCC_AHB3ENR_FMCEN)    == 0U)\r
772 #define __HAL_RCC_QSPI_IS_CLK_DISABLED()         ((RCC->AHB3ENR & RCC_AHB3ENR_QSPIEN)   == 0U)\r
773 #define __HAL_RCC_SDMMC1_IS_CLK_DISABLED()       ((RCC->AHB3ENR & RCC_AHB3ENR_SDMMC1EN) == 0U)\r
774 \r
775 \r
776 /** @brief  Enable or disable the AHB1 peripheral clock.\r
777   * @note   After reset, the peripheral clock (used for registers read/write access)\r
778   *         is disabled and the application software has to enable this clock before\r
779   *         using it.\r
780   */\r
781 \r
782 #define __HAL_RCC_DMA1_CLK_ENABLE()   do { \\r
783                                         __IO uint32_t tmpreg; \\r
784                                         SET_BIT(RCC->AHB1ENR, RCC_AHB1ENR_DMA1EN);\\r
785                                         /* Delay after an RCC peripheral clock enabling */ \\r
786                                         tmpreg = READ_BIT(RCC->AHB1ENR, RCC_AHB1ENR_DMA1EN);\\r
787                                         UNUSED(tmpreg); \\r
788                                        } while(0)\r
789 \r
790 #define __HAL_RCC_DMA2_CLK_ENABLE()   do { \\r
791                                         __IO uint32_t tmpreg; \\r
792                                         SET_BIT(RCC->AHB1ENR, RCC_AHB1ENR_DMA2EN);\\r
793                                         /* Delay after an RCC peripheral clock enabling */ \\r
794                                         tmpreg = READ_BIT(RCC->AHB1ENR, RCC_AHB1ENR_DMA2EN);\\r
795                                         UNUSED(tmpreg); \\r
796                                        } while(0)\r
797 \r
798 #define __HAL_RCC_ADC12_CLK_ENABLE()   do { \\r
799                                         __IO uint32_t tmpreg; \\r
800                                         SET_BIT(RCC->AHB1ENR, RCC_AHB1ENR_ADC12EN);\\r
801                                         /* Delay after an RCC peripheral clock enabling */ \\r
802                                         tmpreg = READ_BIT(RCC->AHB1ENR, RCC_AHB1ENR_ADC12EN);\\r
803                                         UNUSED(tmpreg); \\r
804                                        } while(0)\r
805 \r
806 #if defined(DUAL_CORE)\r
807 #define __HAL_RCC_ART_CLK_ENABLE()   do { \\r
808                                         __IO uint32_t tmpreg; \\r
809                                         SET_BIT(RCC->AHB1ENR, RCC_AHB1ENR_ARTEN);\\r
810                                         /* Delay after an RCC peripheral clock enabling */ \\r
811                                         tmpreg = READ_BIT(RCC->AHB1ENR, RCC_AHB1ENR_ARTEN);\\r
812                                         UNUSED(tmpreg); \\r
813                                        } while(0)\r
814 #endif /*DUAL_CORE*/\r
815 \r
816 #define __HAL_RCC_ETH1MAC_CLK_ENABLE()   do { \\r
817                                         __IO uint32_t tmpreg; \\r
818                                         SET_BIT(RCC->AHB1ENR, RCC_AHB1ENR_ETH1MACEN);\\r
819                                         /* Delay after an RCC peripheral clock enabling */ \\r
820                                         tmpreg = READ_BIT(RCC->AHB1ENR, RCC_AHB1ENR_ETH1MACEN);\\r
821                                         UNUSED(tmpreg); \\r
822                                        } while(0)\r
823 \r
824 #define __HAL_RCC_ETH1TX_CLK_ENABLE()   do { \\r
825                                         __IO uint32_t tmpreg; \\r
826                                         SET_BIT(RCC->AHB1ENR, RCC_AHB1ENR_ETH1TXEN);\\r
827                                         /* Delay after an RCC peripheral clock enabling */ \\r
828                                         tmpreg = READ_BIT(RCC->AHB1ENR, RCC_AHB1ENR_ETH1TXEN);\\r
829                                         UNUSED(tmpreg); \\r
830                                        } while(0)\r
831 \r
832 #define __HAL_RCC_ETH1RX_CLK_ENABLE()   do { \\r
833                                         __IO uint32_t tmpreg; \\r
834                                         SET_BIT(RCC->AHB1ENR, RCC_AHB1ENR_ETH1RXEN);\\r
835                                         /* Delay after an RCC peripheral clock enabling */ \\r
836                                         tmpreg = READ_BIT(RCC->AHB1ENR, RCC_AHB1ENR_ETH1RXEN);\\r
837                                         UNUSED(tmpreg); \\r
838                                        } while(0)\r
839 \r
840 #define __HAL_RCC_USB1_OTG_HS_CLK_ENABLE()   do { \\r
841                                         __IO uint32_t tmpreg; \\r
842                                         SET_BIT(RCC->AHB1ENR, RCC_AHB1ENR_USB1OTGHSEN);\\r
843                                         /* Delay after an RCC peripheral clock enabling */ \\r
844                                         tmpreg = READ_BIT(RCC->AHB1ENR, RCC_AHB1ENR_USB1OTGHSEN);\\r
845                                         UNUSED(tmpreg); \\r
846                                        } while(0)\r
847 \r
848 #define __HAL_RCC_USB1_OTG_HS_ULPI_CLK_ENABLE()   do { \\r
849                                         __IO uint32_t tmpreg; \\r
850                                         SET_BIT(RCC->AHB1ENR, RCC_AHB1ENR_USB1OTGHSULPIEN);\\r
851                                         /* Delay after an RCC peripheral clock enabling */ \\r
852                                         tmpreg = READ_BIT(RCC->AHB1ENR, RCC_AHB1ENR_USB1OTGHSULPIEN);\\r
853                                         UNUSED(tmpreg); \\r
854                                        } while(0)\r
855 \r
856 #define __HAL_RCC_USB2_OTG_FS_CLK_ENABLE()   do { \\r
857                                         __IO uint32_t tmpreg; \\r
858                                         SET_BIT(RCC->AHB1ENR, RCC_AHB1ENR_USB2OTGHSEN);\\r
859                                         /* Delay after an RCC peripheral clock enabling */ \\r
860                                         tmpreg = READ_BIT(RCC->AHB1ENR, RCC_AHB1ENR_USB2OTGHSEN);\\r
861                                         UNUSED(tmpreg); \\r
862                                        } while(0)\r
863 \r
864 #define __HAL_RCC_USB2_OTG_FS_ULPI_CLK_ENABLE()   do { \\r
865                                         __IO uint32_t tmpreg; \\r
866                                         SET_BIT(RCC->AHB1ENR, RCC_AHB1ENR_USB2OTGHSULPIEN);\\r
867                                         /* Delay after an RCC peripheral clock enabling */ \\r
868                                         tmpreg = READ_BIT(RCC->AHB1ENR, RCC_AHB1ENR_USB2OTGHSULPIEN);\\r
869                                         UNUSED(tmpreg); \\r
870                                        } while(0)\r
871 \r
872 #define __HAL_RCC_DMA1_CLK_DISABLE()             (RCC->AHB1ENR &= ~ (RCC_AHB1ENR_DMA1EN))\r
873 #define __HAL_RCC_DMA2_CLK_DISABLE()             (RCC->AHB1ENR &= ~ (RCC_AHB1ENR_DMA2EN))\r
874 #define __HAL_RCC_ADC12_CLK_DISABLE()            (RCC->AHB1ENR &= ~ (RCC_AHB1ENR_ADC12EN))\r
875 #if defined(DUAL_CORE)\r
876 #define __HAL_RCC_ART_CLK_DISABLE()              (RCC->AHB1ENR &= ~ (RCC_AHB1ENR_ARTEN))\r
877 #endif /*DUAL_CORE*/\r
878 #define __HAL_RCC_ETH1MAC_CLK_DISABLE()          (RCC->AHB1ENR &= ~ (RCC_AHB1ENR_ETH1MACEN))\r
879 #define __HAL_RCC_ETH1TX_CLK_DISABLE()           (RCC->AHB1ENR &= ~ (RCC_AHB1ENR_ETH1TXEN))\r
880 #define __HAL_RCC_ETH1RX_CLK_DISABLE()           (RCC->AHB1ENR &= ~ (RCC_AHB1ENR_ETH1RXEN))\r
881 #define __HAL_RCC_USB1_OTG_HS_CLK_DISABLE()      (RCC->AHB1ENR &= ~ (RCC_AHB1ENR_USB1OTGHSEN))\r
882 #define __HAL_RCC_USB1_OTG_HS_ULPI_CLK_DISABLE() (RCC->AHB1ENR &= ~ (RCC_AHB1ENR_USB1OTGHSULPIEN))\r
883 #define __HAL_RCC_USB2_OTG_FS_CLK_DISABLE()      (RCC->AHB1ENR &= ~ (RCC_AHB1ENR_USB2OTGHSEN))\r
884 #define __HAL_RCC_USB2_OTG_FS_ULPI_CLK_DISABLE() (RCC->AHB1ENR &= ~ (RCC_AHB1ENR_USB2OTGHSULPIEN))\r
885 \r
886 \r
887 /** @brief  Get the enable or disable status of the AHB1 peripheral clock\r
888   * @note   After reset, the peripheral clock (used for registers read/write access)\r
889   *         is disabled and the application software has to enable this clock before\r
890   *         using it.\r
891   */\r
892 \r
893 #define __HAL_RCC_DMA1_IS_CLK_ENABLED()              ((RCC->AHB1ENR & RCC_AHB1ENR_DMA1EN)          != 0U)\r
894 #define __HAL_RCC_DMA2_IS_CLK_ENABLED()              ((RCC->AHB1ENR & RCC_AHB1ENR_DMA2EN)          != 0U)\r
895 #define __HAL_RCC_ADC12_IS_CLK_ENABLED()             ((RCC->AHB1ENR & RCC_AHB1ENR_ADC12EN)         != 0U)\r
896 #if defined(DUAL_CORE)\r
897 #define __HAL_RCC_ART_IS_CLK_ENABLED()               ((RCC->AHB1ENR & RCC_AHB1ENR_ARTEN)           != 0U)\r
898 #endif /*DUAL_CORE*/\r
899 #define __HAL_RCC_ETH1MAC_IS_CLK_ENABLED()           ((RCC->AHB1ENR & RCC_AHB1ENR_ETH1MACEN)       != 0U)\r
900 #define __HAL_RCC_ETH1TX_IS_CLK_ENABLED()            ((RCC->AHB1ENR & RCC_AHB1ENR_ETH1TXEN)        != 0U)\r
901 #define __HAL_RCC_ETH1RX_IS_CLK_ENABLED()            ((RCC->AHB1ENR & RCC_AHB1ENR_ETH1RXEN)        != 0U)\r
902 #define __HAL_RCC_USB1_OTG_HS_IS_CLK_ENABLED()       ((RCC->AHB1ENR & RCC_AHB1ENR_USB1OTGHSEN)     != 0U)\r
903 #define __HAL_RCC_USB1_OTG_HS_ULPI_IS_CLK_ENABLED()  ((RCC->AHB1ENR & RCC_AHB1ENR_USB1OTGHSULPIEN) != 0U)\r
904 #define __HAL_RCC_USB2_OTG_FS_IS_CLK_ENABLED()       ((RCC->AHB1ENR & RCC_AHB1ENR_USB2OTGHSEN)     != 0U)\r
905 #define __HAL_RCC_USB2_OTG_FS_ULPI_IS_CLK_ENABLED()  ((RCC->AHB1ENR & RCC_AHB1ENR_USB2OTGHSULPIEN) != 0U)\r
906 \r
907 #define __HAL_RCC_DMA1_IS_CLK_DISABLED()             ((RCC->AHB1ENR & RCC_AHB1ENR_DMA1EN)          == 0U)\r
908 #define __HAL_RCC_DMA2_IS_CLK_DISABLED()             ((RCC->AHB1ENR & RCC_AHB1ENR_DMA2EN)          == 0U)\r
909 #define __HAL_RCC_ADC12_IS_CLK_DISABLED()            ((RCC->AHB1ENR & RCC_AHB1ENR_ADC12EN)         == 0U)\r
910 #if defined(DUAL_CORE)\r
911 #define __HAL_RCC_ART_IS_CLK_DISABLED()              ((RCC->AHB1ENR & RCC_AHB1ENR_ARTEN)           == 0U)\r
912 #endif /*DUAL_CORE*/\r
913 #define __HAL_RCC_ETH1MAC_IS_CLK_DISABLED()          ((RCC->AHB1ENR & RCC_AHB1ENR_ETH1MACEN)       == 0U)\r
914 #define __HAL_RCC_ETH1TX_IS_CLK_DISABLED()           ((RCC->AHB1ENR & RCC_AHB1ENR_ETH1TXEN)        == 0U)\r
915 #define __HAL_RCC_ETH1RX_IS_CLK_DISABLED()           ((RCC->AHB1ENR & RCC_AHB1ENR_ETH1RXEN)        == 0U)\r
916 #define __HAL_RCC_USB1_OTG_HS_IS_CLK_DISABLED()      ((RCC->AHB1ENR & RCC_AHB1ENR_USB1OTGHSEN)     == 0U)\r
917 #define __HAL_RCC_USB1_OTG_HS_ULPI_IS_CLK_DISABLED() ((RCC->AHB1ENR & RCC_AHB1ENR_USB1OTGHSULPIEN) == 0U)\r
918 #define __HAL_RCC_USB2_OTG_FS_IS_CLK_DISABLED()      ((RCC->AHB1ENR & RCC_AHB1ENR_USB2OTGHSEN)     == 0U)\r
919 #define __HAL_RCC_USB2_OTG_FS_ULPI_IS_CLK_DISABLED() ((RCC->AHB1ENR & RCC_AHB1ENR_USB2OTGHSULPIEN) == 0U)\r
920 \r
921 /** @brief  Enable or disable the AHB2 peripheral clock.\r
922   * @note   After reset, the peripheral clock (used for registers read/write access)\r
923   *         is disabled and the application software has to enable this clock before\r
924   *         using it.\r
925   */\r
926 \r
927 #define __HAL_RCC_DCMI_CLK_ENABLE()   do { \\r
928                                         __IO uint32_t tmpreg; \\r
929                                         SET_BIT(RCC->AHB2ENR, RCC_AHB2ENR_DCMIEN);\\r
930                                         /* Delay after an RCC peripheral clock enabling */ \\r
931                                         tmpreg = READ_BIT(RCC->AHB2ENR, RCC_AHB2ENR_DCMIEN);\\r
932                                         UNUSED(tmpreg); \\r
933                                        } while(0)\r
934 \r
935 #define __HAL_RCC_CRYP_CLK_ENABLE()   do { \\r
936                                         __IO uint32_t tmpreg; \\r
937                                         SET_BIT(RCC->AHB2ENR, RCC_AHB2ENR_CRYPEN);\\r
938                                         /* Delay after an RCC peripheral clock enabling */ \\r
939                                         tmpreg = READ_BIT(RCC->AHB2ENR, RCC_AHB2ENR_CRYPEN);\\r
940                                         UNUSED(tmpreg); \\r
941                                        } while(0)\r
942 \r
943 #define __HAL_RCC_HASH_CLK_ENABLE()   do { \\r
944                                         __IO uint32_t tmpreg; \\r
945                                         SET_BIT(RCC->AHB2ENR, RCC_AHB2ENR_HASHEN);\\r
946                                         /* Delay after an RCC peripheral clock enabling */ \\r
947                                         tmpreg = READ_BIT(RCC->AHB2ENR, RCC_AHB2ENR_HASHEN);\\r
948                                         UNUSED(tmpreg); \\r
949                                        } while(0)\r
950 \r
951 #define __HAL_RCC_RNG_CLK_ENABLE()   do { \\r
952                                         __IO uint32_t tmpreg; \\r
953                                         SET_BIT(RCC->AHB2ENR, RCC_AHB2ENR_RNGEN);\\r
954                                         /* Delay after an RCC peripheral clock enabling */ \\r
955                                         tmpreg = READ_BIT(RCC->AHB2ENR, RCC_AHB2ENR_RNGEN);\\r
956                                         UNUSED(tmpreg); \\r
957                                        } while(0)\r
958 \r
959 #define __HAL_RCC_SDMMC2_CLK_ENABLE()   do { \\r
960                                         __IO uint32_t tmpreg; \\r
961                                         SET_BIT(RCC->AHB2ENR, RCC_AHB2ENR_SDMMC2EN);\\r
962                                         /* Delay after an RCC peripheral clock enabling */ \\r
963                                         tmpreg = READ_BIT(RCC->AHB2ENR, RCC_AHB2ENR_SDMMC2EN);\\r
964                                         UNUSED(tmpreg); \\r
965                                        } while(0)\r
966 \r
967 #define __HAL_RCC_D2SRAM1_CLK_ENABLE()   do { \\r
968                                         __IO uint32_t tmpreg; \\r
969                                         SET_BIT(RCC->AHB2ENR, RCC_AHB2ENR_D2SRAM1EN);\\r
970                                         /* Delay after an RCC peripheral clock enabling */ \\r
971                                         tmpreg = READ_BIT(RCC->AHB2ENR, RCC_AHB2ENR_D2SRAM1EN);\\r
972                                         UNUSED(tmpreg); \\r
973                                        } while(0)\r
974 \r
975 #define __HAL_RCC_D2SRAM2_CLK_ENABLE()   do { \\r
976                                         __IO uint32_t tmpreg; \\r
977                                         SET_BIT(RCC->AHB2ENR, RCC_AHB2ENR_D2SRAM2EN);\\r
978                                         /* Delay after an RCC peripheral clock enabling */ \\r
979                                         tmpreg = READ_BIT(RCC->AHB2ENR, RCC_AHB2ENR_D2SRAM2EN);\\r
980                                         UNUSED(tmpreg); \\r
981                                        } while(0)\r
982 \r
983 #define __HAL_RCC_D2SRAM3_CLK_ENABLE()   do { \\r
984                                         __IO uint32_t tmpreg; \\r
985                                         SET_BIT(RCC->AHB2ENR, RCC_AHB2ENR_D2SRAM3EN);\\r
986                                         /* Delay after an RCC peripheral clock enabling */ \\r
987                                         tmpreg = READ_BIT(RCC->AHB2ENR, RCC_AHB2ENR_D2SRAM3EN);\\r
988                                         UNUSED(tmpreg); \\r
989                                        } while(0)\r
990 \r
991 #define __HAL_RCC_DCMI_CLK_DISABLE()             (RCC->AHB2ENR &= ~ (RCC_AHB2ENR_DCMIEN))\r
992 #define __HAL_RCC_CRYP_CLK_DISABLE()             (RCC->AHB2ENR &= ~ (RCC_AHB2ENR_CRYPEN))\r
993 #define __HAL_RCC_HASH_CLK_DISABLE()             (RCC->AHB2ENR &= ~ (RCC_AHB2ENR_HASHEN))\r
994 #define __HAL_RCC_RNG_CLK_DISABLE()              (RCC->AHB2ENR &= ~ (RCC_AHB2ENR_RNGEN))\r
995 #define __HAL_RCC_SDMMC2_CLK_DISABLE()           (RCC->AHB2ENR &= ~ (RCC_AHB2ENR_SDMMC2EN))\r
996 #define __HAL_RCC_D2SRAM1_CLK_DISABLE()          (RCC->AHB2ENR &= ~ (RCC_AHB2ENR_D2SRAM1EN))\r
997 #define __HAL_RCC_D2SRAM2_CLK_DISABLE()          (RCC->AHB2ENR &= ~ (RCC_AHB2ENR_D2SRAM2EN))\r
998 #define __HAL_RCC_D2SRAM3_CLK_DISABLE()          (RCC->AHB2ENR &= ~ (RCC_AHB2ENR_D2SRAM3EN))\r
999 \r
1000 \r
1001 /** @brief  Get the enable or disable status of the AHB2 peripheral clock\r
1002   * @note   After reset, the peripheral clock (used for registers read/write access)\r
1003   *         is disabled and the application software has to enable this clock before\r
1004   *         using it.\r
1005   */\r
1006 \r
1007 #define __HAL_RCC_DCMI_IS_CLK_ENABLED()              ((RCC->AHB2ENR & RCC_AHB2ENR_DCMIEN)    != 0U)\r
1008 #define __HAL_RCC_CRYP_IS_CLK_ENABLED()              ((RCC->AHB2ENR & RCC_AHB2ENR_CRYPEN)    != 0U)\r
1009 #define __HAL_RCC_HASH_IS_CLK_ENABLED()              ((RCC->AHB2ENR & RCC_AHB2ENR_HASHEN)    != 0U)\r
1010 #define __HAL_RCC_RNG_IS_CLK_ENABLED()               ((RCC->AHB2ENR & RCC_AHB2ENR_RNGEN)     != 0U)\r
1011 #define __HAL_RCC_SDMMC2_IS_CLK_ENABLED()            ((RCC->AHB2ENR & RCC_AHB2ENR_SDMMC2EN)  != 0U)\r
1012 #define __HAL_RCC_D2SRAM1_IS_CLK_ENABLED()           ((RCC->AHB2ENR & RCC_AHB2ENR_D2SRAM1EN) != 0U)\r
1013 #define __HAL_RCC_D2SRAM2_IS_CLK_ENABLED()           ((RCC->AHB2ENR & RCC_AHB2ENR_D2SRAM2EN) != 0U)\r
1014 #define __HAL_RCC_D2SRAM3_IS_CLK_ENABLED()           ((RCC->AHB2ENR & RCC_AHB2ENR_D2SRAM3EN) != 0U)\r
1015 \r
1016 #define __HAL_RCC_DCMI_IS_CLK_DISABLED()             ((RCC->AHB2ENR & RCC_AHB2ENR_DCMIEN)    == 0U)\r
1017 #define __HAL_RCC_CRYP_IS_CLK_DISABLED()             ((RCC->AHB2ENR & RCC_AHB2ENR_CRYPEN)    == 0U)\r
1018 #define __HAL_RCC_HASH_IS_CLK_DISABLED()             ((RCC->AHB2ENR & RCC_AHB2ENR_HASHEN)    == 0U)\r
1019 #define __HAL_RCC_RNG_IS_CLK_DISABLED()              ((RCC->AHB2ENR & RCC_AHB2ENR_RNGEN)     == 0U)\r
1020 #define __HAL_RCC_SDMMC2_IS_CLK_DISABLED()           ((RCC->AHB2ENR & RCC_AHB2ENR_SDMMC2EN)  == 0U)\r
1021 #define __HAL_RCC_D2SRAM1_IS_CLK_DISABLED()          ((RCC->AHB2ENR & RCC_AHB2ENR_D2SRAM1EN) == 0U)\r
1022 #define __HAL_RCC_D2SRAM2_IS_CLK_DISABLED()          ((RCC->AHB2ENR & RCC_AHB2ENR_D2SRAM2EN) == 0U)\r
1023 #define __HAL_RCC_D2SRAM3_IS_CLK_DISABLED()          ((RCC->AHB2ENR & RCC_AHB2ENR_D2SRAM3EN) == 0U)\r
1024 \r
1025 /** @brief  Enable or disable the AHB4 peripheral clock.\r
1026   * @note   After reset, the peripheral clock (used for registers read/write access)\r
1027   *         is disabled and the application software has to enable this clock before\r
1028   *         using it.\r
1029   */\r
1030 \r
1031 #define __HAL_RCC_GPIOA_CLK_ENABLE()   do { \\r
1032                                         __IO uint32_t tmpreg; \\r
1033                                         SET_BIT(RCC->AHB4ENR, RCC_AHB4ENR_GPIOAEN);\\r
1034                                         /* Delay after an RCC peripheral clock enabling */ \\r
1035                                         tmpreg = READ_BIT(RCC->AHB4ENR, RCC_AHB4ENR_GPIOAEN);\\r
1036                                         UNUSED(tmpreg); \\r
1037                                        } while(0)\r
1038 \r
1039 #define __HAL_RCC_GPIOB_CLK_ENABLE()   do { \\r
1040                                         __IO uint32_t tmpreg; \\r
1041                                         SET_BIT(RCC->AHB4ENR, RCC_AHB4ENR_GPIOBEN);\\r
1042                                         /* Delay after an RCC peripheral clock enabling */ \\r
1043                                         tmpreg = READ_BIT(RCC->AHB4ENR, RCC_AHB4ENR_GPIOBEN);\\r
1044                                         UNUSED(tmpreg); \\r
1045                                        } while(0)\r
1046 \r
1047 #define __HAL_RCC_GPIOC_CLK_ENABLE()   do { \\r
1048                                         __IO uint32_t tmpreg; \\r
1049                                         SET_BIT(RCC->AHB4ENR, RCC_AHB4ENR_GPIOCEN);\\r
1050                                         /* Delay after an RCC peripheral clock enabling */ \\r
1051                                         tmpreg = READ_BIT(RCC->AHB4ENR, RCC_AHB4ENR_GPIOCEN);\\r
1052                                         UNUSED(tmpreg); \\r
1053                                        } while(0)\r
1054 \r
1055 #define __HAL_RCC_GPIOD_CLK_ENABLE()   do { \\r
1056                                         __IO uint32_t tmpreg; \\r
1057                                         SET_BIT(RCC->AHB4ENR, RCC_AHB4ENR_GPIODEN);\\r
1058                                         /* Delay after an RCC peripheral clock enabling */ \\r
1059                                         tmpreg = READ_BIT(RCC->AHB4ENR, RCC_AHB4ENR_GPIODEN);\\r
1060                                         UNUSED(tmpreg); \\r
1061                                        } while(0)\r
1062 \r
1063 #define __HAL_RCC_GPIOE_CLK_ENABLE()   do { \\r
1064                                         __IO uint32_t tmpreg; \\r
1065                                         SET_BIT(RCC->AHB4ENR, RCC_AHB4ENR_GPIOEEN);\\r
1066                                         /* Delay after an RCC peripheral clock enabling */ \\r
1067                                         tmpreg = READ_BIT(RCC->AHB4ENR, RCC_AHB4ENR_GPIOEEN);\\r
1068                                         UNUSED(tmpreg); \\r
1069                                        } while(0)\r
1070 \r
1071 #define __HAL_RCC_GPIOF_CLK_ENABLE()   do { \\r
1072                                         __IO uint32_t tmpreg; \\r
1073                                         SET_BIT(RCC->AHB4ENR, RCC_AHB4ENR_GPIOFEN);\\r
1074                                         /* Delay after an RCC peripheral clock enabling */ \\r
1075                                         tmpreg = READ_BIT(RCC->AHB4ENR, RCC_AHB4ENR_GPIOFEN);\\r
1076                                         UNUSED(tmpreg); \\r
1077                                        } while(0)\r
1078 \r
1079 #define __HAL_RCC_GPIOG_CLK_ENABLE()   do { \\r
1080                                         __IO uint32_t tmpreg; \\r
1081                                         SET_BIT(RCC->AHB4ENR, RCC_AHB4ENR_GPIOGEN);\\r
1082                                         /* Delay after an RCC peripheral clock enabling */ \\r
1083                                         tmpreg = READ_BIT(RCC->AHB4ENR, RCC_AHB4ENR_GPIOGEN);\\r
1084                                         UNUSED(tmpreg); \\r
1085                                        } while(0)\r
1086 \r
1087 #define __HAL_RCC_GPIOH_CLK_ENABLE()   do { \\r
1088                                         __IO uint32_t tmpreg; \\r
1089                                         SET_BIT(RCC->AHB4ENR, RCC_AHB4ENR_GPIOHEN);\\r
1090                                         /* Delay after an RCC peripheral clock enabling */ \\r
1091                                         tmpreg = READ_BIT(RCC->AHB4ENR, RCC_AHB4ENR_GPIOHEN);\\r
1092                                         UNUSED(tmpreg); \\r
1093                                        } while(0)\r
1094 \r
1095 #define __HAL_RCC_GPIOI_CLK_ENABLE()   do { \\r
1096                                         __IO uint32_t tmpreg; \\r
1097                                         SET_BIT(RCC->AHB4ENR, RCC_AHB4ENR_GPIOIEN);\\r
1098                                         /* Delay after an RCC peripheral clock enabling */ \\r
1099                                         tmpreg = READ_BIT(RCC->AHB4ENR, RCC_AHB4ENR_GPIOIEN);\\r
1100                                         UNUSED(tmpreg); \\r
1101                                        } while(0)\r
1102 \r
1103 #define __HAL_RCC_GPIOJ_CLK_ENABLE()   do { \\r
1104                                         __IO uint32_t tmpreg; \\r
1105                                         SET_BIT(RCC->AHB4ENR, RCC_AHB4ENR_GPIOJEN);\\r
1106                                         /* Delay after an RCC peripheral clock enabling */ \\r
1107                                         tmpreg = READ_BIT(RCC->AHB4ENR, RCC_AHB4ENR_GPIOJEN);\\r
1108                                         UNUSED(tmpreg); \\r
1109                                        } while(0)\r
1110 \r
1111 #define __HAL_RCC_GPIOK_CLK_ENABLE()   do { \\r
1112                                         __IO uint32_t tmpreg; \\r
1113                                         SET_BIT(RCC->AHB4ENR, RCC_AHB4ENR_GPIOKEN);\\r
1114                                         /* Delay after an RCC peripheral clock enabling */ \\r
1115                                         tmpreg = READ_BIT(RCC->AHB4ENR, RCC_AHB4ENR_GPIOKEN);\\r
1116                                         UNUSED(tmpreg); \\r
1117                                        } while(0)\r
1118 \r
1119 #define __HAL_RCC_CRC_CLK_ENABLE()   do { \\r
1120                                         __IO uint32_t tmpreg; \\r
1121                                         SET_BIT(RCC->AHB4ENR, RCC_AHB4ENR_CRCEN);\\r
1122                                         /* Delay after an RCC peripheral clock enabling */ \\r
1123                                         tmpreg = READ_BIT(RCC->AHB4ENR, RCC_AHB4ENR_CRCEN);\\r
1124                                         UNUSED(tmpreg); \\r
1125                                        } while(0)\r
1126 \r
1127 #define __HAL_RCC_BDMA_CLK_ENABLE()   do { \\r
1128                                         __IO uint32_t tmpreg; \\r
1129                                         SET_BIT(RCC->AHB4ENR, RCC_AHB4ENR_BDMAEN);\\r
1130                                         /* Delay after an RCC peripheral clock enabling */ \\r
1131                                         tmpreg = READ_BIT(RCC->AHB4ENR, RCC_AHB4ENR_BDMAEN);\\r
1132                                         UNUSED(tmpreg); \\r
1133                                        } while(0)\r
1134 \r
1135 #define __HAL_RCC_ADC3_CLK_ENABLE()   do { \\r
1136                                         __IO uint32_t tmpreg; \\r
1137                                         SET_BIT(RCC->AHB4ENR, RCC_AHB4ENR_ADC3EN);\\r
1138                                         /* Delay after an RCC peripheral clock enabling */ \\r
1139                                         tmpreg = READ_BIT(RCC->AHB4ENR, RCC_AHB4ENR_ADC3EN);\\r
1140                                         UNUSED(tmpreg); \\r
1141                                        } while(0)\r
1142 \r
1143 #define __HAL_RCC_HSEM_CLK_ENABLE()   do { \\r
1144                                         __IO uint32_t tmpreg; \\r
1145                                         SET_BIT(RCC->AHB4ENR, RCC_AHB4ENR_HSEMEN);\\r
1146                                         /* Delay after an RCC peripheral clock enabling */ \\r
1147                                         tmpreg = READ_BIT(RCC->AHB4ENR, RCC_AHB4ENR_HSEMEN);\\r
1148                                         UNUSED(tmpreg); \\r
1149                                        } while(0)\r
1150 \r
1151 #define __HAL_RCC_BKPRAM_CLK_ENABLE()   do { \\r
1152                                         __IO uint32_t tmpreg; \\r
1153                                         SET_BIT(RCC->AHB4ENR, RCC_AHB4ENR_BKPRAMEN);\\r
1154                                         /* Delay after an RCC peripheral clock enabling */ \\r
1155                                         tmpreg = READ_BIT(RCC->AHB4ENR, RCC_AHB4ENR_BKPRAMEN);\\r
1156                                         UNUSED(tmpreg); \\r
1157                                        } while(0)\r
1158 \r
1159 \r
1160 #define __HAL_RCC_GPIOA_CLK_DISABLE()           (RCC->AHB4ENR) &= ~ (RCC_AHB4ENR_GPIOAEN)\r
1161 #define __HAL_RCC_GPIOB_CLK_DISABLE()           (RCC->AHB4ENR) &= ~ (RCC_AHB4ENR_GPIOBEN)\r
1162 #define __HAL_RCC_GPIOC_CLK_DISABLE()           (RCC->AHB4ENR) &= ~ (RCC_AHB4ENR_GPIOCEN)\r
1163 #define __HAL_RCC_GPIOD_CLK_DISABLE()           (RCC->AHB4ENR) &= ~ (RCC_AHB4ENR_GPIODEN)\r
1164 #define __HAL_RCC_GPIOE_CLK_DISABLE()           (RCC->AHB4ENR) &= ~ (RCC_AHB4ENR_GPIOEEN)\r
1165 #define __HAL_RCC_GPIOF_CLK_DISABLE()           (RCC->AHB4ENR) &= ~ (RCC_AHB4ENR_GPIOFEN)\r
1166 #define __HAL_RCC_GPIOG_CLK_DISABLE()           (RCC->AHB4ENR) &= ~ (RCC_AHB4ENR_GPIOGEN)\r
1167 #define __HAL_RCC_GPIOH_CLK_DISABLE()           (RCC->AHB4ENR) &= ~ (RCC_AHB4ENR_GPIOHEN)\r
1168 #define __HAL_RCC_GPIOI_CLK_DISABLE()           (RCC->AHB4ENR) &= ~ (RCC_AHB4ENR_GPIOIEN)\r
1169 #define __HAL_RCC_GPIOJ_CLK_DISABLE()           (RCC->AHB4ENR) &= ~ (RCC_AHB4ENR_GPIOJEN)\r
1170 #define __HAL_RCC_GPIOK_CLK_DISABLE()           (RCC->AHB4ENR) &= ~ (RCC_AHB4ENR_GPIOKEN)\r
1171 #define __HAL_RCC_CRC_CLK_DISABLE()             (RCC->AHB4ENR) &= ~ (RCC_AHB4ENR_CRCEN)\r
1172 #define __HAL_RCC_BDMA_CLK_DISABLE()            (RCC->AHB4ENR) &= ~ (RCC_AHB4ENR_BDMAEN)\r
1173 #define __HAL_RCC_ADC3_CLK_DISABLE()            (RCC->AHB4ENR) &= ~ (RCC_AHB4ENR_ADC3EN)\r
1174 #define __HAL_RCC_HSEM_CLK_DISABLE()            (RCC->AHB4ENR) &= ~ (RCC_AHB4ENR_HSEMEN)\r
1175 #define __HAL_RCC_BKPRAM_CLK_DISABLE()          (RCC->AHB4ENR) &= ~ (RCC_AHB4ENR_BKPRAMEN)\r
1176 \r
1177 \r
1178 /** @brief  Get the enable or disable status of the AHB4 peripheral clock\r
1179   * @note   After reset, the peripheral clock (used for registers read/write access)\r
1180   *         is disabled and the application software has to enable this clock before\r
1181   *         using it.\r
1182   */\r
1183 \r
1184 #define __HAL_RCC_GPIOA_IS_CLK_ENABLED()            ((RCC->AHB4ENR & RCC_AHB4ENR_GPIOAEN)  != 0U)\r
1185 #define __HAL_RCC_GPIOB_IS_CLK_ENABLED()            ((RCC->AHB4ENR & RCC_AHB4ENR_GPIOBEN)  != 0U)\r
1186 #define __HAL_RCC_GPIOC_IS_CLK_ENABLED()            ((RCC->AHB4ENR & RCC_AHB4ENR_GPIOCEN)  != 0U)\r
1187 #define __HAL_RCC_GPIOD_IS_CLK_ENABLED()            ((RCC->AHB4ENR & RCC_AHB4ENR_GPIODEN)  != 0U)\r
1188 #define __HAL_RCC_GPIOE_IS_CLK_ENABLED()            ((RCC->AHB4ENR & RCC_AHB4ENR_GPIOEEN)  != 0U)\r
1189 #define __HAL_RCC_GPIOF_IS_CLK_ENABLED()            ((RCC->AHB4ENR & RCC_AHB4ENR_GPIOFEN)  != 0U)\r
1190 #define __HAL_RCC_GPIOG_IS_CLK_ENABLED()            ((RCC->AHB4ENR & RCC_AHB4ENR_GPIOGEN)  != 0U)\r
1191 #define __HAL_RCC_GPIOH_IS_CLK_ENABLED()            ((RCC->AHB4ENR & RCC_AHB4ENR_GPIOHEN)  != 0U)\r
1192 #define __HAL_RCC_GPIOI_IS_CLK_ENABLED()            ((RCC->AHB4ENR & RCC_AHB4ENR_GPIOIEN)  != 0U)\r
1193 #define __HAL_RCC_GPIOJ_IS_CLK_ENABLED()            ((RCC->AHB4ENR & RCC_AHB4ENR_GPIOJEN)  != 0U)\r
1194 #define __HAL_RCC_GPIOK_IS_CLK_ENABLED()            ((RCC->AHB4ENR & RCC_AHB4ENR_GPIOKEN)  != 0U)\r
1195 #define __HAL_RCC_CRC_IS_CLK_ENABLED()              ((RCC->AHB4ENR & RCC_AHB4ENR_CRCEN)    != 0U)\r
1196 #define __HAL_RCC_BDMA_IS_CLK_ENABLED()             ((RCC->AHB4ENR & RCC_AHB4ENR_BDMAEN)   != 0U)\r
1197 #define __HAL_RCC_ADC3_IS_CLK_ENABLED()             ((RCC->AHB4ENR & RCC_AHB4ENR_ADC3EN)   != 0U)\r
1198 #define __HAL_RCC_HSEM_IS_CLK_ENABLED()             ((RCC->AHB4ENR & RCC_AHB4ENR_HSEMEN)   != 0U)\r
1199 #define __HAL_RCC_BKPRAM_IS_CLK_ENABLED()           ((RCC->AHB4ENR & RCC_AHB4ENR_BKPRAMEN) != 0U)\r
1200 \r
1201 #define __HAL_RCC_GPIOA_IS_CLK_DISABLED()           ((RCC->AHB4ENR & RCC_AHB4ENR_GPIOAEN)  == 0U)\r
1202 #define __HAL_RCC_GPIOB_IS_CLK_DISABLED()           ((RCC->AHB4ENR & RCC_AHB4ENR_GPIOBEN)  == 0U)\r
1203 #define __HAL_RCC_GPIOC_IS_CLK_DISABLED()           ((RCC->AHB4ENR & RCC_AHB4ENR_GPIOCEN)  == 0U)\r
1204 #define __HAL_RCC_GPIOD_IS_CLK_DISABLED()           ((RCC->AHB4ENR & RCC_AHB4ENR_GPIODEN)  == 0U)\r
1205 #define __HAL_RCC_GPIOE_IS_CLK_DISABLED()           ((RCC->AHB4ENR & RCC_AHB4ENR_GPIOEEN)  == 0U)\r
1206 #define __HAL_RCC_GPIOF_IS_CLK_DISABLED()           ((RCC->AHB4ENR & RCC_AHB4ENR_GPIOFEN)  == 0U)\r
1207 #define __HAL_RCC_GPIOG_IS_CLK_DISABLED()           ((RCC->AHB4ENR & RCC_AHB4ENR_GPIOGEN)  == 0U)\r
1208 #define __HAL_RCC_GPIOH_IS_CLK_DISABLED()           ((RCC->AHB4ENR & RCC_AHB4ENR_GPIOHEN)  == 0U)\r
1209 #define __HAL_RCC_GPIOI_IS_CLK_DISABLED()           ((RCC->AHB4ENR & RCC_AHB4ENR_GPIOIEN)  == 0U)\r
1210 #define __HAL_RCC_GPIOJ_IS_CLK_DISABLED()           ((RCC->AHB4ENR & RCC_AHB4ENR_GPIOJEN)  == 0U)\r
1211 #define __HAL_RCC_GPIOK_IS_CLK_DISABLED()           ((RCC->AHB4ENR & RCC_AHB4ENR_GPIOKEN)  == 0U)\r
1212 #define __HAL_RCC_CRC_IS_CLK_DISABLED()             ((RCC->AHB4ENR & RCC_AHB4ENR_CRCEN)    == 0U)\r
1213 #define __HAL_RCC_BDMA_IS_CLK_DISABLED()            ((RCC->AHB4ENR & RCC_AHB4ENR_BDMAEN)   == 0U)\r
1214 #define __HAL_RCC_ADC3_IS_CLK_DISABLED()            ((RCC->AHB4ENR & RCC_AHB4ENR_ADC3EN)   == 0U)\r
1215 #define __HAL_RCC_HSEM_IS_CLK_DISABLED()            ((RCC->AHB4ENR & RCC_AHB4ENR_HSEMEN)   == 0U)\r
1216 #define __HAL_RCC_BKPRAM_IS_CLK_DISABLED()          ((RCC->AHB4ENR & RCC_AHB4ENR_BKPRAMEN) == 0U)\r
1217 \r
1218 \r
1219 /** @brief  Enable or disable the APB3 peripheral clock.\r
1220   * @note   After reset, the peripheral clock (used for registers read/write access)\r
1221   *         is disabled and the application software has to enable this clock before\r
1222   *         using it.\r
1223   */\r
1224 \r
1225 #if defined(LTDC)\r
1226 #define __HAL_RCC_LTDC_CLK_ENABLE()   do { \\r
1227                                         __IO uint32_t tmpreg; \\r
1228                                         SET_BIT(RCC->APB3ENR, RCC_APB3ENR_LTDCEN);\\r
1229                                         /* Delay after an RCC peripheral clock enabling */ \\r
1230                                         tmpreg = READ_BIT(RCC->APB3ENR, RCC_APB3ENR_LTDCEN);\\r
1231                                         UNUSED(tmpreg); \\r
1232                                        } while(0)\r
1233 #endif /* LTDC */\r
1234 \r
1235 #if defined(DSI)\r
1236 #define __HAL_RCC_DSI_CLK_ENABLE()   do { \\r
1237                                         __IO uint32_t tmpreg; \\r
1238                                         SET_BIT(RCC->APB3ENR, RCC_APB3ENR_DSIEN);\\r
1239                                         /* Delay after an RCC peripheral clock enabling */ \\r
1240                                         tmpreg = READ_BIT(RCC->APB3ENR, RCC_APB3ENR_DSIEN);\\r
1241                                         UNUSED(tmpreg); \\r
1242                                        } while(0)\r
1243 #endif /*DSI*/\r
1244 \r
1245 #define __HAL_RCC_WWDG1_CLK_ENABLE()   do { \\r
1246                                         __IO uint32_t tmpreg; \\r
1247                                         SET_BIT(RCC->APB3ENR, RCC_APB3ENR_WWDG1EN);\\r
1248                                         /* Delay after an RCC peripheral clock enabling */ \\r
1249                                         tmpreg = READ_BIT(RCC->APB3ENR, RCC_APB3ENR_WWDG1EN);\\r
1250                                         UNUSED(tmpreg); \\r
1251                                        } while(0)\r
1252 \r
1253 #if defined(LTDC)\r
1254 #define __HAL_RCC_LTDC_CLK_DISABLE()           (RCC->APB3ENR) &= ~ (RCC_APB3ENR_LTDCEN)\r
1255 #endif /* LTDC */\r
1256 \r
1257 #if defined(DSI)\r
1258 #define __HAL_RCC_DSI_CLK_DISABLE()            (RCC->APB3ENR) &= ~ (RCC_APB3ENR_DSIEN)\r
1259 #endif /*DSI*/\r
1260 #define __HAL_RCC_WWDG1_CLK_DISABLE()          (RCC->APB3ENR) &= ~ (RCC_APB3ENR_WWDG1EN)\r
1261 \r
1262 \r
1263 /** @brief  Get the enable or disable status of the APB3 peripheral clock\r
1264   * @note   After reset, the peripheral clock (used for registers read/write access)\r
1265   *         is disabled and the application software has to enable this clock before\r
1266   *         using it.\r
1267   */\r
1268 #if defined(LTDC)\r
1269 #define __HAL_RCC_LTDC_IS_CLK_ENABLED()            ((RCC->APB3ENR & RCC_APB3ENR_LTDCEN)  != 0U)\r
1270 #endif /* LTDC */\r
1271 \r
1272 #if defined(DSI)\r
1273 #define __HAL_RCC_DSI_IS_CLK_ENABLED()             ((RCC->APB3ENR & RCC_APB3ENR_DSIEN)   != 0U)\r
1274 #endif /*DSI*/\r
1275 #define __HAL_RCC_WWDG1_IS_CLK_ENABLED()           ((RCC->APB3ENR & RCC_APB3ENR_WWDG1EN) != 0U)\r
1276 \r
1277 #if defined(LTDC)\r
1278 #define __HAL_RCC_LTDC_IS_CLK_DISABLED()           ((RCC->APB3ENR & RCC_APB3ENR_LTDCEN)  == 0U)\r
1279 #endif /* LTDC */\r
1280 \r
1281 #if defined(DSI)\r
1282 #define __HAL_RCC_DSI_IS_CLK_DISABLED()            ((RCC->APB3ENR & RCC_APB3ENR_DSIEN)   == 0U)\r
1283 #endif /*DSI*/\r
1284 #define __HAL_RCC_WWDG1_IS_CLK_DISABLED()          ((RCC->APB3ENR & RCC_APB3ENR_WWDG1EN) == 0U)\r
1285 \r
1286 \r
1287 \r
1288 /** @brief  Enable or disable the APB1 peripheral clock.\r
1289   * @note   After reset, the peripheral clock (used for registers read/write access)\r
1290   *         is disabled and the application software has to enable this clock before\r
1291   *         using it.\r
1292   */\r
1293 \r
1294 #define __HAL_RCC_TIM2_CLK_ENABLE()   do { \\r
1295                                         __IO uint32_t tmpreg; \\r
1296                                         SET_BIT(RCC->APB1LENR, RCC_APB1LENR_TIM2EN);\\r
1297                                         /* Delay after an RCC peripheral clock enabling */ \\r
1298                                         tmpreg = READ_BIT(RCC->APB1LENR, RCC_APB1LENR_TIM2EN);\\r
1299                                         UNUSED(tmpreg); \\r
1300                                        } while(0)\r
1301 \r
1302 #define __HAL_RCC_TIM3_CLK_ENABLE()   do { \\r
1303                                         __IO uint32_t tmpreg; \\r
1304                                         SET_BIT(RCC->APB1LENR, RCC_APB1LENR_TIM3EN);\\r
1305                                         /* Delay after an RCC peripheral clock enabling */ \\r
1306                                         tmpreg = READ_BIT(RCC->APB1LENR, RCC_APB1LENR_TIM3EN);\\r
1307                                         UNUSED(tmpreg); \\r
1308                                        } while(0)\r
1309 \r
1310 #define __HAL_RCC_TIM4_CLK_ENABLE()   do { \\r
1311                                         __IO uint32_t tmpreg; \\r
1312                                         SET_BIT(RCC->APB1LENR, RCC_APB1LENR_TIM4EN);\\r
1313                                         /* Delay after an RCC peripheral clock enabling */ \\r
1314                                         tmpreg = READ_BIT(RCC->APB1LENR, RCC_APB1LENR_TIM4EN);\\r
1315                                         UNUSED(tmpreg); \\r
1316                                        } while(0)\r
1317 \r
1318 #define __HAL_RCC_TIM5_CLK_ENABLE()   do { \\r
1319                                         __IO uint32_t tmpreg; \\r
1320                                         SET_BIT(RCC->APB1LENR, RCC_APB1LENR_TIM5EN);\\r
1321                                         /* Delay after an RCC peripheral clock enabling */ \\r
1322                                         tmpreg = READ_BIT(RCC->APB1LENR, RCC_APB1LENR_TIM5EN);\\r
1323                                         UNUSED(tmpreg); \\r
1324                                        } while(0)\r
1325 \r
1326 #define __HAL_RCC_TIM6_CLK_ENABLE()   do { \\r
1327                                         __IO uint32_t tmpreg; \\r
1328                                         SET_BIT(RCC->APB1LENR, RCC_APB1LENR_TIM6EN);\\r
1329                                         /* Delay after an RCC peripheral clock enabling */ \\r
1330                                         tmpreg = READ_BIT(RCC->APB1LENR, RCC_APB1LENR_TIM6EN);\\r
1331                                         UNUSED(tmpreg); \\r
1332                                        } while(0)\r
1333 \r
1334 #define __HAL_RCC_TIM7_CLK_ENABLE()   do { \\r
1335                                         __IO uint32_t tmpreg; \\r
1336                                         SET_BIT(RCC->APB1LENR, RCC_APB1LENR_TIM7EN);\\r
1337                                         /* Delay after an RCC peripheral clock enabling */ \\r
1338                                         tmpreg = READ_BIT(RCC->APB1LENR, RCC_APB1LENR_TIM7EN);\\r
1339                                         UNUSED(tmpreg); \\r
1340                                        } while(0)\r
1341 \r
1342 #define __HAL_RCC_TIM12_CLK_ENABLE()   do { \\r
1343                                         __IO uint32_t tmpreg; \\r
1344                                         SET_BIT(RCC->APB1LENR, RCC_APB1LENR_TIM12EN);\\r
1345                                         /* Delay after an RCC peripheral clock enabling */ \\r
1346                                         tmpreg = READ_BIT(RCC->APB1LENR, RCC_APB1LENR_TIM12EN);\\r
1347                                         UNUSED(tmpreg); \\r
1348                                        } while(0)\r
1349 \r
1350 #define __HAL_RCC_TIM13_CLK_ENABLE()   do { \\r
1351                                         __IO uint32_t tmpreg; \\r
1352                                         SET_BIT(RCC->APB1LENR, RCC_APB1LENR_TIM13EN);\\r
1353                                         /* Delay after an RCC peripheral clock enabling */ \\r
1354                                         tmpreg = READ_BIT(RCC->APB1LENR, RCC_APB1LENR_TIM13EN);\\r
1355                                         UNUSED(tmpreg); \\r
1356                                        } while(0)\r
1357 \r
1358 #define __HAL_RCC_TIM14_CLK_ENABLE()   do { \\r
1359                                         __IO uint32_t tmpreg; \\r
1360                                         SET_BIT(RCC->APB1LENR, RCC_APB1LENR_TIM14EN);\\r
1361                                         /* Delay after an RCC peripheral clock enabling */ \\r
1362                                         tmpreg = READ_BIT(RCC->APB1LENR, RCC_APB1LENR_TIM14EN);\\r
1363                                         UNUSED(tmpreg); \\r
1364                                        } while(0)\r
1365 \r
1366 #define __HAL_RCC_LPTIM1_CLK_ENABLE()   do { \\r
1367                                         __IO uint32_t tmpreg; \\r
1368                                         SET_BIT(RCC->APB1LENR, RCC_APB1LENR_LPTIM1EN);\\r
1369                                         /* Delay after an RCC peripheral clock enabling */ \\r
1370                                         tmpreg = READ_BIT(RCC->APB1LENR, RCC_APB1LENR_LPTIM1EN);\\r
1371                                         UNUSED(tmpreg); \\r
1372                                        } while(0)\r
1373 \r
1374 #if defined(DUAL_CORE)\r
1375 #define __HAL_RCC_WWDG2_CLK_ENABLE()   do { \\r
1376                                         __IO uint32_t tmpreg; \\r
1377                                         SET_BIT(RCC->APB1LENR, RCC_APB1LENR_WWDG2EN);\\r
1378                                         /* Delay after an RCC peripheral clock enabling */ \\r
1379                                         tmpreg = READ_BIT(RCC->APB1LENR, RCC_APB1LENR_WWDG2EN);\\r
1380                                         UNUSED(tmpreg); \\r
1381                                        } while(0)\r
1382 #endif /*DUAL_CORE*/\r
1383 \r
1384 #define __HAL_RCC_SPI2_CLK_ENABLE()   do { \\r
1385                                         __IO uint32_t tmpreg; \\r
1386                                         SET_BIT(RCC->APB1LENR, RCC_APB1LENR_SPI2EN);\\r
1387                                         /* Delay after an RCC peripheral clock enabling */ \\r
1388                                         tmpreg = READ_BIT(RCC->APB1LENR, RCC_APB1LENR_SPI2EN);\\r
1389                                         UNUSED(tmpreg); \\r
1390                                        } while(0)\r
1391 \r
1392 #define __HAL_RCC_SPI3_CLK_ENABLE()   do { \\r
1393                                         __IO uint32_t tmpreg; \\r
1394                                         SET_BIT(RCC->APB1LENR, RCC_APB1LENR_SPI3EN);\\r
1395                                         /* Delay after an RCC peripheral clock enabling */ \\r
1396                                         tmpreg = READ_BIT(RCC->APB1LENR, RCC_APB1LENR_SPI3EN);\\r
1397                                         UNUSED(tmpreg); \\r
1398                                        } while(0)\r
1399 \r
1400 #define __HAL_RCC_SPDIFRX_CLK_ENABLE()   do { \\r
1401                                         __IO uint32_t tmpreg; \\r
1402                                         SET_BIT(RCC->APB1LENR, RCC_APB1LENR_SPDIFRXEN);\\r
1403                                         /* Delay after an RCC peripheral clock enabling */ \\r
1404                                         tmpreg = READ_BIT(RCC->APB1LENR, RCC_APB1LENR_SPDIFRXEN);\\r
1405                                         UNUSED(tmpreg); \\r
1406                                        } while(0)\r
1407 \r
1408 #define __HAL_RCC_USART2_CLK_ENABLE()   do { \\r
1409                                         __IO uint32_t tmpreg; \\r
1410                                         SET_BIT(RCC->APB1LENR, RCC_APB1LENR_USART2EN);\\r
1411                                         /* Delay after an RCC peripheral clock enabling */ \\r
1412                                         tmpreg = READ_BIT(RCC->APB1LENR, RCC_APB1LENR_USART2EN);\\r
1413                                         UNUSED(tmpreg); \\r
1414                                        } while(0)\r
1415 \r
1416 #define __HAL_RCC_USART3_CLK_ENABLE()   do { \\r
1417                                         __IO uint32_t tmpreg; \\r
1418                                         SET_BIT(RCC->APB1LENR, RCC_APB1LENR_USART3EN);\\r
1419                                         /* Delay after an RCC peripheral clock enabling */ \\r
1420                                         tmpreg = READ_BIT(RCC->APB1LENR, RCC_APB1LENR_USART3EN);\\r
1421                                         UNUSED(tmpreg); \\r
1422                                        } while(0)\r
1423 \r
1424 #define __HAL_RCC_UART4_CLK_ENABLE()   do { \\r
1425                                         __IO uint32_t tmpreg; \\r
1426                                         SET_BIT(RCC->APB1LENR, RCC_APB1LENR_UART4EN);\\r
1427                                         /* Delay after an RCC peripheral clock enabling */ \\r
1428                                         tmpreg = READ_BIT(RCC->APB1LENR, RCC_APB1LENR_UART4EN);\\r
1429                                         UNUSED(tmpreg); \\r
1430                                        } while(0)\r
1431 \r
1432 #define __HAL_RCC_UART5_CLK_ENABLE()   do { \\r
1433                                         __IO uint32_t tmpreg; \\r
1434                                         SET_BIT(RCC->APB1LENR, RCC_APB1LENR_UART5EN);\\r
1435                                         /* Delay after an RCC peripheral clock enabling */ \\r
1436                                         tmpreg = READ_BIT(RCC->APB1LENR, RCC_APB1LENR_UART5EN);\\r
1437                                         UNUSED(tmpreg); \\r
1438                                        } while(0)\r
1439 \r
1440 #define __HAL_RCC_I2C1_CLK_ENABLE()   do { \\r
1441                                         __IO uint32_t tmpreg; \\r
1442                                         SET_BIT(RCC->APB1LENR, RCC_APB1LENR_I2C1EN);\\r
1443                                         /* Delay after an RCC peripheral clock enabling */ \\r
1444                                         tmpreg = READ_BIT(RCC->APB1LENR, RCC_APB1LENR_I2C1EN);\\r
1445                                         UNUSED(tmpreg); \\r
1446                                        } while(0)\r
1447 \r
1448 #define __HAL_RCC_I2C2_CLK_ENABLE()   do { \\r
1449                                         __IO uint32_t tmpreg; \\r
1450                                         SET_BIT(RCC->APB1LENR, RCC_APB1LENR_I2C2EN);\\r
1451                                         /* Delay after an RCC peripheral clock enabling */ \\r
1452                                         tmpreg = READ_BIT(RCC->APB1LENR, RCC_APB1LENR_I2C2EN);\\r
1453                                         UNUSED(tmpreg); \\r
1454                                        } while(0)\r
1455 \r
1456 #define __HAL_RCC_I2C3_CLK_ENABLE()   do { \\r
1457                                         __IO uint32_t tmpreg; \\r
1458                                         SET_BIT(RCC->APB1LENR, RCC_APB1LENR_I2C3EN);\\r
1459                                         /* Delay after an RCC peripheral clock enabling */ \\r
1460                                         tmpreg = READ_BIT(RCC->APB1LENR, RCC_APB1LENR_I2C3EN);\\r
1461                                         UNUSED(tmpreg); \\r
1462                                        } while(0)\r
1463 \r
1464 #define __HAL_RCC_CEC_CLK_ENABLE()   do { \\r
1465                                         __IO uint32_t tmpreg; \\r
1466                                         SET_BIT(RCC->APB1LENR, RCC_APB1LENR_CECEN);\\r
1467                                         /* Delay after an RCC peripheral clock enabling */ \\r
1468                                         tmpreg = READ_BIT(RCC->APB1LENR, RCC_APB1LENR_CECEN);\\r
1469                                         UNUSED(tmpreg); \\r
1470                                        } while(0)\r
1471 \r
1472 #define __HAL_RCC_DAC12_CLK_ENABLE()   do { \\r
1473                                         __IO uint32_t tmpreg; \\r
1474                                         SET_BIT(RCC->APB1LENR, RCC_APB1LENR_DAC12EN);\\r
1475                                         /* Delay after an RCC peripheral clock enabling */ \\r
1476                                         tmpreg = READ_BIT(RCC->APB1LENR, RCC_APB1LENR_DAC12EN);\\r
1477                                         UNUSED(tmpreg); \\r
1478                                        } while(0)\r
1479 \r
1480 #define __HAL_RCC_UART7_CLK_ENABLE()   do { \\r
1481                                         __IO uint32_t tmpreg; \\r
1482                                         SET_BIT(RCC->APB1LENR, RCC_APB1LENR_UART7EN);\\r
1483                                         /* Delay after an RCC peripheral clock enabling */ \\r
1484                                         tmpreg = READ_BIT(RCC->APB1LENR, RCC_APB1LENR_UART7EN);\\r
1485                                         UNUSED(tmpreg); \\r
1486                                        } while(0)\r
1487 \r
1488 #define __HAL_RCC_UART8_CLK_ENABLE()   do { \\r
1489                                         __IO uint32_t tmpreg; \\r
1490                                         SET_BIT(RCC->APB1LENR, RCC_APB1LENR_UART8EN);\\r
1491                                         /* Delay after an RCC peripheral clock enabling */ \\r
1492                                         tmpreg = READ_BIT(RCC->APB1LENR, RCC_APB1LENR_UART8EN);\\r
1493                                         UNUSED(tmpreg); \\r
1494                                        } while(0)\r
1495 \r
1496 #define __HAL_RCC_CRS_CLK_ENABLE()   do { \\r
1497                                         __IO uint32_t tmpreg; \\r
1498                                         SET_BIT(RCC->APB1HENR, RCC_APB1HENR_CRSEN);\\r
1499                                         /* Delay after an RCC peripheral clock enabling */ \\r
1500                                         tmpreg = READ_BIT(RCC->APB1HENR, RCC_APB1HENR_CRSEN);\\r
1501                                         UNUSED(tmpreg); \\r
1502                                        } while(0)\r
1503 \r
1504 #define __HAL_RCC_SWPMI1_CLK_ENABLE()   do { \\r
1505                                         __IO uint32_t tmpreg; \\r
1506                                         SET_BIT(RCC->APB1HENR, RCC_APB1HENR_SWPMIEN);\\r
1507                                         /* Delay after an RCC peripheral clock enabling */ \\r
1508                                         tmpreg = READ_BIT(RCC->APB1HENR, RCC_APB1HENR_SWPMIEN);\\r
1509                                         UNUSED(tmpreg); \\r
1510                                        } while(0)\r
1511 \r
1512 #define __HAL_RCC_OPAMP_CLK_ENABLE()   do { \\r
1513                                         __IO uint32_t tmpreg; \\r
1514                                         SET_BIT(RCC->APB1HENR, RCC_APB1HENR_OPAMPEN);\\r
1515                                         /* Delay after an RCC peripheral clock enabling */ \\r
1516                                         tmpreg = READ_BIT(RCC->APB1HENR, RCC_APB1HENR_OPAMPEN);\\r
1517                                         UNUSED(tmpreg); \\r
1518                                        } while(0)\r
1519 \r
1520 #define __HAL_RCC_MDIOS_CLK_ENABLE()   do { \\r
1521                                         __IO uint32_t tmpreg; \\r
1522                                         SET_BIT(RCC->APB1HENR, RCC_APB1HENR_MDIOSEN);\\r
1523                                         /* Delay after an RCC peripheral clock enabling */ \\r
1524                                         tmpreg = READ_BIT(RCC->APB1HENR, RCC_APB1HENR_MDIOSEN);\\r
1525                                         UNUSED(tmpreg); \\r
1526                                        } while(0)\r
1527 \r
1528 #define __HAL_RCC_FDCAN_CLK_ENABLE()   do { \\r
1529                                         __IO uint32_t tmpreg; \\r
1530                                         SET_BIT(RCC->APB1HENR, RCC_APB1HENR_FDCANEN);\\r
1531                                         /* Delay after an RCC peripheral clock enabling */ \\r
1532                                         tmpreg = READ_BIT(RCC->APB1HENR, RCC_APB1HENR_FDCANEN);\\r
1533                                         UNUSED(tmpreg); \\r
1534                                        } while(0)\r
1535 \r
1536 \r
1537 #define __HAL_RCC_TIM2_CLK_DISABLE()           (RCC->APB1LENR) &= ~ (RCC_APB1LENR_TIM2EN)\r
1538 #define __HAL_RCC_TIM3_CLK_DISABLE()           (RCC->APB1LENR) &= ~ (RCC_APB1LENR_TIM3EN)\r
1539 #define __HAL_RCC_TIM4_CLK_DISABLE()           (RCC->APB1LENR) &= ~ (RCC_APB1LENR_TIM4EN)\r
1540 #define __HAL_RCC_TIM5_CLK_DISABLE()           (RCC->APB1LENR) &= ~ (RCC_APB1LENR_TIM5EN)\r
1541 #define __HAL_RCC_TIM6_CLK_DISABLE()           (RCC->APB1LENR) &= ~ (RCC_APB1LENR_TIM6EN)\r
1542 #define __HAL_RCC_TIM7_CLK_DISABLE()           (RCC->APB1LENR) &= ~ (RCC_APB1LENR_TIM7EN)\r
1543 #define __HAL_RCC_TIM12_CLK_DISABLE()          (RCC->APB1LENR) &= ~ (RCC_APB1LENR_TIM12EN)\r
1544 #define __HAL_RCC_TIM13_CLK_DISABLE()          (RCC->APB1LENR) &= ~ (RCC_APB1LENR_TIM13EN)\r
1545 #define __HAL_RCC_TIM14_CLK_DISABLE()          (RCC->APB1LENR) &= ~ (RCC_APB1LENR_TIM14EN)\r
1546 #define __HAL_RCC_LPTIM1_CLK_DISABLE()         (RCC->APB1LENR) &= ~ (RCC_APB1LENR_LPTIM1EN)\r
1547 \r
1548 #if defined(DUAL_CORE)\r
1549 #define __HAL_RCC_WWDG2_CLK_DISABLE()          (RCC->APB1LENR) &= ~ (RCC_APB1LENR_WWDG2EN)\r
1550 #endif /*DUAL_CORE*/\r
1551 \r
1552 #define __HAL_RCC_SPI2_CLK_DISABLE()           (RCC->APB1LENR) &= ~ (RCC_APB1LENR_SPI2EN)\r
1553 #define __HAL_RCC_SPI3_CLK_DISABLE()           (RCC->APB1LENR) &= ~ (RCC_APB1LENR_SPI3EN)\r
1554 #define __HAL_RCC_SPDIFRX_CLK_DISABLE()        (RCC->APB1LENR) &= ~ (RCC_APB1LENR_SPDIFRXEN)\r
1555 #define __HAL_RCC_USART2_CLK_DISABLE()         (RCC->APB1LENR) &= ~ (RCC_APB1LENR_USART2EN)\r
1556 #define __HAL_RCC_USART3_CLK_DISABLE()         (RCC->APB1LENR) &= ~ (RCC_APB1LENR_USART3EN)\r
1557 #define __HAL_RCC_UART4_CLK_DISABLE()          (RCC->APB1LENR) &= ~ (RCC_APB1LENR_UART4EN)\r
1558 #define __HAL_RCC_UART5_CLK_DISABLE()          (RCC->APB1LENR) &= ~ (RCC_APB1LENR_UART5EN)\r
1559 #define __HAL_RCC_I2C1_CLK_DISABLE()           (RCC->APB1LENR) &= ~ (RCC_APB1LENR_I2C1EN)\r
1560 #define __HAL_RCC_I2C2_CLK_DISABLE()           (RCC->APB1LENR) &= ~ (RCC_APB1LENR_I2C2EN)\r
1561 #define __HAL_RCC_I2C3_CLK_DISABLE()           (RCC->APB1LENR) &= ~ (RCC_APB1LENR_I2C3EN)\r
1562 #define __HAL_RCC_CEC_CLK_DISABLE()            (RCC->APB1LENR) &= ~ (RCC_APB1LENR_CECEN)\r
1563 #define __HAL_RCC_DAC12_CLK_DISABLE()          (RCC->APB1LENR) &= ~ (RCC_APB1LENR_DAC12EN)\r
1564 #define __HAL_RCC_UART7_CLK_DISABLE()          (RCC->APB1LENR) &= ~ (RCC_APB1LENR_UART7EN)\r
1565 #define __HAL_RCC_UART8_CLK_DISABLE()          (RCC->APB1LENR) &= ~ (RCC_APB1LENR_UART8EN)\r
1566 #define __HAL_RCC_CRS_CLK_DISABLE()            (RCC->APB1HENR) &= ~ (RCC_APB1HENR_CRSEN)\r
1567 #define __HAL_RCC_SWPMI1_CLK_DISABLE()          (RCC->APB1HENR) &= ~ (RCC_APB1HENR_SWPMIEN)\r
1568 #define __HAL_RCC_OPAMP_CLK_DISABLE()          (RCC->APB1HENR) &= ~ (RCC_APB1HENR_OPAMPEN)\r
1569 #define __HAL_RCC_MDIOS_CLK_DISABLE()          (RCC->APB1HENR) &= ~ (RCC_APB1HENR_MDIOSEN)\r
1570 #define __HAL_RCC_FDCAN_CLK_DISABLE()          (RCC->APB1HENR) &= ~ (RCC_APB1HENR_FDCANEN)\r
1571 \r
1572 \r
1573 /** @brief  Get the enable or disable status of the APB1 peripheral clock\r
1574   * @note   After reset, the peripheral clock (used for registers read/write access)\r
1575   *         is disabled and the application software has to enable this clock before\r
1576   *         using it.\r
1577   */\r
1578 \r
1579 #define __HAL_RCC_TIM2_IS_CLK_ENABLED()            ((RCC->APB1LENR & RCC_APB1LENR_TIM2EN)    != 0U)\r
1580 #define __HAL_RCC_TIM3_IS_CLK_ENABLED()            ((RCC->APB1LENR & RCC_APB1LENR_TIM3EN)    != 0U)\r
1581 #define __HAL_RCC_TIM4_IS_CLK_ENABLED()            ((RCC->APB1LENR & RCC_APB1LENR_TIM4EN)    != 0U)\r
1582 #define __HAL_RCC_TIM5_IS_CLK_ENABLED()            ((RCC->APB1LENR & RCC_APB1LENR_TIM5EN)    != 0U)\r
1583 #define __HAL_RCC_TIM6_IS_CLK_ENABLED()            ((RCC->APB1LENR & RCC_APB1LENR_TIM6EN)    != 0U)\r
1584 #define __HAL_RCC_TIM7_IS_CLK_ENABLED()            ((RCC->APB1LENR & RCC_APB1LENR_TIM7EN)    != 0U)\r
1585 #define __HAL_RCC_TIM12_IS_CLK_ENABLED()           ((RCC->APB1LENR & RCC_APB1LENR_TIM12EN)   != 0U)\r
1586 #define __HAL_RCC_TIM13_IS_CLK_ENABLED()           ((RCC->APB1LENR & RCC_APB1LENR_TIM13EN)   != 0U)\r
1587 #define __HAL_RCC_TIM14_IS_CLK_ENABLED()           ((RCC->APB1LENR & RCC_APB1LENR_TIM14EN)   != 0U)\r
1588 #define __HAL_RCC_LPTIM1_IS_CLK_ENABLED()          ((RCC->APB1LENR & RCC_APB1LENR_LPTIM1EN)  != 0U)\r
1589 #if defined(DUAL_CORE)\r
1590 #define __HAL_RCC_WWDG2_IS_CLK_ENABLED()           ((RCC->APB1LENR & RCC_APB1LENR_WWDG2EN)   != 0U)\r
1591 #endif /*DUAL_CORE*/\r
1592 #define __HAL_RCC_SPI2_IS_CLK_ENABLED()            ((RCC->APB1LENR & RCC_APB1LENR_SPI2EN)    != 0U)\r
1593 #define __HAL_RCC_SPI3_IS_CLK_ENABLED()            ((RCC->APB1LENR & RCC_APB1LENR_SPI3EN)    != 0U)\r
1594 #define __HAL_RCC_SPDIFRX_IS_CLK_ENABLED()         ((RCC->APB1LENR & RCC_APB1LENR_SPDIFRXEN) != 0U)\r
1595 #define __HAL_RCC_USART2_IS_CLK_ENABLED()          ((RCC->APB1LENR & RCC_APB1LENR_USART2EN)  != 0U)\r
1596 #define __HAL_RCC_USART3_IS_CLK_ENABLED()          ((RCC->APB1LENR & RCC_APB1LENR_USART3EN)  != 0U)\r
1597 #define __HAL_RCC_UART4_IS_CLK_ENABLED()           ((RCC->APB1LENR & RCC_APB1LENR_UART4EN)   != 0U)\r
1598 #define __HAL_RCC_UART5_IS_CLK_ENABLED()           ((RCC->APB1LENR & RCC_APB1LENR_UART5EN)   != 0U)\r
1599 #define __HAL_RCC_I2C1_IS_CLK_ENABLED()            ((RCC->APB1LENR & RCC_APB1LENR_I2C1EN)    != 0U)\r
1600 #define __HAL_RCC_I2C2_IS_CLK_ENABLED()            ((RCC->APB1LENR & RCC_APB1LENR_I2C2EN)    != 0U)\r
1601 #define __HAL_RCC_I2C3_IS_CLK_ENABLED()            ((RCC->APB1LENR & RCC_APB1LENR_I2C3EN)    != 0U)\r
1602 #define __HAL_RCC_CEC_IS_CLK_ENABLED()             ((RCC->APB1LENR & RCC_APB1LENR_CECEN)     != 0U)\r
1603 #define __HAL_RCC_DAC12_IS_CLK_ENABLED()           ((RCC->APB1LENR & RCC_APB1LENR_DAC12EN)   != 0U)\r
1604 #define __HAL_RCC_UART7_IS_CLK_ENABLED()           ((RCC->APB1LENR & RCC_APB1LENR_UART7EN)   != 0U)\r
1605 #define __HAL_RCC_UART8_IS_CLK_ENABLED()           ((RCC->APB1LENR & RCC_APB1LENR_UART8EN)   != 0U)\r
1606 #define __HAL_RCC_CRS_IS_CLK_ENABLED()             ((RCC->APB1HENR & RCC_APB1HENR_CRSEN)     != 0U)\r
1607 #define __HAL_RCC_SWPMI1_IS_CLK_ENABLED()          ((RCC->APB1HENR & RCC_APB1HENR_SWPMIEN)   != 0U)\r
1608 #define __HAL_RCC_OPAMP_IS_CLK_ENABLED()           ((RCC->APB1HENR & RCC_APB1HENR_OPAMPEN)   != 0U)\r
1609 #define __HAL_RCC_MDIOS_IS_CLK_ENABLED()           ((RCC->APB1HENR & RCC_APB1HENR_MDIOSEN)   != 0U)\r
1610 #define __HAL_RCC_FDCAN_IS_CLK_ENABLED()           ((RCC->APB1HENR & RCC_APB1HENR_FDCANEN)   != 0U)\r
1611 \r
1612 #define __HAL_RCC_TIM2_IS_CLK_DISABLED()           ((RCC->APB1LENR & RCC_APB1LENR_TIM2EN)    == 0U)\r
1613 #define __HAL_RCC_TIM3_IS_CLK_DISABLED()           ((RCC->APB1LENR & RCC_APB1LENR_TIM3EN)    == 0U)\r
1614 #define __HAL_RCC_TIM4_IS_CLK_DISABLED()           ((RCC->APB1LENR & RCC_APB1LENR_TIM4EN)    == 0U)\r
1615 #define __HAL_RCC_TIM5_IS_CLK_DISABLED()           ((RCC->APB1LENR & RCC_APB1LENR_TIM5EN)    == 0U)\r
1616 #define __HAL_RCC_TIM6_IS_CLK_DISABLED()           ((RCC->APB1LENR & RCC_APB1LENR_TIM6EN)    == 0U)\r
1617 #define __HAL_RCC_TIM7_IS_CLK_DISABLED()           ((RCC->APB1LENR & RCC_APB1LENR_TIM7EN)    == 0U)\r
1618 #define __HAL_RCC_TIM12_IS_CLK_DISABLED()          ((RCC->APB1LENR & RCC_APB1LENR_TIM12EN)   == 0U)\r
1619 #define __HAL_RCC_TIM13_IS_CLK_DISABLED()          ((RCC->APB1LENR & RCC_APB1LENR_TIM13EN)   == 0U)\r
1620 #define __HAL_RCC_TIM14_IS_CLK_DISABLED()          ((RCC->APB1LENR & RCC_APB1LENR_TIM14EN)   == 0U)\r
1621 #define __HAL_RCC_LPTIM1_IS_CLK_DISABLED()         ((RCC->APB1LENR & RCC_APB1LENR_LPTIM1EN)  == 0U)\r
1622 #if defined(DUAL_CORE)\r
1623 #define __HAL_RCC_WWDG2_IS_CLK_DISABLED()          ((RCC->APB1LENR & RCC_APB1LENR_WWDG2EN)   == 0U)\r
1624 #endif /*DUAL_CORE*/\r
1625 #define __HAL_RCC_SPI2_IS_CLK_DISABLED()           ((RCC->APB1LENR & RCC_APB1LENR_SPI2EN)    == 0U)\r
1626 #define __HAL_RCC_SPI3_IS_CLK_DISABLED()           ((RCC->APB1LENR & RCC_APB1LENR_SPI3EN)    == 0U)\r
1627 #define __HAL_RCC_SPDIFRX_IS_CLK_DISABLED()        ((RCC->APB1LENR & RCC_APB1LENR_SPDIFRXEN) == 0U)\r
1628 #define __HAL_RCC_USART2_IS_CLK_DISABLED()         ((RCC->APB1LENR & RCC_APB1LENR_USART2EN)  == 0U)\r
1629 #define __HAL_RCC_USART3_IS_CLK_DISABLED()         ((RCC->APB1LENR & RCC_APB1LENR_USART3EN)  == 0U)\r
1630 #define __HAL_RCC_UART4_IS_CLK_DISABLED()          ((RCC->APB1LENR & RCC_APB1LENR_UART4EN)   == 0U)\r
1631 #define __HAL_RCC_UART5_IS_CLK_DISABLED()          ((RCC->APB1LENR & RCC_APB1LENR_UART5EN)   == 0U)\r
1632 #define __HAL_RCC_I2C1_IS_CLK_DISABLED()           ((RCC->APB1LENR & RCC_APB1LENR_I2C1EN)    == 0U)\r
1633 #define __HAL_RCC_I2C2_IS_CLK_DISABLED()           ((RCC->APB1LENR & RCC_APB1LENR_I2C2EN)    == 0U)\r
1634 #define __HAL_RCC_I2C3_IS_CLK_DISABLED()           ((RCC->APB1LENR & RCC_APB1LENR_I2C3EN)    == 0U)\r
1635 #define __HAL_RCC_CEC_IS_CLK_DISABLED()            ((RCC->APB1LENR & RCC_APB1LENR_CECEN)     == 0U)\r
1636 #define __HAL_RCC_DAC12_IS_CLK_DISABLED()          ((RCC->APB1LENR & RCC_APB1LENR_DAC12EN)   == 0U)\r
1637 #define __HAL_RCC_UART7_IS_CLK_DISABLED()          ((RCC->APB1LENR & RCC_APB1LENR_UART7EN)   == 0U)\r
1638 #define __HAL_RCC_UART8_IS_CLK_DISABLED()          ((RCC->APB1LENR & RCC_APB1LENR_UART8EN)   == 0U)\r
1639 #define __HAL_RCC_CRS_IS_CLK_DISABLED()            ((RCC->APB1HENR & RCC_APB1HENR_CRSEN)     == 0U)\r
1640 #define __HAL_RCC_SWPMI1_IS_CLK_DISABLED()         ((RCC->APB1HENR & RCC_APB1HENR_SWPMIEN)   == 0U)\r
1641 #define __HAL_RCC_OPAMP_IS_CLK_DISABLED()          ((RCC->APB1HENR & RCC_APB1HENR_OPAMPEN)   == 0U)\r
1642 #define __HAL_RCC_MDIOS_IS_CLK_DISABLED()          ((RCC->APB1HENR & RCC_APB1HENR_MDIOSEN)   == 0U)\r
1643 #define __HAL_RCC_FDCAN_IS_CLK_DISABLED()          ((RCC->APB1HENR & RCC_APB1HENR_FDCANEN)   == 0U)\r
1644 \r
1645 \r
1646 /** @brief  Enable or disable the APB2 peripheral clock.\r
1647   * @note   After reset, the peripheral clock (used for registers read/write access)\r
1648   *         is disabled and the application software has to enable this clock before\r
1649   *         using it.\r
1650   */\r
1651 \r
1652 #define __HAL_RCC_TIM1_CLK_ENABLE()   do { \\r
1653                                         __IO uint32_t tmpreg; \\r
1654                                         SET_BIT(RCC->APB2ENR, RCC_APB2ENR_TIM1EN);\\r
1655                                         /* Delay after an RCC peripheral clock enabling */ \\r
1656                                         tmpreg = READ_BIT(RCC->APB2ENR, RCC_APB2ENR_TIM1EN);\\r
1657                                         UNUSED(tmpreg); \\r
1658                                        } while(0)\r
1659 \r
1660 #define __HAL_RCC_TIM8_CLK_ENABLE()   do { \\r
1661                                         __IO uint32_t tmpreg; \\r
1662                                         SET_BIT(RCC->APB2ENR, RCC_APB2ENR_TIM8EN);\\r
1663                                         /* Delay after an RCC peripheral clock enabling */ \\r
1664                                         tmpreg = READ_BIT(RCC->APB2ENR, RCC_APB2ENR_TIM8EN);\\r
1665                                         UNUSED(tmpreg); \\r
1666                                        } while(0)\r
1667 \r
1668 #define __HAL_RCC_USART1_CLK_ENABLE()   do { \\r
1669                                         __IO uint32_t tmpreg; \\r
1670                                         SET_BIT(RCC->APB2ENR, RCC_APB2ENR_USART1EN);\\r
1671                                         /* Delay after an RCC peripheral clock enabling */ \\r
1672                                         tmpreg = READ_BIT(RCC->APB2ENR, RCC_APB2ENR_USART1EN);\\r
1673                                         UNUSED(tmpreg); \\r
1674                                        } while(0)\r
1675 \r
1676 #define __HAL_RCC_USART6_CLK_ENABLE()   do { \\r
1677                                         __IO uint32_t tmpreg; \\r
1678                                         SET_BIT(RCC->APB2ENR, RCC_APB2ENR_USART6EN);\\r
1679                                         /* Delay after an RCC peripheral clock enabling */ \\r
1680                                         tmpreg = READ_BIT(RCC->APB2ENR, RCC_APB2ENR_USART6EN);\\r
1681                                         UNUSED(tmpreg); \\r
1682                                        } while(0)\r
1683 \r
1684 #define __HAL_RCC_SPI1_CLK_ENABLE()   do { \\r
1685                                         __IO uint32_t tmpreg; \\r
1686                                         SET_BIT(RCC->APB2ENR, RCC_APB2ENR_SPI1EN);\\r
1687                                         /* Delay after an RCC peripheral clock enabling */ \\r
1688                                         tmpreg = READ_BIT(RCC->APB2ENR, RCC_APB2ENR_SPI1EN);\\r
1689                                         UNUSED(tmpreg); \\r
1690                                        } while(0)\r
1691 \r
1692 #define __HAL_RCC_SPI4_CLK_ENABLE()   do { \\r
1693                                         __IO uint32_t tmpreg; \\r
1694                                         SET_BIT(RCC->APB2ENR, RCC_APB2ENR_SPI4EN);\\r
1695                                         /* Delay after an RCC peripheral clock enabling */ \\r
1696                                         tmpreg = READ_BIT(RCC->APB2ENR, RCC_APB2ENR_SPI4EN);\\r
1697                                         UNUSED(tmpreg); \\r
1698                                        } while(0)\r
1699 \r
1700 #define __HAL_RCC_TIM15_CLK_ENABLE()   do { \\r
1701                                         __IO uint32_t tmpreg; \\r
1702                                         SET_BIT(RCC->APB2ENR, RCC_APB2ENR_TIM15EN);\\r
1703                                         /* Delay after an RCC peripheral clock enabling */ \\r
1704                                         tmpreg = READ_BIT(RCC->APB2ENR, RCC_APB2ENR_TIM15EN);\\r
1705                                         UNUSED(tmpreg); \\r
1706                                        } while(0)\r
1707 \r
1708 #define __HAL_RCC_TIM16_CLK_ENABLE()   do { \\r
1709                                         __IO uint32_t tmpreg; \\r
1710                                         SET_BIT(RCC->APB2ENR, RCC_APB2ENR_TIM16EN);\\r
1711                                         /* Delay after an RCC peripheral clock enabling */ \\r
1712                                         tmpreg = READ_BIT(RCC->APB2ENR, RCC_APB2ENR_TIM16EN);\\r
1713                                         UNUSED(tmpreg); \\r
1714                                        } while(0)\r
1715 \r
1716 #define __HAL_RCC_TIM17_CLK_ENABLE()   do { \\r
1717                                         __IO uint32_t tmpreg; \\r
1718                                         SET_BIT(RCC->APB2ENR, RCC_APB2ENR_TIM17EN);\\r
1719                                         /* Delay after an RCC peripheral clock enabling */ \\r
1720                                         tmpreg = READ_BIT(RCC->APB2ENR, RCC_APB2ENR_TIM17EN);\\r
1721                                         UNUSED(tmpreg); \\r
1722                                        } while(0)\r
1723 \r
1724 #define __HAL_RCC_SPI5_CLK_ENABLE()   do { \\r
1725                                         __IO uint32_t tmpreg; \\r
1726                                         SET_BIT(RCC->APB2ENR, RCC_APB2ENR_SPI5EN);\\r
1727                                         /* Delay after an RCC peripheral clock enabling */ \\r
1728                                         tmpreg = READ_BIT(RCC->APB2ENR, RCC_APB2ENR_SPI5EN);\\r
1729                                         UNUSED(tmpreg); \\r
1730                                        } while(0)\r
1731 \r
1732 #define __HAL_RCC_SAI1_CLK_ENABLE()   do { \\r
1733                                         __IO uint32_t tmpreg; \\r
1734                                         SET_BIT(RCC->APB2ENR, RCC_APB2ENR_SAI1EN);\\r
1735                                         /* Delay after an RCC peripheral clock enabling */ \\r
1736                                         tmpreg = READ_BIT(RCC->APB2ENR, RCC_APB2ENR_SAI1EN);\\r
1737                                         UNUSED(tmpreg); \\r
1738                                        } while(0)\r
1739 \r
1740 #define __HAL_RCC_SAI2_CLK_ENABLE()   do { \\r
1741                                         __IO uint32_t tmpreg; \\r
1742                                         SET_BIT(RCC->APB2ENR, RCC_APB2ENR_SAI2EN);\\r
1743                                         /* Delay after an RCC peripheral clock enabling */ \\r
1744                                         tmpreg = READ_BIT(RCC->APB2ENR, RCC_APB2ENR_SAI2EN);\\r
1745                                         UNUSED(tmpreg); \\r
1746                                        } while(0)\r
1747 \r
1748 #define __HAL_RCC_SAI3_CLK_ENABLE()   do { \\r
1749                                         __IO uint32_t tmpreg; \\r
1750                                         SET_BIT(RCC->APB2ENR, RCC_APB2ENR_SAI3EN);\\r
1751                                         /* Delay after an RCC peripheral clock enabling */ \\r
1752                                         tmpreg = READ_BIT(RCC->APB2ENR, RCC_APB2ENR_SAI3EN);\\r
1753                                         UNUSED(tmpreg); \\r
1754                                        } while(0)\r
1755 \r
1756 #define __HAL_RCC_DFSDM1_CLK_ENABLE()   do { \\r
1757                                         __IO uint32_t tmpreg; \\r
1758                                         SET_BIT(RCC->APB2ENR, RCC_APB2ENR_DFSDM1EN);\\r
1759                                         /* Delay after an RCC peripheral clock enabling */ \\r
1760                                         tmpreg = READ_BIT(RCC->APB2ENR, RCC_APB2ENR_DFSDM1EN);\\r
1761                                         UNUSED(tmpreg); \\r
1762                                        } while(0)\r
1763 \r
1764 #define __HAL_RCC_HRTIM1_CLK_ENABLE()   do { \\r
1765                                         __IO uint32_t tmpreg; \\r
1766                                         SET_BIT(RCC->APB2ENR, RCC_APB2ENR_HRTIMEN);\\r
1767                                         /* Delay after an RCC peripheral clock enabling */ \\r
1768                                         tmpreg = READ_BIT(RCC->APB2ENR, RCC_APB2ENR_HRTIMEN);\\r
1769                                         UNUSED(tmpreg); \\r
1770                                        } while(0)\r
1771 \r
1772 #define __HAL_RCC_TIM1_CLK_DISABLE()           (RCC->APB2ENR) &= ~ (RCC_APB2ENR_TIM1EN)\r
1773 #define __HAL_RCC_TIM8_CLK_DISABLE()           (RCC->APB2ENR) &= ~ (RCC_APB2ENR_TIM8EN)\r
1774 #define __HAL_RCC_USART1_CLK_DISABLE()         (RCC->APB2ENR) &= ~ (RCC_APB2ENR_USART1EN)\r
1775 #define __HAL_RCC_USART6_CLK_DISABLE()         (RCC->APB2ENR) &= ~ (RCC_APB2ENR_USART6EN)\r
1776 #define __HAL_RCC_SPI1_CLK_DISABLE()           (RCC->APB2ENR) &= ~ (RCC_APB2ENR_SPI1EN)\r
1777 #define __HAL_RCC_SPI4_CLK_DISABLE()           (RCC->APB2ENR) &= ~ (RCC_APB2ENR_SPI4EN)\r
1778 #define __HAL_RCC_TIM15_CLK_DISABLE()          (RCC->APB2ENR) &= ~ (RCC_APB2ENR_TIM15EN)\r
1779 #define __HAL_RCC_TIM16_CLK_DISABLE()          (RCC->APB2ENR) &= ~ (RCC_APB2ENR_TIM16EN)\r
1780 #define __HAL_RCC_TIM17_CLK_DISABLE()          (RCC->APB2ENR) &= ~ (RCC_APB2ENR_TIM17EN)\r
1781 #define __HAL_RCC_SPI5_CLK_DISABLE()           (RCC->APB2ENR) &= ~ (RCC_APB2ENR_SPI5EN)\r
1782 #define __HAL_RCC_SAI1_CLK_DISABLE()           (RCC->APB2ENR) &= ~ (RCC_APB2ENR_SAI1EN)\r
1783 #define __HAL_RCC_SAI2_CLK_DISABLE()           (RCC->APB2ENR) &= ~ (RCC_APB2ENR_SAI2EN)\r
1784 #define __HAL_RCC_SAI3_CLK_DISABLE()           (RCC->APB2ENR) &= ~ (RCC_APB2ENR_SAI3EN)\r
1785 #define __HAL_RCC_DFSDM1_CLK_DISABLE()         (RCC->APB2ENR) &= ~ (RCC_APB2ENR_DFSDM1EN)\r
1786 #define __HAL_RCC_HRTIM1_CLK_DISABLE()         (RCC->APB2ENR) &= ~ (RCC_APB2ENR_HRTIMEN)\r
1787 \r
1788 \r
1789 /** @brief  Get the enable or disable status of the APB2 peripheral clock\r
1790   * @note   After reset, the peripheral clock (used for registers read/write access)\r
1791   *         is disabled and the application software has to enable this clock before\r
1792   *         using it.\r
1793   */\r
1794 \r
1795 #define __HAL_RCC_TIM1_IS_CLK_ENABLED()            ((RCC->APB2ENR & RCC_APB2ENR_TIM1EN)   != 0U)\r
1796 #define __HAL_RCC_TIM8_IS_CLK_ENABLED()            ((RCC->APB2ENR & RCC_APB2ENR_TIM8EN)   != 0U)\r
1797 #define __HAL_RCC_USART1_IS_CLK_ENABLED()          ((RCC->APB2ENR & RCC_APB2ENR_USART1EN) != 0U)\r
1798 #define __HAL_RCC_USART6_IS_CLK_ENABLED()          ((RCC->APB2ENR & RCC_APB2ENR_USART6EN) != 0U)\r
1799 #define __HAL_RCC_SPI1_IS_CLK_ENABLED()            ((RCC->APB2ENR & RCC_APB2ENR_SPI1EN)   != 0U)\r
1800 #define __HAL_RCC_SPI4_IS_CLK_ENABLED()            ((RCC->APB2ENR & RCC_APB2ENR_SPI4EN)   != 0U)\r
1801 #define __HAL_RCC_TIM15_IS_CLK_ENABLED()           ((RCC->APB2ENR & RCC_APB2ENR_TIM15EN)  != 0U)\r
1802 #define __HAL_RCC_TIM16_IS_CLK_ENABLED()           ((RCC->APB2ENR & RCC_APB2ENR_TIM16EN)  != 0U)\r
1803 #define __HAL_RCC_TIM17_IS_CLK_ENABLED()           ((RCC->APB2ENR & RCC_APB2ENR_TIM17EN)  != 0U)\r
1804 #define __HAL_RCC_SPI5_IS_CLK_ENABLED()            ((RCC->APB2ENR & RCC_APB2ENR_SPI5EN)   != 0U)\r
1805 #define __HAL_RCC_SAI1_IS_CLK_ENABLED()            ((RCC->APB2ENR & RCC_APB2ENR_SAI1EN)   != 0U)\r
1806 #define __HAL_RCC_SAI2_IS_CLK_ENABLED()            ((RCC->APB2ENR & RCC_APB2ENR_SAI2EN)   != 0U)\r
1807 #define __HAL_RCC_SAI3_IS_CLK_ENABLED()            ((RCC->APB2ENR & RCC_APB2ENR_SAI3EN)   != 0U)\r
1808 #define __HAL_RCC_DFSDM1_IS_CLK_ENABLED()          ((RCC->APB2ENR & RCC_APB2ENR_DFSDM1EN) != 0U)\r
1809 #define __HAL_RCC_HRTIM1_IS_CLK_ENABLED()          ((RCC->APB2ENR & RCC_APB2ENR_HRTIMEN)  != 0U)\r
1810 \r
1811 #define __HAL_RCC_TIM1_IS_CLK_DISABLED()           ((RCC->APB2ENR & RCC_APB2ENR_TIM1EN)   == 0U)\r
1812 #define __HAL_RCC_TIM8_IS_CLK_DISABLED()           ((RCC->APB2ENR & RCC_APB2ENR_TIM8EN)   == 0U)\r
1813 #define __HAL_RCC_USART1_IS_CLK_DISABLED()         ((RCC->APB2ENR & RCC_APB2ENR_USART1EN) == 0U)\r
1814 #define __HAL_RCC_USART6_IS_CLK_DISABLED()         ((RCC->APB2ENR & RCC_APB2ENR_USART6EN) == 0U)\r
1815 #define __HAL_RCC_SPI1_IS_CLK_DISABLED()           ((RCC->APB2ENR & RCC_APB2ENR_SPI1EN)   == 0U)\r
1816 #define __HAL_RCC_SPI4_IS_CLK_DISABLED()           ((RCC->APB2ENR & RCC_APB2ENR_SPI4EN)   == 0U)\r
1817 #define __HAL_RCC_TIM15_IS_CLK_DISABLED()          ((RCC->APB2ENR & RCC_APB2ENR_TIM15EN)  == 0U)\r
1818 #define __HAL_RCC_TIM16_IS_CLK_DISABLED()          ((RCC->APB2ENR & RCC_APB2ENR_TIM16EN)  == 0U)\r
1819 #define __HAL_RCC_TIM17_IS_CLK_DISABLED()          ((RCC->APB2ENR & RCC_APB2ENR_TIM17EN)  == 0U)\r
1820 #define __HAL_RCC_SPI5_IS_CLK_DISABLED()           ((RCC->APB2ENR & RCC_APB2ENR_SPI5EN)   == 0U)\r
1821 #define __HAL_RCC_SAI1_IS_CLK_DISABLED()           ((RCC->APB2ENR & RCC_APB2ENR_SAI1EN)   == 0U)\r
1822 #define __HAL_RCC_SAI2_IS_CLK_DISABLED()           ((RCC->APB2ENR & RCC_APB2ENR_SAI2EN)   == 0U)\r
1823 #define __HAL_RCC_SAI3_IS_CLK_DISABLED()           ((RCC->APB2ENR & RCC_APB2ENR_SAI3EN)   == 0U)\r
1824 #define __HAL_RCC_DFSDM1_IS_CLK_DISABLED()         ((RCC->APB2ENR & RCC_APB2ENR_DFSDM1EN) == 0U)\r
1825 #define __HAL_RCC_HRTIM1_IS_CLK_DISABLED()         ((RCC->APB2ENR & RCC_APB2ENR_HRTIMEN)  == 0U)\r
1826 \r
1827 \r
1828 /** @brief  Enable or disable the APB4 peripheral clock.\r
1829   * @note   After reset, the peripheral clock (used for registers read/write access)\r
1830   *         is disabled and the application software has to enable this clock before\r
1831   *         using it.\r
1832   */\r
1833 \r
1834 #define __HAL_RCC_SYSCFG_CLK_ENABLE()   do { \\r
1835                                         __IO uint32_t tmpreg; \\r
1836                                         SET_BIT(RCC->APB4ENR, RCC_APB4ENR_SYSCFGEN);\\r
1837                                         /* Delay after an RCC peripheral clock enabling */ \\r
1838                                         tmpreg = READ_BIT(RCC->APB4ENR, RCC_APB4ENR_SYSCFGEN);\\r
1839                                         UNUSED(tmpreg); \\r
1840                                        } while(0)\r
1841 \r
1842 #define __HAL_RCC_LPUART1_CLK_ENABLE()   do { \\r
1843                                         __IO uint32_t tmpreg; \\r
1844                                         SET_BIT(RCC->APB4ENR, RCC_APB4ENR_LPUART1EN);\\r
1845                                         /* Delay after an RCC peripheral clock enabling */ \\r
1846                                         tmpreg = READ_BIT(RCC->APB4ENR, RCC_APB4ENR_LPUART1EN);\\r
1847                                         UNUSED(tmpreg); \\r
1848                                        } while(0)\r
1849 \r
1850 #define __HAL_RCC_SPI6_CLK_ENABLE()   do { \\r
1851                                         __IO uint32_t tmpreg; \\r
1852                                         SET_BIT(RCC->APB4ENR, RCC_APB4ENR_SPI6EN);\\r
1853                                         /* Delay after an RCC peripheral clock enabling */ \\r
1854                                         tmpreg = READ_BIT(RCC->APB4ENR, RCC_APB4ENR_SPI6EN);\\r
1855                                         UNUSED(tmpreg); \\r
1856                                        } while(0)\r
1857 \r
1858 #define __HAL_RCC_I2C4_CLK_ENABLE()   do { \\r
1859                                         __IO uint32_t tmpreg; \\r
1860                                         SET_BIT(RCC->APB4ENR, RCC_APB4ENR_I2C4EN);\\r
1861                                         /* Delay after an RCC peripheral clock enabling */ \\r
1862                                         tmpreg = READ_BIT(RCC->APB4ENR, RCC_APB4ENR_I2C4EN);\\r
1863                                         UNUSED(tmpreg); \\r
1864                                        } while(0)\r
1865 \r
1866 #define __HAL_RCC_LPTIM2_CLK_ENABLE()   do { \\r
1867                                         __IO uint32_t tmpreg; \\r
1868                                         SET_BIT(RCC->APB4ENR, RCC_APB4ENR_LPTIM2EN);\\r
1869                                         /* Delay after an RCC peripheral clock enabling */ \\r
1870                                         tmpreg = READ_BIT(RCC->APB4ENR, RCC_APB4ENR_LPTIM2EN);\\r
1871                                         UNUSED(tmpreg); \\r
1872                                        } while(0)\r
1873 \r
1874 #define __HAL_RCC_LPTIM3_CLK_ENABLE()   do { \\r
1875                                         __IO uint32_t tmpreg; \\r
1876                                         SET_BIT(RCC->APB4ENR, RCC_APB4ENR_LPTIM3EN);\\r
1877                                         /* Delay after an RCC peripheral clock enabling */ \\r
1878                                         tmpreg = READ_BIT(RCC->APB4ENR, RCC_APB4ENR_LPTIM3EN);\\r
1879                                         UNUSED(tmpreg); \\r
1880                                        } while(0)\r
1881 \r
1882 #define __HAL_RCC_LPTIM4_CLK_ENABLE()   do { \\r
1883                                         __IO uint32_t tmpreg; \\r
1884                                         SET_BIT(RCC->APB4ENR, RCC_APB4ENR_LPTIM4EN);\\r
1885                                         /* Delay after an RCC peripheral clock enabling */ \\r
1886                                         tmpreg = READ_BIT(RCC->APB4ENR, RCC_APB4ENR_LPTIM4EN);\\r
1887                                         UNUSED(tmpreg); \\r
1888                                        } while(0)\r
1889 \r
1890 #define __HAL_RCC_LPTIM5_CLK_ENABLE()   do { \\r
1891                                         __IO uint32_t tmpreg; \\r
1892                                         SET_BIT(RCC->APB4ENR, RCC_APB4ENR_LPTIM5EN);\\r
1893                                         /* Delay after an RCC peripheral clock enabling */ \\r
1894                                         tmpreg = READ_BIT(RCC->APB4ENR, RCC_APB4ENR_LPTIM5EN);\\r
1895                                         UNUSED(tmpreg); \\r
1896                                        } while(0)\r
1897 \r
1898 #define __HAL_RCC_COMP12_CLK_ENABLE()   do { \\r
1899                                         __IO uint32_t tmpreg; \\r
1900                                         SET_BIT(RCC->APB4ENR, RCC_APB4ENR_COMP12EN);\\r
1901                                         /* Delay after an RCC peripheral clock enabling */ \\r
1902                                         tmpreg = READ_BIT(RCC->APB4ENR, RCC_APB4ENR_COMP12EN);\\r
1903                                         UNUSED(tmpreg); \\r
1904                                        } while(0)\r
1905 \r
1906 #define __HAL_RCC_VREF_CLK_ENABLE()   do { \\r
1907                                         __IO uint32_t tmpreg; \\r
1908                                         SET_BIT(RCC->APB4ENR, RCC_APB4ENR_VREFEN);\\r
1909                                         /* Delay after an RCC peripheral clock enabling */ \\r
1910                                         tmpreg = READ_BIT(RCC->APB4ENR, RCC_APB4ENR_VREFEN);\\r
1911                                         UNUSED(tmpreg); \\r
1912                                        } while(0)\r
1913 \r
1914 #define __HAL_RCC_SAI4_CLK_ENABLE()   do { \\r
1915                                         __IO uint32_t tmpreg; \\r
1916                                         SET_BIT(RCC->APB4ENR, RCC_APB4ENR_SAI4EN);\\r
1917                                         /* Delay after an RCC peripheral clock enabling */ \\r
1918                                         tmpreg = READ_BIT(RCC->APB4ENR, RCC_APB4ENR_SAI4EN);\\r
1919                                         UNUSED(tmpreg); \\r
1920                                        } while(0)\r
1921 \r
1922 #define __HAL_RCC_RTC_CLK_ENABLE()   do { \\r
1923                                         __IO uint32_t tmpreg; \\r
1924                                         SET_BIT(RCC->APB4ENR, RCC_APB4ENR_RTCAPBEN);\\r
1925                                         /* Delay after an RCC peripheral clock enabling */ \\r
1926                                         tmpreg = READ_BIT(RCC->APB4ENR, RCC_APB4ENR_RTCAPBEN);\\r
1927                                         UNUSED(tmpreg); \\r
1928                                        } while(0)\r
1929 \r
1930 #define __HAL_RCC_SYSCFG_CLK_DISABLE()           (RCC->APB4ENR) &= ~ (RCC_APB4ENR_SYSCFGEN)\r
1931 #define __HAL_RCC_LPUART1_CLK_DISABLE()          (RCC->APB4ENR) &= ~ (RCC_APB4ENR_LPUART1EN)\r
1932 #define __HAL_RCC_SPI6_CLK_DISABLE()             (RCC->APB4ENR) &= ~ (RCC_APB4ENR_SPI6EN)\r
1933 #define __HAL_RCC_I2C4_CLK_DISABLE()             (RCC->APB4ENR) &= ~ (RCC_APB4ENR_I2C4EN)\r
1934 #define __HAL_RCC_LPTIM2_CLK_DISABLE()           (RCC->APB4ENR) &= ~ (RCC_APB4ENR_LPTIM2EN)\r
1935 #define __HAL_RCC_LPTIM3_CLK_DISABLE()           (RCC->APB4ENR) &= ~ (RCC_APB4ENR_LPTIM3EN)\r
1936 #define __HAL_RCC_LPTIM4_CLK_DISABLE()           (RCC->APB4ENR) &= ~ (RCC_APB4ENR_LPTIM4EN)\r
1937 #define __HAL_RCC_LPTIM5_CLK_DISABLE()           (RCC->APB4ENR) &= ~ (RCC_APB4ENR_LPTIM5EN)\r
1938 #define __HAL_RCC_COMP12_CLK_DISABLE()           (RCC->APB4ENR) &= ~ (RCC_APB4ENR_COMP12EN)\r
1939 #define __HAL_RCC_VREF_CLK_DISABLE()             (RCC->APB4ENR) &= ~ (RCC_APB4ENR_VREFEN)\r
1940 #define __HAL_RCC_RTC_CLK_DISABLE()              (RCC->APB4ENR) &= ~ (RCC_APB4ENR_RTCAPBEN)\r
1941 #define __HAL_RCC_SAI4_CLK_DISABLE()             (RCC->APB4ENR) &= ~ (RCC_APB4ENR_SAI4EN)\r
1942 \r
1943 /** @brief  Get the enable or disable status of the APB4 peripheral clock\r
1944   * @note   After reset, the peripheral clock (used for registers read/write access)\r
1945   *         is disabled and the application software has to enable this clock before\r
1946   *         using it.\r
1947   */\r
1948 \r
1949 #define __HAL_RCC_SYSCFG_IS_CLK_ENABLED()            ((RCC->APB4ENR & RCC_APB4ENR_SYSCFGEN)  != 0U)\r
1950 #define __HAL_RCC_LPUART1_IS_CLK_ENABLED()           ((RCC->APB4ENR & RCC_APB4ENR_LPUART1EN) != 0U)\r
1951 #define __HAL_RCC_SPI6_IS_CLK_ENABLED()              ((RCC->APB4ENR & RCC_APB4ENR_SPI6EN)    != 0U)\r
1952 #define __HAL_RCC_I2C4_IS_CLK_ENABLED()              ((RCC->APB4ENR & RCC_APB4ENR_I2C4EN)    != 0U)\r
1953 #define __HAL_RCC_LPTIM2_IS_CLK_ENABLED()            ((RCC->APB4ENR & RCC_APB4ENR_LPTIM2EN)  != 0U)\r
1954 #define __HAL_RCC_LPTIM3_IS_CLK_ENABLED()            ((RCC->APB4ENR & RCC_APB4ENR_LPTIM3EN)  != 0U)\r
1955 #define __HAL_RCC_LPTIM4_IS_CLK_ENABLED()            ((RCC->APB4ENR & RCC_APB4ENR_LPTIM4EN)  != 0U)\r
1956 #define __HAL_RCC_LPTIM5_IS_CLK_ENABLED()            ((RCC->APB4ENR & RCC_APB4ENR_LPTIM5EN)  != 0U)\r
1957 #define __HAL_RCC_COMP12_IS_CLK_ENABLED()            ((RCC->APB4ENR & RCC_APB4ENR_COMP12EN)  != 0U)\r
1958 #define __HAL_RCC_VREF_IS_CLK_ENABLED()              ((RCC->APB4ENR & RCC_APB4ENR_VREFEN)    != 0U)\r
1959 #define __HAL_RCC_RTC_IS_CLK_ENABLED()               ((RCC->APB4ENR & RCC_APB4ENR_RTCAPBEN)  != 0U)\r
1960 #define __HAL_RCC_SAI4_IS_CLK_ENABLED()              ((RCC->APB4ENR & RCC_APB4ENR_SAI4EN)    != 0U)\r
1961 \r
1962 #define __HAL_RCC_SYSCFG_IS_CLK_DISABLED()           ((RCC->APB4ENR & RCC_APB4ENR_SYSCFGEN)  == 0U)\r
1963 #define __HAL_RCC_LPUART1_IS_CLK_DISABLED()          ((RCC->APB4ENR & RCC_APB4ENR_LPUART1EN) == 0U)\r
1964 #define __HAL_RCC_SPI6_IS_CLK_DISABLED()             ((RCC->APB4ENR & RCC_APB4ENR_SPI6EN)    == 0U)\r
1965 #define __HAL_RCC_I2C4_IS_CLK_DISABLED()             ((RCC->APB4ENR & RCC_APB4ENR_I2C4EN)    == 0U)\r
1966 #define __HAL_RCC_LPTIM2_IS_CLK_DISABLED()           ((RCC->APB4ENR & RCC_APB4ENR_LPTIM2EN)  == 0U)\r
1967 #define __HAL_RCC_LPTIM3_IS_CLK_DISABLED()           ((RCC->APB4ENR & RCC_APB4ENR_LPTIM3EN)  == 0U)\r
1968 #define __HAL_RCC_LPTIM4_IS_CLK_DISABLED()           ((RCC->APB4ENR & RCC_APB4ENR_LPTIM4EN)  == 0U)\r
1969 #define __HAL_RCC_LPTIM5_IS_CLK_DISABLED()           ((RCC->APB4ENR & RCC_APB4ENR_LPTIM5EN)  == 0U)\r
1970 #define __HAL_RCC_COMP12_IS_CLK_DISABLED()           ((RCC->APB4ENR & RCC_APB4ENR_COMP12EN)  == 0U)\r
1971 #define __HAL_RCC_VREF_IS_CLK_DISABLED()             ((RCC->APB4ENR & RCC_APB4ENR_VREFEN)    == 0U)\r
1972 #define __HAL_RCC_RTC_IS_CLK_DISABLED()              ((RCC->APB4ENR & RCC_APB4ENR_RTCAPBEN)  == 0U)\r
1973 #define __HAL_RCC_SAI4_IS_CLK_DISABLED()             ((RCC->APB4ENR & RCC_APB4ENR_SAI4EN)    == 0U)\r
1974 \r
1975 \r
1976 #if defined(DUAL_CORE)\r
1977 \r
1978 /* Exported macros for RCC_C1 -------------------------------------------------*/\r
1979 \r
1980 /** @brief  Enable or disable the AHB3 peripheral clock.\r
1981   * @note   After reset, the peripheral clock (used for registers read/write access)\r
1982   *         is disabled and the application software has to enable this clock before\r
1983   *         using it.\r
1984   */\r
1985 \r
1986 #define __HAL_RCC_C1_MDMA_CLK_ENABLE()   do { \\r
1987                                         __IO uint32_t tmpreg; \\r
1988                                         SET_BIT(RCC_C1->AHB3ENR, RCC_AHB3ENR_MDMAEN);\\r
1989                                         /* Delay after an RCC peripheral clock enabling */ \\r
1990                                         tmpreg = READ_BIT(RCC_C1->AHB3ENR, RCC_AHB3ENR_MDMAEN);\\r
1991                                         UNUSED(tmpreg); \\r
1992                                        } while(0)\r
1993 \r
1994 #define __HAL_RCC_C1_DMA2D_CLK_ENABLE()   do { \\r
1995                                         __IO uint32_t tmpreg; \\r
1996                                         SET_BIT(RCC_C1->AHB3ENR, RCC_AHB3ENR_DMA2DEN);\\r
1997                                         /* Delay after an RCC peripheral clock enabling */ \\r
1998                                         tmpreg = READ_BIT(RCC_C1->AHB3ENR, RCC_AHB3ENR_DMA2DEN);\\r
1999                                         UNUSED(tmpreg); \\r
2000                                        } while(0)\r
2001 \r
2002 #define __HAL_RCC_C1_JPGDECEN_CLK_ENABLE()   do { \\r
2003                                         __IO uint32_t tmpreg; \\r
2004                                         SET_BIT(RCC_C1->AHB3ENR, RCC_AHB3ENR_JPGDECEN);\\r
2005                                         /* Delay after an RCC peripheral clock enabling */ \\r
2006                                         tmpreg = READ_BIT(RCC_C1->AHB3ENR, RCC_AHB3ENR_JPGDECEN);\\r
2007                                         UNUSED(tmpreg); \\r
2008                                        } while(0)\r
2009 \r
2010 \r
2011 #define __HAL_RCC_C1_FMC_CLK_ENABLE()   do { \\r
2012                                         __IO uint32_t tmpreg; \\r
2013                                         SET_BIT(RCC_C1->AHB3ENR, RCC_AHB3ENR_FMCEN);\\r
2014                                         /* Delay after an RCC peripheral clock enabling */ \\r
2015                                         tmpreg = READ_BIT(RCC_C1->AHB3ENR, RCC_AHB3ENR_FMCEN);\\r
2016                                         UNUSED(tmpreg); \\r
2017                                        } while(0)\r
2018 \r
2019 #define __HAL_RCC_C1_QSPI_CLK_ENABLE()   do { \\r
2020                                         __IO uint32_t tmpreg; \\r
2021                                         SET_BIT(RCC_C1->AHB3ENR, RCC_AHB3ENR_QSPIEN);\\r
2022                                         /* Delay after an RCC peripheral clock enabling */ \\r
2023                                         tmpreg = READ_BIT(RCC_C1->AHB3ENR, RCC_AHB3ENR_QSPIEN);\\r
2024                                         UNUSED(tmpreg); \\r
2025                                        } while(0)\r
2026 \r
2027 #define __HAL_RCC_C1_SDMMC1_CLK_ENABLE()   do { \\r
2028                                         __IO uint32_t tmpreg; \\r
2029                                         SET_BIT(RCC_C1->AHB3ENR, RCC_AHB3ENR_SDMMC1EN);\\r
2030                                         /* Delay after an RCC peripheral clock enabling */ \\r
2031                                         tmpreg = READ_BIT(RCC_C1->AHB3ENR, RCC_AHB3ENR_SDMMC1EN);\\r
2032                                         UNUSED(tmpreg); \\r
2033                                        } while(0)\r
2034 \r
2035 \r
2036 \r
2037 \r
2038 #define __HAL_RCC_C1_MDMA_CLK_DISABLE()            (RCC_C1->AHB3ENR &= ~ (RCC_AHB3ENR_MDMAEN))\r
2039 #define __HAL_RCC_C1_DMA2D_CLK_DISABLE()           (RCC_C1->AHB3ENR &= ~ (RCC_AHB3ENR_DMA2DEN))\r
2040 #define __HAL_RCC_C1_JPGDECEN_CLK_DISABLE()        (RCC_C1->AHB3ENR &= ~ (RCC_AHB3ENR_JPGDECEN))\r
2041 #define __HAL_RCC_C1_FMC_CLK_DISABLE()             (RCC_C1->AHB3ENR &= ~ (RCC_AHB3ENR_FMCEN))\r
2042 #define __HAL_RCC_C1_QSPI_CLK_DISABLE()            (RCC_C1->AHB3ENR &= ~ (RCC_AHB3ENR_QSPIEN))\r
2043 #define __HAL_RCC_C1_SDMMC1_CLK_DISABLE()          (RCC_C1->AHB3ENR &= ~ (RCC_AHB3ENR_SDMMC1EN))\r
2044 \r
2045 \r
2046 \r
2047 \r
2048 /** @brief  Enable or disable the AHB1 peripheral clock.\r
2049   * @note   After reset, the peripheral clock (used for registers read/write access)\r
2050   *         is disabled and the application software has to enable this clock before\r
2051   *         using it.\r
2052   */\r
2053 \r
2054 #define __HAL_RCC_C1_DMA1_CLK_ENABLE()   do { \\r
2055                                         __IO uint32_t tmpreg; \\r
2056                                         SET_BIT(RCC_C1->AHB1ENR, RCC_AHB1ENR_DMA1EN);\\r
2057                                         /* Delay after an RCC peripheral clock enabling */ \\r
2058                                         tmpreg = READ_BIT(RCC_C1->AHB1ENR, RCC_AHB1ENR_DMA1EN);\\r
2059                                         UNUSED(tmpreg); \\r
2060                                        } while(0)\r
2061 \r
2062 #define __HAL_RCC_C1_DMA2_CLK_ENABLE()   do { \\r
2063                                         __IO uint32_t tmpreg; \\r
2064                                         SET_BIT(RCC_C1->AHB1ENR, RCC_AHB1ENR_DMA2EN);\\r
2065                                         /* Delay after an RCC peripheral clock enabling */ \\r
2066                                         tmpreg = READ_BIT(RCC_C1->AHB1ENR, RCC_AHB1ENR_DMA2EN);\\r
2067                                         UNUSED(tmpreg); \\r
2068                                        } while(0)\r
2069 \r
2070 #define __HAL_RCC_C1_ADC12_CLK_ENABLE()   do { \\r
2071                                         __IO uint32_t tmpreg; \\r
2072                                         SET_BIT(RCC_C1->AHB1ENR, RCC_AHB1ENR_ADC12EN);\\r
2073                                         /* Delay after an RCC peripheral clock enabling */ \\r
2074                                         tmpreg = READ_BIT(RCC_C1->AHB1ENR, RCC_AHB1ENR_ADC12EN);\\r
2075                                         UNUSED(tmpreg); \\r
2076                                        } while(0)\r
2077 \r
2078 #define __HAL_RCC_C1_ART_CLK_ENABLE()   do { \\r
2079                                         __IO uint32_t tmpreg; \\r
2080                                         SET_BIT(RCC_C1->AHB1ENR, RCC_AHB1ENR_ARTEN);\\r
2081                                         /* Delay after an RCC peripheral clock enabling */ \\r
2082                                         tmpreg = READ_BIT(RCC_C1->AHB1ENR, RCC_AHB1ENR_ARTEN);\\r
2083                                         UNUSED(tmpreg); \\r
2084                                        } while(0)\r
2085 \r
2086 #define __HAL_RCC_C1_ETH1MAC_CLK_ENABLE()   do { \\r
2087                                         __IO uint32_t tmpreg; \\r
2088                                         SET_BIT(RCC_C1->AHB1ENR, RCC_AHB1ENR_ETH1MACEN);\\r
2089                                         /* Delay after an RCC peripheral clock enabling */ \\r
2090                                         tmpreg = READ_BIT(RCC_C1->AHB1ENR, RCC_AHB1ENR_ETH1MACEN);\\r
2091                                         UNUSED(tmpreg); \\r
2092                                        } while(0)\r
2093 \r
2094 #define __HAL_RCC_C1_ETH1TX_CLK_ENABLE()   do { \\r
2095                                         __IO uint32_t tmpreg; \\r
2096                                         SET_BIT(RCC_C1->AHB1ENR, RCC_AHB1ENR_ETH1TXEN);\\r
2097                                         /* Delay after an RCC peripheral clock enabling */ \\r
2098                                         tmpreg = READ_BIT(RCC_C1->AHB1ENR, RCC_AHB1ENR_ETH1TXEN);\\r
2099                                         UNUSED(tmpreg); \\r
2100                                        } while(0)\r
2101 \r
2102 #define __HAL_RCC_C1_ETH1RX_CLK_ENABLE()   do { \\r
2103                                         __IO uint32_t tmpreg; \\r
2104                                         SET_BIT(RCC_C1->AHB1ENR, RCC_AHB1ENR_ETH1RXEN);\\r
2105                                         /* Delay after an RCC peripheral clock enabling */ \\r
2106                                         tmpreg = READ_BIT(RCC_C1->AHB1ENR, RCC_AHB1ENR_ETH1RXEN);\\r
2107                                         UNUSED(tmpreg); \\r
2108                                        } while(0)\r
2109 \r
2110 \r
2111 #define __HAL_RCC_C1_USB1_OTG_HS_CLK_ENABLE()   do { \\r
2112                                         __IO uint32_t tmpreg; \\r
2113                                         SET_BIT(RCC_C1->AHB1ENR, RCC_AHB1ENR_USB1OTGHSEN);\\r
2114                                         /* Delay after an RCC peripheral clock enabling */ \\r
2115                                         tmpreg = READ_BIT(RCC_C1->AHB1ENR, RCC_AHB1ENR_USB1OTGHSEN);\\r
2116                                         UNUSED(tmpreg); \\r
2117                                        } while(0)\r
2118 \r
2119 #define __HAL_RCC_C1_USB1_OTG_HS_ULPI_CLK_ENABLE()   do { \\r
2120                                         __IO uint32_t tmpreg; \\r
2121                                         SET_BIT(RCC_C1->AHB1ENR, RCC_AHB1ENR_USB1OTGHSULPIEN);\\r
2122                                         /* Delay after an RCC peripheral clock enabling */ \\r
2123                                         tmpreg = READ_BIT(RCC_C1->AHB1ENR, RCC_AHB1ENR_USB1OTGHSULPIEN);\\r
2124                                         UNUSED(tmpreg); \\r
2125                                        } while(0)\r
2126 \r
2127 #define __HAL_RCC_C1_USB2_OTG_FS_CLK_ENABLE()   do { \\r
2128                                         __IO uint32_t tmpreg; \\r
2129                                         SET_BIT(RCC_C1->AHB1ENR, RCC_AHB1ENR_USB2OTGHSEN);\\r
2130                                         /* Delay after an RCC peripheral clock enabling */ \\r
2131                                         tmpreg = READ_BIT(RCC_C1->AHB1ENR, RCC_AHB1ENR_USB2OTGHSEN);\\r
2132                                         UNUSED(tmpreg); \\r
2133                                        } while(0)\r
2134 \r
2135 #define __HAL_RCC_C1_USB2_OTG_FS_ULPI_CLK_ENABLE()   do { \\r
2136                                         __IO uint32_t tmpreg; \\r
2137                                         SET_BIT(RCC_C1->AHB1ENR, RCC_AHB1ENR_USB2OTGHSULPIEN);\\r
2138                                         /* Delay after an RCC peripheral clock enabling */ \\r
2139                                         tmpreg = READ_BIT(RCC_C1->AHB1ENR, RCC_AHB1ENR_USB2OTGHSULPIEN);\\r
2140                                         UNUSED(tmpreg); \\r
2141                                        } while(0)\r
2142 \r
2143 #define __HAL_RCC_C1_DMA1_CLK_DISABLE()             (RCC_C1->AHB1ENR &= ~ (RCC_AHB1ENR_DMA1EN))\r
2144 #define __HAL_RCC_C1_DMA2_CLK_DISABLE()             (RCC_C1->AHB1ENR &= ~ (RCC_AHB1ENR_DMA2EN))\r
2145 #define __HAL_RCC_C1_ADC12_CLK_DISABLE()            (RCC_C1->AHB1ENR &= ~ (RCC_AHB1ENR_ADC12EN))\r
2146 #define __HAL_RCC_C1_ART_CLK_DISABLE()              (RCC_C1->AHB1ENR &= ~ (RCC_AHB1ENR_ARTEN))\r
2147 #define __HAL_RCC_C1_ETH1MAC_CLK_DISABLE()          (RCC_C1->AHB1ENR &= ~ (RCC_AHB1ENR_ETH1MACEN))\r
2148 #define __HAL_RCC_C1_ETH1TX_CLK_DISABLE()           (RCC_C1->AHB1ENR &= ~ (RCC_AHB1ENR_ETH1TXEN))\r
2149 #define __HAL_RCC_C1_ETH1RX_CLK_DISABLE()           (RCC_C1->AHB1ENR &= ~ (RCC_AHB1ENR_ETH1RXEN))\r
2150 #define __HAL_RCC_C1_USB1_OTG_HS_CLK_DISABLE()      (RCC_C1->AHB1ENR &= ~ (RCC_AHB1ENR_USB1OTGHSEN))\r
2151 #define __HAL_RCC_C1_USB1_OTG_HS_ULPI_CLK_DISABLE() (RCC_C1->AHB1ENR &= ~ (RCC_AHB1ENR_USB1OTGHSULPIEN))\r
2152 #define __HAL_RCC_C1_USB2_OTG_FS_CLK_DISABLE()      (RCC_C1->AHB1ENR &= ~ (RCC_AHB1ENR_USB2OTGHSEN))\r
2153 #define __HAL_RCC_C1_USB2_OTG_FS_ULPI_CLK_DISABLE() (RCC_C1->AHB1ENR &= ~ (RCC_AHB1ENR_USB2OTGHSULPIEN))\r
2154 \r
2155 /** @brief  Enable or disable the AHB2 peripheral clock.\r
2156   * @note   After reset, the peripheral clock (used for registers read/write access)\r
2157   *         is disabled and the application software has to enable this clock before\r
2158   *         using it.\r
2159   */\r
2160 \r
2161 #define __HAL_RCC_C1_DCMI_CLK_ENABLE()   do { \\r
2162                                         __IO uint32_t tmpreg; \\r
2163                                         SET_BIT(RCC_C1->AHB2ENR, RCC_AHB2ENR_DCMIEN);\\r
2164                                         /* Delay after an RCC peripheral clock enabling */ \\r
2165                                         tmpreg = READ_BIT(RCC_C1->AHB2ENR, RCC_AHB2ENR_DCMIEN);\\r
2166                                         UNUSED(tmpreg); \\r
2167                                        } while(0)\r
2168 \r
2169 #define __HAL_RCC_C1_CRYP_CLK_ENABLE()   do { \\r
2170                                         __IO uint32_t tmpreg; \\r
2171                                         SET_BIT(RCC_C1->AHB2ENR, RCC_AHB2ENR_CRYPEN);\\r
2172                                         /* Delay after an RCC peripheral clock enabling */ \\r
2173                                         tmpreg = READ_BIT(RCC_C1->AHB2ENR, RCC_AHB2ENR_CRYPEN);\\r
2174                                         UNUSED(tmpreg); \\r
2175                                        } while(0)\r
2176 \r
2177 #define __HAL_RCC_C1_HASH_CLK_ENABLE()   do { \\r
2178                                         __IO uint32_t tmpreg; \\r
2179                                         SET_BIT(RCC_C1->AHB2ENR, RCC_AHB2ENR_HASHEN);\\r
2180                                         /* Delay after an RCC peripheral clock enabling */ \\r
2181                                         tmpreg = READ_BIT(RCC_C1->AHB2ENR, RCC_AHB2ENR_HASHEN);\\r
2182                                         UNUSED(tmpreg); \\r
2183                                        } while(0)\r
2184 \r
2185 #define __HAL_RCC_C1_RNG_CLK_ENABLE()   do { \\r
2186                                         __IO uint32_t tmpreg; \\r
2187                                         SET_BIT(RCC_C1->AHB2ENR, RCC_AHB2ENR_RNGEN);\\r
2188                                         /* Delay after an RCC peripheral clock enabling */ \\r
2189                                         tmpreg = READ_BIT(RCC_C1->AHB2ENR, RCC_AHB2ENR_RNGEN);\\r
2190                                         UNUSED(tmpreg); \\r
2191                                        } while(0)\r
2192 \r
2193 #define __HAL_RCC_C1_SDMMC2_CLK_ENABLE()   do { \\r
2194                                         __IO uint32_t tmpreg; \\r
2195                                         SET_BIT(RCC_C1->AHB2ENR, RCC_AHB2ENR_SDMMC2EN);\\r
2196                                         /* Delay after an RCC peripheral clock enabling */ \\r
2197                                         tmpreg = READ_BIT(RCC_C1->AHB2ENR, RCC_AHB2ENR_SDMMC2EN);\\r
2198                                         UNUSED(tmpreg); \\r
2199                                        } while(0)\r
2200 \r
2201 #define __HAL_RCC_C1_D2SRAM1_CLK_ENABLE()   do { \\r
2202                                         __IO uint32_t tmpreg; \\r
2203                                         SET_BIT(RCC_C1->AHB2ENR, RCC_AHB2ENR_D2SRAM1EN);\\r
2204                                         /* Delay after an RCC peripheral clock enabling */ \\r
2205                                         tmpreg = READ_BIT(RCC_C1->AHB2ENR, RCC_AHB2ENR_D2SRAM1EN);\\r
2206                                         UNUSED(tmpreg); \\r
2207                                        } while(0)\r
2208 \r
2209 #define __HAL_RCC_C1_D2SRAM2_CLK_ENABLE()   do { \\r
2210                                         __IO uint32_t tmpreg; \\r
2211                                         SET_BIT(RCC_C1->AHB2ENR, RCC_AHB2ENR_D2SRAM2EN);\\r
2212                                         /* Delay after an RCC peripheral clock enabling */ \\r
2213                                         tmpreg = READ_BIT(RCC_C1->AHB2ENR, RCC_AHB2ENR_D2SRAM2EN);\\r
2214                                         UNUSED(tmpreg); \\r
2215                                        } while(0)\r
2216 \r
2217 #define __HAL_RCC_C1_D2SRAM3_CLK_ENABLE()   do { \\r
2218                                         __IO uint32_t tmpreg; \\r
2219                                         SET_BIT(RCC_C1->AHB2ENR, RCC_AHB2ENR_D2SRAM3EN);\\r
2220                                         /* Delay after an RCC peripheral clock enabling */ \\r
2221                                         tmpreg = READ_BIT(RCC_C1->AHB2ENR, RCC_AHB2ENR_D2SRAM3EN);\\r
2222                                         UNUSED(tmpreg); \\r
2223                                        } while(0)\r
2224 \r
2225 #define __HAL_RCC_C1_DCMI_CLK_DISABLE()             (RCC_C1->AHB2ENR &= ~ (RCC_AHB2ENR_DCMIEN))\r
2226 #define __HAL_RCC_C1_CRYP_CLK_DISABLE()             (RCC_C1->AHB2ENR &= ~ (RCC_AHB2ENR_CRYPEN))\r
2227 #define __HAL_RCC_C1_HASH_CLK_DISABLE()             (RCC_C1->AHB2ENR &= ~ (RCC_AHB2ENR_HASHEN))\r
2228 #define __HAL_RCC_C1_RNG_CLK_DISABLE()              (RCC_C1->AHB2ENR &= ~ (RCC_AHB2ENR_RNGEN))\r
2229 #define __HAL_RCC_C1_SDMMC2_CLK_DISABLE()           (RCC_C1->AHB2ENR &= ~ (RCC_AHB2ENR_SDMMC2EN))\r
2230 #define __HAL_RCC_C1_D2SRAM1_CLK_DISABLE()          (RCC_C1->AHB2ENR &= ~ (RCC_AHB2ENR_D2SRAM1EN))\r
2231 #define __HAL_RCC_C1_D2SRAM2_CLK_DISABLE()          (RCC_C1->AHB2ENR &= ~ (RCC_AHB2ENR_D2SRAM2EN))\r
2232 #define __HAL_RCC_C1_D2SRAM3_CLK_DISABLE()          (RCC_C1->AHB2ENR &= ~ (RCC_AHB2ENR_D2SRAM3EN))\r
2233 \r
2234 /** @brief  Enable or disable the AHB4 peripheral clock.\r
2235   * @note   After reset, the peripheral clock (used for registers read/write access)\r
2236   *         is disabled and the application software has to enable this clock before\r
2237   *         using it.\r
2238   */\r
2239 \r
2240 #define __HAL_RCC_C1_GPIOA_CLK_ENABLE()   do { \\r
2241                                         __IO uint32_t tmpreg; \\r
2242                                         SET_BIT(RCC_C1->AHB4ENR, RCC_AHB4ENR_GPIOAEN);\\r
2243                                         /* Delay after an RCC peripheral clock enabling */ \\r
2244                                         tmpreg = READ_BIT(RCC_C1->AHB4ENR, RCC_AHB4ENR_GPIOAEN);\\r
2245                                         UNUSED(tmpreg); \\r
2246                                        } while(0)\r
2247 \r
2248 #define __HAL_RCC_C1_GPIOB_CLK_ENABLE()   do { \\r
2249                                         __IO uint32_t tmpreg; \\r
2250                                         SET_BIT(RCC_C1->AHB4ENR, RCC_AHB4ENR_GPIOBEN);\\r
2251                                         /* Delay after an RCC peripheral clock enabling */ \\r
2252                                         tmpreg = READ_BIT(RCC_C1->AHB4ENR, RCC_AHB4ENR_GPIOBEN);\\r
2253                                         UNUSED(tmpreg); \\r
2254                                        } while(0)\r
2255 \r
2256 #define __HAL_RCC_C1_GPIOC_CLK_ENABLE()   do { \\r
2257                                         __IO uint32_t tmpreg; \\r
2258                                         SET_BIT(RCC_C1->AHB4ENR, RCC_AHB4ENR_GPIOCEN);\\r
2259                                         /* Delay after an RCC peripheral clock enabling */ \\r
2260                                         tmpreg = READ_BIT(RCC_C1->AHB4ENR, RCC_AHB4ENR_GPIOCEN);\\r
2261                                         UNUSED(tmpreg); \\r
2262                                        } while(0)\r
2263 \r
2264 #define __HAL_RCC_C1_GPIOD_CLK_ENABLE()   do { \\r
2265                                         __IO uint32_t tmpreg; \\r
2266                                         SET_BIT(RCC_C1->AHB4ENR, RCC_AHB4ENR_GPIODEN);\\r
2267                                         /* Delay after an RCC peripheral clock enabling */ \\r
2268                                         tmpreg = READ_BIT(RCC_C1->AHB4ENR, RCC_AHB4ENR_GPIODEN);\\r
2269                                         UNUSED(tmpreg); \\r
2270                                        } while(0)\r
2271 \r
2272 #define __HAL_RCC_C1_GPIOE_CLK_ENABLE()   do { \\r
2273                                         __IO uint32_t tmpreg; \\r
2274                                         SET_BIT(RCC_C1->AHB4ENR, RCC_AHB4ENR_GPIOEEN);\\r
2275                                         /* Delay after an RCC peripheral clock enabling */ \\r
2276                                         tmpreg = READ_BIT(RCC_C1->AHB4ENR, RCC_AHB4ENR_GPIOEEN);\\r
2277                                         UNUSED(tmpreg); \\r
2278                                        } while(0)\r
2279 \r
2280 #define __HAL_RCC_C1_GPIOF_CLK_ENABLE()   do { \\r
2281                                         __IO uint32_t tmpreg; \\r
2282                                         SET_BIT(RCC_C1->AHB4ENR, RCC_AHB4ENR_GPIOFEN);\\r
2283                                         /* Delay after an RCC peripheral clock enabling */ \\r
2284                                         tmpreg = READ_BIT(RCC_C1->AHB4ENR, RCC_AHB4ENR_GPIOFEN);\\r
2285                                         UNUSED(tmpreg); \\r
2286                                        } while(0)\r
2287 \r
2288 #define __HAL_RCC_C1_GPIOG_CLK_ENABLE()   do { \\r
2289                                         __IO uint32_t tmpreg; \\r
2290                                         SET_BIT(RCC_C1->AHB4ENR, RCC_AHB4ENR_GPIOGEN);\\r
2291                                         /* Delay after an RCC peripheral clock enabling */ \\r
2292                                         tmpreg = READ_BIT(RCC_C1->AHB4ENR, RCC_AHB4ENR_GPIOGEN);\\r
2293                                         UNUSED(tmpreg); \\r
2294                                        } while(0)\r
2295 \r
2296 #define __HAL_RCC_C1_GPIOH_CLK_ENABLE()   do { \\r
2297                                         __IO uint32_t tmpreg; \\r
2298                                         SET_BIT(RCC_C1->AHB4ENR, RCC_AHB4ENR_GPIOHEN);\\r
2299                                         /* Delay after an RCC peripheral clock enabling */ \\r
2300                                         tmpreg = READ_BIT(RCC_C1->AHB4ENR, RCC_AHB4ENR_GPIOHEN);\\r
2301                                         UNUSED(tmpreg); \\r
2302                                        } while(0)\r
2303 \r
2304 #define __HAL_RCC_C1_GPIOI_CLK_ENABLE()   do { \\r
2305                                         __IO uint32_t tmpreg; \\r
2306                                         SET_BIT(RCC_C1->AHB4ENR, RCC_AHB4ENR_GPIOIEN);\\r
2307                                         /* Delay after an RCC peripheral clock enabling */ \\r
2308                                         tmpreg = READ_BIT(RCC_C1->AHB4ENR, RCC_AHB4ENR_GPIOIEN);\\r
2309                                         UNUSED(tmpreg); \\r
2310                                        } while(0)\r
2311 \r
2312 #define __HAL_RCC_C1_GPIOJ_CLK_ENABLE()   do { \\r
2313                                         __IO uint32_t tmpreg; \\r
2314                                         SET_BIT(RCC_C1->AHB4ENR, RCC_AHB4ENR_GPIOJEN);\\r
2315                                         /* Delay after an RCC peripheral clock enabling */ \\r
2316                                         tmpreg = READ_BIT(RCC_C1->AHB4ENR, RCC_AHB4ENR_GPIOJEN);\\r
2317                                         UNUSED(tmpreg); \\r
2318                                        } while(0)\r
2319 \r
2320 #define __HAL_RCC_C1_GPIOK_CLK_ENABLE()   do { \\r
2321                                         __IO uint32_t tmpreg; \\r
2322                                         SET_BIT(RCC_C1->AHB4ENR, RCC_AHB4ENR_GPIOKEN);\\r
2323                                         /* Delay after an RCC peripheral clock enabling */ \\r
2324                                         tmpreg = READ_BIT(RCC_C1->AHB4ENR, RCC_AHB4ENR_GPIOKEN);\\r
2325                                         UNUSED(tmpreg); \\r
2326                                        } while(0)\r
2327 \r
2328 #define __HAL_RCC_C1_CRC_CLK_ENABLE()   do { \\r
2329                                         __IO uint32_t tmpreg; \\r
2330                                         SET_BIT(RCC_C1->AHB4ENR, RCC_AHB4ENR_CRCEN);\\r
2331                                         /* Delay after an RCC peripheral clock enabling */ \\r
2332                                         tmpreg = READ_BIT(RCC_C1->AHB4ENR, RCC_AHB4ENR_CRCEN);\\r
2333                                         UNUSED(tmpreg); \\r
2334                                        } while(0)\r
2335 \r
2336 #define __HAL_RCC_C1_BDMA_CLK_ENABLE()   do { \\r
2337                                         __IO uint32_t tmpreg; \\r
2338                                         SET_BIT(RCC_C1->AHB4ENR, RCC_AHB4ENR_BDMAEN);\\r
2339                                         /* Delay after an RCC peripheral clock enabling */ \\r
2340                                         tmpreg = READ_BIT(RCC_C1->AHB4ENR, RCC_AHB4ENR_BDMAEN);\\r
2341                                         UNUSED(tmpreg); \\r
2342                                        } while(0)\r
2343 \r
2344 #define __HAL_RCC_C1_ADC3_CLK_ENABLE()   do { \\r
2345                                         __IO uint32_t tmpreg; \\r
2346                                         SET_BIT(RCC_C1->AHB4ENR, RCC_AHB4ENR_ADC3EN);\\r
2347                                         /* Delay after an RCC peripheral clock enabling */ \\r
2348                                         tmpreg = READ_BIT(RCC_C1->AHB4ENR, RCC_AHB4ENR_ADC3EN);\\r
2349                                         UNUSED(tmpreg); \\r
2350                                        } while(0)\r
2351 \r
2352 #define __HAL_RCC_C1_HSEM_CLK_ENABLE()   do { \\r
2353                                         __IO uint32_t tmpreg; \\r
2354                                         SET_BIT(RCC_C1->AHB4ENR, RCC_AHB4ENR_HSEMEN);\\r
2355                                         /* Delay after an RCC peripheral clock enabling */ \\r
2356                                         tmpreg = READ_BIT(RCC_C1->AHB4ENR, RCC_AHB4ENR_HSEMEN);\\r
2357                                         UNUSED(tmpreg); \\r
2358                                        } while(0)\r
2359 \r
2360 #define __HAL_RCC_C1_BKPRAM_CLK_ENABLE()   do { \\r
2361                                         __IO uint32_t tmpreg; \\r
2362                                         SET_BIT(RCC_C1->AHB4ENR, RCC_AHB4ENR_BKPRAMEN);\\r
2363                                         /* Delay after an RCC peripheral clock enabling */ \\r
2364                                         tmpreg = READ_BIT(RCC_C1->AHB4ENR, RCC_AHB4ENR_BKPRAMEN);\\r
2365                                         UNUSED(tmpreg); \\r
2366                                        } while(0)\r
2367 \r
2368 \r
2369 #define __HAL_RCC_C1_GPIOA_CLK_DISABLE()           (RCC_C1->AHB4ENR) &= ~ (RCC_AHB4ENR_GPIOAEN)\r
2370 #define __HAL_RCC_C1_GPIOB_CLK_DISABLE()           (RCC_C1->AHB4ENR) &= ~ (RCC_AHB4ENR_GPIOBEN)\r
2371 #define __HAL_RCC_C1_GPIOC_CLK_DISABLE()           (RCC_C1->AHB4ENR) &= ~ (RCC_AHB4ENR_GPIOCEN)\r
2372 #define __HAL_RCC_C1_GPIOD_CLK_DISABLE()           (RCC_C1->AHB4ENR) &= ~ (RCC_AHB4ENR_GPIODEN)\r
2373 #define __HAL_RCC_C1_GPIOE_CLK_DISABLE()           (RCC_C1->AHB4ENR) &= ~ (RCC_AHB4ENR_GPIOEEN)\r
2374 #define __HAL_RCC_C1_GPIOF_CLK_DISABLE()           (RCC_C1->AHB4ENR) &= ~ (RCC_AHB4ENR_GPIOFEN)\r
2375 #define __HAL_RCC_C1_GPIOG_CLK_DISABLE()           (RCC_C1->AHB4ENR) &= ~ (RCC_AHB4ENR_GPIOGEN)\r
2376 #define __HAL_RCC_C1_GPIOH_CLK_DISABLE()           (RCC_C1->AHB4ENR) &= ~ (RCC_AHB4ENR_GPIOHEN)\r
2377 #define __HAL_RCC_C1_GPIOI_CLK_DISABLE()           (RCC_C1->AHB4ENR) &= ~ (RCC_AHB4ENR_GPIOIEN)\r
2378 #define __HAL_RCC_C1_GPIOJ_CLK_DISABLE()           (RCC_C1->AHB4ENR) &= ~ (RCC_AHB4ENR_GPIOJEN)\r
2379 #define __HAL_RCC_C1_GPIOK_CLK_DISABLE()           (RCC_C1->AHB4ENR) &= ~ (RCC_AHB4ENR_GPIOKEN)\r
2380 #define __HAL_RCC_C1_CRC_CLK_DISABLE()             (RCC_C1->AHB4ENR) &= ~ (RCC_AHB4ENR_CRCEN)\r
2381 #define __HAL_RCC_C1_BDMA_CLK_DISABLE()            (RCC_C1->AHB4ENR) &= ~ (RCC_AHB4ENR_BDMAEN)\r
2382 #define __HAL_RCC_C1_ADC3_CLK_DISABLE()            (RCC_C1->AHB4ENR) &= ~ (RCC_AHB4ENR_ADC3EN)\r
2383 #define __HAL_RCC_C1_HSEM_CLK_DISABLE()            (RCC_C1->AHB4ENR) &= ~ (RCC_AHB4ENR_HSEMEN)\r
2384 #define __HAL_RCC_C1_BKPRAM_CLK_DISABLE()          (RCC_C1->AHB4ENR) &= ~ (RCC_AHB4ENR_BKPRAMEN)\r
2385 \r
2386 \r
2387 /** @brief  Enable or disable the APB3 peripheral clock.\r
2388   * @note   After reset, the peripheral clock (used for registers read/write access)\r
2389   *         is disabled and the application software has to enable this clock before\r
2390   *         using it.\r
2391   */\r
2392 \r
2393 #define __HAL_RCC_C1_LTDC_CLK_ENABLE()   do { \\r
2394                                         __IO uint32_t tmpreg; \\r
2395                                         SET_BIT(RCC_C1->APB3ENR, RCC_APB3ENR_LTDCEN);\\r
2396                                         /* Delay after an RCC peripheral clock enabling */ \\r
2397                                         tmpreg = READ_BIT(RCC_C1->APB3ENR, RCC_APB3ENR_LTDCEN);\\r
2398                                         UNUSED(tmpreg); \\r
2399                                        } while(0)\r
2400 \r
2401 #define __HAL_RCC_C1_DSI_CLK_ENABLE()   do { \\r
2402                                         __IO uint32_t tmpreg; \\r
2403                                         SET_BIT(RCC_C1->APB3ENR, RCC_APB3ENR_DSIEN);\\r
2404                                         /* Delay after an RCC peripheral clock enabling */ \\r
2405                                         tmpreg = READ_BIT(RCC_C1->APB3ENR, RCC_APB3ENR_DSIEN);\\r
2406                                         UNUSED(tmpreg); \\r
2407                                        } while(0)\r
2408 \r
2409 #define __HAL_RCC_C1_WWDG1_CLK_ENABLE()   do { \\r
2410                                         __IO uint32_t tmpreg; \\r
2411                                         SET_BIT(RCC_C1->APB3ENR, RCC_APB3ENR_WWDG1EN);\\r
2412                                         /* Delay after an RCC peripheral clock enabling */ \\r
2413                                         tmpreg = READ_BIT(RCC_C1->APB3ENR, RCC_APB3ENR_WWDG1EN);\\r
2414                                         UNUSED(tmpreg); \\r
2415                                        } while(0)\r
2416 \r
2417 #define __HAL_RCC_C1_LTDC_CLK_DISABLE()           (RCC_C1->APB3ENR) &= ~ (RCC_APB3ENR_LTDCEN)\r
2418 #define __HAL_RCC_C1_DSI_CLK_DISABLE()            (RCC_C1->APB3ENR) &= ~ (RCC_APB3ENR_DSIEN)\r
2419 #define __HAL_RCC_C1_WWDG1_CLK_DISABLE()          (RCC_C1->APB3ENR) &= ~ (RCC_APB3ENR_WWDG1EN)\r
2420 \r
2421 /** @brief  Enable or disable the APB1 peripheral clock.\r
2422   * @note   After reset, the peripheral clock (used for registers read/write access)\r
2423   *         is disabled and the application software has to enable this clock before\r
2424   *         using it.\r
2425   */\r
2426 \r
2427 #define __HAL_RCC_C1_TIM2_CLK_ENABLE()   do { \\r
2428                                         __IO uint32_t tmpreg; \\r
2429                                         SET_BIT(RCC_C1->APB1LENR, RCC_APB1LENR_TIM2EN);\\r
2430                                         /* Delay after an RCC peripheral clock enabling */ \\r
2431                                         tmpreg = READ_BIT(RCC_C1->APB1LENR, RCC_APB1LENR_TIM2EN);\\r
2432                                         UNUSED(tmpreg); \\r
2433                                        } while(0)\r
2434 \r
2435 #define __HAL_RCC_C1_TIM3_CLK_ENABLE()   do { \\r
2436                                         __IO uint32_t tmpreg; \\r
2437                                         SET_BIT(RCC_C1->APB1LENR, RCC_APB1LENR_TIM3EN);\\r
2438                                         /* Delay after an RCC peripheral clock enabling */ \\r
2439                                         tmpreg = READ_BIT(RCC_C1->APB1LENR, RCC_APB1LENR_TIM3EN);\\r
2440                                         UNUSED(tmpreg); \\r
2441                                        } while(0)\r
2442 \r
2443 #define __HAL_RCC_C1_TIM4_CLK_ENABLE()   do { \\r
2444                                         __IO uint32_t tmpreg; \\r
2445                                         SET_BIT(RCC_C1->APB1LENR, RCC_APB1LENR_TIM4EN);\\r
2446                                         /* Delay after an RCC peripheral clock enabling */ \\r
2447                                         tmpreg = READ_BIT(RCC_C1->APB1LENR, RCC_APB1LENR_TIM4EN);\\r
2448                                         UNUSED(tmpreg); \\r
2449                                        } while(0)\r
2450 \r
2451 #define __HAL_RCC_C1_TIM5_CLK_ENABLE()   do { \\r
2452                                         __IO uint32_t tmpreg; \\r
2453                                         SET_BIT(RCC_C1->APB1LENR, RCC_APB1LENR_TIM5EN);\\r
2454                                         /* Delay after an RCC peripheral clock enabling */ \\r
2455                                         tmpreg = READ_BIT(RCC_C1->APB1LENR, RCC_APB1LENR_TIM5EN);\\r
2456                                         UNUSED(tmpreg); \\r
2457                                        } while(0)\r
2458 \r
2459 #define __HAL_RCC_C1_TIM6_CLK_ENABLE()   do { \\r
2460                                         __IO uint32_t tmpreg; \\r
2461                                         SET_BIT(RCC_C1->APB1LENR, RCC_APB1LENR_TIM6EN);\\r
2462                                         /* Delay after an RCC peripheral clock enabling */ \\r
2463                                         tmpreg = READ_BIT(RCC_C1->APB1LENR, RCC_APB1LENR_TIM6EN);\\r
2464                                         UNUSED(tmpreg); \\r
2465                                        } while(0)\r
2466 \r
2467 #define __HAL_RCC_C1_TIM7_CLK_ENABLE()   do { \\r
2468                                         __IO uint32_t tmpreg; \\r
2469                                         SET_BIT(RCC_C1->APB1LENR, RCC_APB1LENR_TIM7EN);\\r
2470                                         /* Delay after an RCC peripheral clock enabling */ \\r
2471                                         tmpreg = READ_BIT(RCC_C1->APB1LENR, RCC_APB1LENR_TIM7EN);\\r
2472                                         UNUSED(tmpreg); \\r
2473                                        } while(0)\r
2474 \r
2475 #define __HAL_RCC_C1_TIM12_CLK_ENABLE()   do { \\r
2476                                         __IO uint32_t tmpreg; \\r
2477                                         SET_BIT(RCC_C1->APB1LENR, RCC_APB1LENR_TIM12EN);\\r
2478                                         /* Delay after an RCC peripheral clock enabling */ \\r
2479                                         tmpreg = READ_BIT(RCC_C1->APB1LENR, RCC_APB1LENR_TIM12EN);\\r
2480                                         UNUSED(tmpreg); \\r
2481                                        } while(0)\r
2482 \r
2483 #define __HAL_RCC_C1_TIM13_CLK_ENABLE()   do { \\r
2484                                         __IO uint32_t tmpreg; \\r
2485                                         SET_BIT(RCC_C1->APB1LENR, RCC_APB1LENR_TIM13EN);\\r
2486                                         /* Delay after an RCC peripheral clock enabling */ \\r
2487                                         tmpreg = READ_BIT(RCC_C1->APB1LENR, RCC_APB1LENR_TIM13EN);\\r
2488                                         UNUSED(tmpreg); \\r
2489                                        } while(0)\r
2490 \r
2491 #define __HAL_RCC_C1_TIM14_CLK_ENABLE()   do { \\r
2492                                         __IO uint32_t tmpreg; \\r
2493                                         SET_BIT(RCC_C1->APB1LENR, RCC_APB1LENR_TIM14EN);\\r
2494                                         /* Delay after an RCC peripheral clock enabling */ \\r
2495                                         tmpreg = READ_BIT(RCC_C1->APB1LENR, RCC_APB1LENR_TIM14EN);\\r
2496                                         UNUSED(tmpreg); \\r
2497                                        } while(0)\r
2498 \r
2499 #define __HAL_RCC_C1_LPTIM1_CLK_ENABLE()   do { \\r
2500                                         __IO uint32_t tmpreg; \\r
2501                                         SET_BIT(RCC_C1->APB1LENR, RCC_APB1LENR_LPTIM1EN);\\r
2502                                         /* Delay after an RCC peripheral clock enabling */ \\r
2503                                         tmpreg = READ_BIT(RCC_C1->APB1LENR, RCC_APB1LENR_LPTIM1EN);\\r
2504                                         UNUSED(tmpreg); \\r
2505                                        } while(0)\r
2506 \r
2507 #define __HAL_RCC_C1_WWDG2_CLK_ENABLE()   do { \\r
2508                                         __IO uint32_t tmpreg; \\r
2509                                         SET_BIT(RCC_C1->APB1LENR, RCC_APB1LENR_WWDG2EN);\\r
2510                                         /* Delay after an RCC peripheral clock enabling */ \\r
2511                                         tmpreg = READ_BIT(RCC_C1->APB1LENR, RCC_APB1LENR_WWDG2EN);\\r
2512                                         UNUSED(tmpreg); \\r
2513                                        } while(0)\r
2514 \r
2515 #define __HAL_RCC_C1_SPI2_CLK_ENABLE()   do { \\r
2516                                         __IO uint32_t tmpreg; \\r
2517                                         SET_BIT(RCC_C1->APB1LENR, RCC_APB1LENR_SPI2EN);\\r
2518                                         /* Delay after an RCC peripheral clock enabling */ \\r
2519                                         tmpreg = READ_BIT(RCC_C1->APB1LENR, RCC_APB1LENR_SPI2EN);\\r
2520                                         UNUSED(tmpreg); \\r
2521                                        } while(0)\r
2522 \r
2523 #define __HAL_RCC_C1_SPI3_CLK_ENABLE()   do { \\r
2524                                         __IO uint32_t tmpreg; \\r
2525                                         SET_BIT(RCC_C1->APB1LENR, RCC_APB1LENR_SPI3EN);\\r
2526                                         /* Delay after an RCC peripheral clock enabling */ \\r
2527                                         tmpreg = READ_BIT(RCC_C1->APB1LENR, RCC_APB1LENR_SPI3EN);\\r
2528                                         UNUSED(tmpreg); \\r
2529                                        } while(0)\r
2530 \r
2531 #define __HAL_RCC_C1_SPDIFRX_CLK_ENABLE()   do { \\r
2532                                         __IO uint32_t tmpreg; \\r
2533                                         SET_BIT(RCC_C1->APB1LENR, RCC_APB1LENR_SPDIFRXEN);\\r
2534                                         /* Delay after an RCC peripheral clock enabling */ \\r
2535                                         tmpreg = READ_BIT(RCC_C1->APB1LENR, RCC_APB1LENR_SPDIFRXEN);\\r
2536                                         UNUSED(tmpreg); \\r
2537                                        } while(0)\r
2538 \r
2539 #define __HAL_RCC_C1_USART2_CLK_ENABLE()   do { \\r
2540                                         __IO uint32_t tmpreg; \\r
2541                                         SET_BIT(RCC_C1->APB1LENR, RCC_APB1LENR_USART2EN);\\r
2542                                         /* Delay after an RCC peripheral clock enabling */ \\r
2543                                         tmpreg = READ_BIT(RCC_C1->APB1LENR, RCC_APB1LENR_USART2EN);\\r
2544                                         UNUSED(tmpreg); \\r
2545                                        } while(0)\r
2546 \r
2547 #define __HAL_RCC_C1_USART3_CLK_ENABLE()   do { \\r
2548                                         __IO uint32_t tmpreg; \\r
2549                                         SET_BIT(RCC_C1->APB1LENR, RCC_APB1LENR_USART3EN);\\r
2550                                         /* Delay after an RCC peripheral clock enabling */ \\r
2551                                         tmpreg = READ_BIT(RCC_C1->APB1LENR, RCC_APB1LENR_USART3EN);\\r
2552                                         UNUSED(tmpreg); \\r
2553                                        } while(0)\r
2554 \r
2555 #define __HAL_RCC_C1_UART4_CLK_ENABLE()   do { \\r
2556                                         __IO uint32_t tmpreg; \\r
2557                                         SET_BIT(RCC_C1->APB1LENR, RCC_APB1LENR_UART4EN);\\r
2558                                         /* Delay after an RCC peripheral clock enabling */ \\r
2559                                         tmpreg = READ_BIT(RCC_C1->APB1LENR, RCC_APB1LENR_UART4EN);\\r
2560                                         UNUSED(tmpreg); \\r
2561                                        } while(0)\r
2562 \r
2563 #define __HAL_RCC_C1_UART5_CLK_ENABLE()   do { \\r
2564                                         __IO uint32_t tmpreg; \\r
2565                                         SET_BIT(RCC_C1->APB1LENR, RCC_APB1LENR_UART5EN);\\r
2566                                         /* Delay after an RCC peripheral clock enabling */ \\r
2567                                         tmpreg = READ_BIT(RCC_C1->APB1LENR, RCC_APB1LENR_UART5EN);\\r
2568                                         UNUSED(tmpreg); \\r
2569                                        } while(0)\r
2570 \r
2571 #define __HAL_RCC_C1_I2C1_CLK_ENABLE()   do { \\r
2572                                         __IO uint32_t tmpreg; \\r
2573                                         SET_BIT(RCC_C1->APB1LENR, RCC_APB1LENR_I2C1EN);\\r
2574                                         /* Delay after an RCC peripheral clock enabling */ \\r
2575                                         tmpreg = READ_BIT(RCC_C1->APB1LENR, RCC_APB1LENR_I2C1EN);\\r
2576                                         UNUSED(tmpreg); \\r
2577                                        } while(0)\r
2578 \r
2579 #define __HAL_RCC_C1_I2C2_CLK_ENABLE()   do { \\r
2580                                         __IO uint32_t tmpreg; \\r
2581                                         SET_BIT(RCC_C1->APB1LENR, RCC_APB1LENR_I2C2EN);\\r
2582                                         /* Delay after an RCC peripheral clock enabling */ \\r
2583                                         tmpreg = READ_BIT(RCC_C1->APB1LENR, RCC_APB1LENR_I2C2EN);\\r
2584                                         UNUSED(tmpreg); \\r
2585                                        } while(0)\r
2586 \r
2587 #define __HAL_RCC_C1_I2C3_CLK_ENABLE()   do { \\r
2588                                         __IO uint32_t tmpreg; \\r
2589                                         SET_BIT(RCC_C1->APB1LENR, RCC_APB1LENR_I2C3EN);\\r
2590                                         /* Delay after an RCC peripheral clock enabling */ \\r
2591                                         tmpreg = READ_BIT(RCC_C1->APB1LENR, RCC_APB1LENR_I2C3EN);\\r
2592                                         UNUSED(tmpreg); \\r
2593                                        } while(0)\r
2594 \r
2595 #define __HAL_RCC_C1_CEC_CLK_ENABLE()   do { \\r
2596                                         __IO uint32_t tmpreg; \\r
2597                                         SET_BIT(RCC_C1->APB1LENR, RCC_APB1LENR_CECEN);\\r
2598                                         /* Delay after an RCC peripheral clock enabling */ \\r
2599                                         tmpreg = READ_BIT(RCC_C1->APB1LENR, RCC_APB1LENR_CECEN);\\r
2600                                         UNUSED(tmpreg); \\r
2601                                        } while(0)\r
2602 \r
2603 #define __HAL_RCC_C1_DAC12_CLK_ENABLE()   do { \\r
2604                                         __IO uint32_t tmpreg; \\r
2605                                         SET_BIT(RCC_C1->APB1LENR, RCC_APB1LENR_DAC12EN);\\r
2606                                         /* Delay after an RCC peripheral clock enabling */ \\r
2607                                         tmpreg = READ_BIT(RCC_C1->APB1LENR, RCC_APB1LENR_DAC12EN);\\r
2608                                         UNUSED(tmpreg); \\r
2609                                        } while(0)\r
2610 \r
2611 #define __HAL_RCC_C1_UART7_CLK_ENABLE()   do { \\r
2612                                         __IO uint32_t tmpreg; \\r
2613                                         SET_BIT(RCC_C1->APB1LENR, RCC_APB1LENR_UART7EN);\\r
2614                                         /* Delay after an RCC peripheral clock enabling */ \\r
2615                                         tmpreg = READ_BIT(RCC_C1->APB1LENR, RCC_APB1LENR_UART7EN);\\r
2616                                         UNUSED(tmpreg); \\r
2617                                        } while(0)\r
2618 \r
2619 #define __HAL_RCC_C1_UART8_CLK_ENABLE()   do { \\r
2620                                         __IO uint32_t tmpreg; \\r
2621                                         SET_BIT(RCC_C1->APB1LENR, RCC_APB1LENR_UART8EN);\\r
2622                                         /* Delay after an RCC peripheral clock enabling */ \\r
2623                                         tmpreg = READ_BIT(RCC_C1->APB1LENR, RCC_APB1LENR_UART8EN);\\r
2624                                         UNUSED(tmpreg); \\r
2625                                        } while(0)\r
2626 \r
2627 #define __HAL_RCC_C1_CRS_CLK_ENABLE()   do { \\r
2628                                         __IO uint32_t tmpreg; \\r
2629                                         SET_BIT(RCC_C1->APB1HENR, RCC_APB1HENR_CRSEN);\\r
2630                                         /* Delay after an RCC peripheral clock enabling */ \\r
2631                                         tmpreg = READ_BIT(RCC_C1->APB1HENR, RCC_APB1HENR_CRSEN);\\r
2632                                         UNUSED(tmpreg); \\r
2633                                        } while(0)\r
2634 \r
2635 #define __HAL_RCC_C1_SWPMI_CLK_ENABLE()   do { \\r
2636                                         __IO uint32_t tmpreg; \\r
2637                                         SET_BIT(RCC_C1->APB1HENR, RCC_APB1HENR_SWPMIEN);\\r
2638                                         /* Delay after an RCC peripheral clock enabling */ \\r
2639                                         tmpreg = READ_BIT(RCC_C1->APB1HENR, RCC_APB1HENR_SWPMIEN);\\r
2640                                         UNUSED(tmpreg); \\r
2641                                        } while(0)\r
2642 \r
2643 #define __HAL_RCC_C1_OPAMP_CLK_ENABLE()   do { \\r
2644                                         __IO uint32_t tmpreg; \\r
2645                                         SET_BIT(RCC_C1->APB1HENR, RCC_APB1HENR_OPAMPEN);\\r
2646                                         /* Delay after an RCC peripheral clock enabling */ \\r
2647                                         tmpreg = READ_BIT(RCC_C1->APB1HENR, RCC_APB1HENR_OPAMPEN);\\r
2648                                         UNUSED(tmpreg); \\r
2649                                        } while(0)\r
2650 \r
2651 #define __HAL_RCC_C1_MDIOS_CLK_ENABLE()   do { \\r
2652                                         __IO uint32_t tmpreg; \\r
2653                                         SET_BIT(RCC_C1->APB1HENR, RCC_APB1HENR_MDIOSEN);\\r
2654                                         /* Delay after an RCC peripheral clock enabling */ \\r
2655                                         tmpreg = READ_BIT(RCC_C1->APB1HENR, RCC_APB1HENR_MDIOSEN);\\r
2656                                         UNUSED(tmpreg); \\r
2657                                        } while(0)\r
2658 \r
2659 #define __HAL_RCC_C1_FDCAN_CLK_ENABLE()   do { \\r
2660                                         __IO uint32_t tmpreg; \\r
2661                                         SET_BIT(RCC_C1->APB1HENR, RCC_APB1HENR_FDCANEN);\\r
2662                                         /* Delay after an RCC peripheral clock enabling */ \\r
2663                                         tmpreg = READ_BIT(RCC_C1->APB1HENR, RCC_APB1HENR_FDCANEN);\\r
2664                                         UNUSED(tmpreg); \\r
2665                                        } while(0)\r
2666 \r
2667 \r
2668 #define __HAL_RCC_C1_TIM2_CLK_DISABLE()           (RCC_C1->APB1LENR) &= ~ (RCC_APB1LENR_TIM2EN)\r
2669 #define __HAL_RCC_C1_TIM3_CLK_DISABLE()           (RCC_C1->APB1LENR) &= ~ (RCC_APB1LENR_TIM3EN)\r
2670 #define __HAL_RCC_C1_TIM4_CLK_DISABLE()           (RCC_C1->APB1LENR) &= ~ (RCC_APB1LENR_TIM4EN)\r
2671 #define __HAL_RCC_C1_TIM5_CLK_DISABLE()           (RCC_C1->APB1LENR) &= ~ (RCC_APB1LENR_TIM5EN)\r
2672 #define __HAL_RCC_C1_TIM6_CLK_DISABLE()           (RCC_C1->APB1LENR) &= ~ (RCC_APB1LENR_TIM6EN)\r
2673 #define __HAL_RCC_C1_TIM7_CLK_DISABLE()           (RCC_C1->APB1LENR) &= ~ (RCC_APB1LENR_TIM7EN)\r
2674 #define __HAL_RCC_C1_TIM12_CLK_DISABLE()          (RCC_C1->APB1LENR) &= ~ (RCC_APB1LENR_TIM12EN)\r
2675 #define __HAL_RCC_C1_TIM13_CLK_DISABLE()          (RCC_C1->APB1LENR) &= ~ (RCC_APB1LENR_TIM13EN)\r
2676 #define __HAL_RCC_C1_TIM14_CLK_DISABLE()          (RCC_C1->APB1LENR) &= ~ (RCC_APB1LENR_TIM14EN)\r
2677 #define __HAL_RCC_C1_LPTIM1_CLK_DISABLE()         (RCC_C1->APB1LENR) &= ~ (RCC_APB1LENR_LPTIM1EN)\r
2678 #define __HAL_RCC_C1_WWDG2_CLK_DISABLE()          (RCC_C1->APB1LENR) &= ~ (RCC_APB1LENR_WWDG2EN)\r
2679 #define __HAL_RCC_C1_SPI2_CLK_DISABLE()           (RCC_C1->APB1LENR) &= ~ (RCC_APB1LENR_SPI2EN)\r
2680 #define __HAL_RCC_C1_SPI3_CLK_DISABLE()           (RCC_C1->APB1LENR) &= ~ (RCC_APB1LENR_SPI3EN)\r
2681 #define __HAL_RCC_C1_SPDIFRX_CLK_DISABLE()        (RCC_C1->APB1LENR) &= ~ (RCC_APB1LENR_SPDIFRXEN)\r
2682 #define __HAL_RCC_C1_USART2_CLK_DISABLE()         (RCC_C1->APB1LENR) &= ~ (RCC_APB1LENR_USART2EN)\r
2683 #define __HAL_RCC_C1_USART3_CLK_DISABLE()         (RCC_C1->APB1LENR) &= ~ (RCC_APB1LENR_USART3EN)\r
2684 #define __HAL_RCC_C1_UART4_CLK_DISABLE()          (RCC_C1->APB1LENR) &= ~ (RCC_APB1LENR_UART4EN)\r
2685 #define __HAL_RCC_C1_UART5_CLK_DISABLE()          (RCC_C1->APB1LENR) &= ~ (RCC_APB1LENR_UART5EN)\r
2686 #define __HAL_RCC_C1_I2C1_CLK_DISABLE()           (RCC_C1->APB1LENR) &= ~ (RCC_APB1LENR_I2C1EN)\r
2687 #define __HAL_RCC_C1_I2C2_CLK_DISABLE()           (RCC_C1->APB1LENR) &= ~ (RCC_APB1LENR_I2C2EN)\r
2688 #define __HAL_RCC_C1_I2C3_CLK_DISABLE()           (RCC_C1->APB1LENR) &= ~ (RCC_APB1LENR_I2C3EN)\r
2689 #define __HAL_RCC_C1_CEC_CLK_DISABLE()            (RCC_C1->APB1LENR) &= ~ (RCC_APB1LENR_CECEN)\r
2690 #define __HAL_RCC_C1_DAC12_CLK_DISABLE()          (RCC_C1->APB1LENR) &= ~ (RCC_APB1LENR_DAC12EN)\r
2691 #define __HAL_RCC_C1_UART7_CLK_DISABLE()         (RCC_C1->APB1LENR) &= ~ (RCC_APB1LENR_UART7EN)\r
2692 #define __HAL_RCC_C1_UART8_CLK_DISABLE()         (RCC_C1->APB1LENR) &= ~ (RCC_APB1LENR_UART8EN)\r
2693 #define __HAL_RCC_C1_CRS_CLK_DISABLE()            (RCC_C1->APB1HENR) &= ~ (RCC_APB1HENR_CRSEN)\r
2694 #define __HAL_RCC_C1_SWPMI_CLK_DISABLE()          (RCC_C1->APB1HENR) &= ~ (RCC_APB1HENR_SWPMIEN)\r
2695 #define __HAL_RCC_C1_OPAMP_CLK_DISABLE()          (RCC_C1->APB1HENR) &= ~ (RCC_APB1HENR_OPAMPEN)\r
2696 #define __HAL_RCC_C1_MDIOS_CLK_DISABLE()          (RCC_C1->APB1HENR) &= ~ (RCC_APB1HENR_MDIOSEN)\r
2697 #define __HAL_RCC_C1_FDCAN_CLK_DISABLE()          (RCC_C1->APB1HENR) &= ~ (RCC_APB1HENR_FDCANEN)\r
2698 \r
2699 /** @brief  Enable or disable the APB2 peripheral clock.\r
2700   * @note   After reset, the peripheral clock (used for registers read/write access)\r
2701   *         is disabled and the application software has to enable this clock before\r
2702   *         using it.\r
2703   */\r
2704 \r
2705 #define __HAL_RCC_C1_TIM1_CLK_ENABLE()   do { \\r
2706                                         __IO uint32_t tmpreg; \\r
2707                                         SET_BIT(RCC_C1->APB2ENR, RCC_APB2ENR_TIM1EN);\\r
2708                                         /* Delay after an RCC peripheral clock enabling */ \\r
2709                                         tmpreg = READ_BIT(RCC_C1->APB2ENR, RCC_APB2ENR_TIM1EN);\\r
2710                                         UNUSED(tmpreg); \\r
2711                                        } while(0)\r
2712 \r
2713 #define __HAL_RCC_C1_TIM8_CLK_ENABLE()   do { \\r
2714                                         __IO uint32_t tmpreg; \\r
2715                                         SET_BIT(RCC_C1->APB2ENR, RCC_APB2ENR_TIM8EN);\\r
2716                                         /* Delay after an RCC peripheral clock enabling */ \\r
2717                                         tmpreg = READ_BIT(RCC_C1->APB2ENR, RCC_APB2ENR_TIM8EN);\\r
2718                                         UNUSED(tmpreg); \\r
2719                                        } while(0)\r
2720 \r
2721 #define __HAL_RCC_C1_USART1_CLK_ENABLE()   do { \\r
2722                                         __IO uint32_t tmpreg; \\r
2723                                         SET_BIT(RCC_C1->APB2ENR, RCC_APB2ENR_USART1EN);\\r
2724                                         /* Delay after an RCC peripheral clock enabling */ \\r
2725                                         tmpreg = READ_BIT(RCC_C1->APB2ENR, RCC_APB2ENR_USART1EN);\\r
2726                                         UNUSED(tmpreg); \\r
2727                                        } while(0)\r
2728 \r
2729 #define __HAL_RCC_C1_USART6_CLK_ENABLE()   do { \\r
2730                                         __IO uint32_t tmpreg; \\r
2731                                         SET_BIT(RCC_C1->APB2ENR, RCC_APB2ENR_USART6EN);\\r
2732                                         /* Delay after an RCC peripheral clock enabling */ \\r
2733                                         tmpreg = READ_BIT(RCC_C1->APB2ENR, RCC_APB2ENR_USART6EN);\\r
2734                                         UNUSED(tmpreg); \\r
2735                                        } while(0)\r
2736 \r
2737 #define __HAL_RCC_C1_SPI1_CLK_ENABLE()   do { \\r
2738                                         __IO uint32_t tmpreg; \\r
2739                                         SET_BIT(RCC_C1->APB2ENR, RCC_APB2ENR_SPI1EN);\\r
2740                                         /* Delay after an RCC peripheral clock enabling */ \\r
2741                                         tmpreg = READ_BIT(RCC_C1->APB2ENR, RCC_APB2ENR_SPI1EN);\\r
2742                                         UNUSED(tmpreg); \\r
2743                                        } while(0)\r
2744 \r
2745 #define __HAL_RCC_C1_SPI4_CLK_ENABLE()   do { \\r
2746                                         __IO uint32_t tmpreg; \\r
2747                                         SET_BIT(RCC_C1->APB2ENR, RCC_APB2ENR_SPI4EN);\\r
2748                                         /* Delay after an RCC peripheral clock enabling */ \\r
2749                                         tmpreg = READ_BIT(RCC_C1->APB2ENR, RCC_APB2ENR_SPI4EN);\\r
2750                                         UNUSED(tmpreg); \\r
2751                                        } while(0)\r
2752 \r
2753 #define __HAL_RCC_C1_TIM15_CLK_ENABLE()   do { \\r
2754                                         __IO uint32_t tmpreg; \\r
2755                                         SET_BIT(RCC_C1->APB2ENR, RCC_APB2ENR_TIM15EN);\\r
2756                                         /* Delay after an RCC peripheral clock enabling */ \\r
2757                                         tmpreg = READ_BIT(RCC_C1->APB2ENR, RCC_APB2ENR_TIM15EN);\\r
2758                                         UNUSED(tmpreg); \\r
2759                                        } while(0)\r
2760 \r
2761 #define __HAL_RCC_C1_TIM16_CLK_ENABLE()   do { \\r
2762                                         __IO uint32_t tmpreg; \\r
2763                                         SET_BIT(RCC_C1->APB2ENR, RCC_APB2ENR_TIM16EN);\\r
2764                                         /* Delay after an RCC peripheral clock enabling */ \\r
2765                                         tmpreg = READ_BIT(RCC_C1->APB2ENR, RCC_APB2ENR_TIM16EN);\\r
2766                                         UNUSED(tmpreg); \\r
2767                                        } while(0)\r
2768 \r
2769 #define __HAL_RCC_C1_TIM17_CLK_ENABLE()   do { \\r
2770                                         __IO uint32_t tmpreg; \\r
2771                                         SET_BIT(RCC_C1->APB2ENR, RCC_APB2ENR_TIM17EN);\\r
2772                                         /* Delay after an RCC peripheral clock enabling */ \\r
2773                                         tmpreg = READ_BIT(RCC_C1->APB2ENR, RCC_APB2ENR_TIM17EN);\\r
2774                                         UNUSED(tmpreg); \\r
2775                                        } while(0)\r
2776 \r
2777 #define __HAL_RCC_C1_SPI5_CLK_ENABLE()   do { \\r
2778                                         __IO uint32_t tmpreg; \\r
2779                                         SET_BIT(RCC_C1->APB2ENR, RCC_APB2ENR_SPI5EN);\\r
2780                                         /* Delay after an RCC peripheral clock enabling */ \\r
2781                                         tmpreg = READ_BIT(RCC_C1->APB2ENR, RCC_APB2ENR_SPI5EN);\\r
2782                                         UNUSED(tmpreg); \\r
2783                                        } while(0)\r
2784 \r
2785 #define __HAL_RCC_C1_SAI1_CLK_ENABLE()   do { \\r
2786                                         __IO uint32_t tmpreg; \\r
2787                                         SET_BIT(RCC_C1->APB2ENR, RCC_APB2ENR_SAI1EN);\\r
2788                                         /* Delay after an RCC peripheral clock enabling */ \\r
2789                                         tmpreg = READ_BIT(RCC_C1->APB2ENR, RCC_APB2ENR_SAI1EN);\\r
2790                                         UNUSED(tmpreg); \\r
2791                                        } while(0)\r
2792 \r
2793 #define __HAL_RCC_C1_SAI2_CLK_ENABLE()   do { \\r
2794                                         __IO uint32_t tmpreg; \\r
2795                                         SET_BIT(RCC_C1->APB2ENR, RCC_APB2ENR_SAI2EN);\\r
2796                                         /* Delay after an RCC peripheral clock enabling */ \\r
2797                                         tmpreg = READ_BIT(RCC_C1->APB2ENR, RCC_APB2ENR_SAI2EN);\\r
2798                                         UNUSED(tmpreg); \\r
2799                                        } while(0)\r
2800 \r
2801 #define __HAL_RCC_C1_SAI3_CLK_ENABLE()   do { \\r
2802                                         __IO uint32_t tmpreg; \\r
2803                                         SET_BIT(RCC_C1->APB2ENR, RCC_APB2ENR_SAI3EN);\\r
2804                                         /* Delay after an RCC peripheral clock enabling */ \\r
2805                                         tmpreg = READ_BIT(RCC_C1->APB2ENR, RCC_APB2ENR_SAI3EN);\\r
2806                                         UNUSED(tmpreg); \\r
2807                                        } while(0)\r
2808 \r
2809 #define __HAL_RCC_C1_DFSDM1_CLK_ENABLE()   do { \\r
2810                                         __IO uint32_t tmpreg; \\r
2811                                         SET_BIT(RCC_C1->APB2ENR, RCC_APB2ENR_DFSDM1EN);\\r
2812                                         /* Delay after an RCC peripheral clock enabling */ \\r
2813                                         tmpreg = READ_BIT(RCC_C1->APB2ENR, RCC_APB2ENR_DFSDM1EN);\\r
2814                                         UNUSED(tmpreg); \\r
2815                                        } while(0)\r
2816 \r
2817 #define __HAL_RCC_C1_HRTIM1_CLK_ENABLE()   do { \\r
2818                                         __IO uint32_t tmpreg; \\r
2819                                         SET_BIT(RCC_C1->APB2ENR, RCC_APB2ENR_HRTIMEN);\\r
2820                                         /* Delay after an RCC peripheral clock enabling */ \\r
2821                                         tmpreg = READ_BIT(RCC_C1->APB2ENR, RCC_APB2ENR_HRTIMEN);\\r
2822                                         UNUSED(tmpreg); \\r
2823                                        } while(0)\r
2824 \r
2825 #define __HAL_RCC_C1_TIM1_CLK_DISABLE()           (RCC_C1->APB2ENR) &= ~ (RCC_APB2ENR_TIM1EN)\r
2826 #define __HAL_RCC_C1_TIM8_CLK_DISABLE()           (RCC_C1->APB2ENR) &= ~ (RCC_APB2ENR_TIM8EN)\r
2827 #define __HAL_RCC_C1_USART1_CLK_DISABLE()         (RCC_C1->APB2ENR) &= ~ (RCC_APB2ENR_USART1EN)\r
2828 #define __HAL_RCC_C1_USART6_CLK_DISABLE()         (RCC_C1->APB2ENR) &= ~ (RCC_APB2ENR_USART6EN)\r
2829 #define __HAL_RCC_C1_SPI1_CLK_DISABLE()           (RCC_C1->APB2ENR) &= ~ (RCC_APB2ENR_SPI1EN)\r
2830 #define __HAL_RCC_C1_SPI4_CLK_DISABLE()           (RCC_C1->APB2ENR) &= ~ (RCC_APB2ENR_SPI4EN)\r
2831 #define __HAL_RCC_C1_TIM15_CLK_DISABLE()          (RCC_C1->APB2ENR) &= ~ (RCC_APB2ENR_TIM15EN)\r
2832 #define __HAL_RCC_C1_TIM16_CLK_DISABLE()          (RCC_C1->APB2ENR) &= ~ (RCC_APB2ENR_TIM16EN)\r
2833 #define __HAL_RCC_C1_TIM17_CLK_DISABLE()          (RCC_C1->APB2ENR) &= ~ (RCC_APB2ENR_TIM17EN)\r
2834 #define __HAL_RCC_C1_SPI5_CLK_DISABLE()           (RCC_C1->APB2ENR) &= ~ (RCC_APB2ENR_SPI5EN)\r
2835 #define __HAL_RCC_C1_SAI1_CLK_DISABLE()           (RCC_C1->APB2ENR) &= ~ (RCC_APB2ENR_SAI1EN)\r
2836 #define __HAL_RCC_C1_SAI2_CLK_DISABLE()           (RCC_C1->APB2ENR) &= ~ (RCC_APB2ENR_SAI2EN)\r
2837 #define __HAL_RCC_C1_SAI3_CLK_DISABLE()           (RCC_C1->APB2ENR) &= ~ (RCC_APB2ENR_SAI3EN)\r
2838 #define __HAL_RCC_C1_DFSDM1_CLK_DISABLE()         (RCC_C1->APB2ENR) &= ~ (RCC_APB2ENR_DFSDM1EN)\r
2839 #define __HAL_RCC_C1_HRTIM1_CLK_DISABLE()         (RCC_C1->APB2ENR) &= ~ (RCC_APB2ENR_HRTIMEN)\r
2840 \r
2841 /** @brief  Enable or disable the APB4 peripheral clock.\r
2842   * @note   After reset, the peripheral clock (used for registers read/write access)\r
2843   *         is disabled and the application software has to enable this clock before\r
2844   *         using it.\r
2845   */\r
2846 \r
2847 #define __HAL_RCC_C1_SYSCFG_CLK_ENABLE()   do { \\r
2848                                         __IO uint32_t tmpreg; \\r
2849                                         SET_BIT(RCC_C1->APB4ENR, RCC_APB4ENR_SYSCFGEN);\\r
2850                                         /* Delay after an RCC peripheral clock enabling */ \\r
2851                                         tmpreg = READ_BIT(RCC_C1->APB4ENR, RCC_APB4ENR_SYSCFGEN);\\r
2852                                         UNUSED(tmpreg); \\r
2853                                        } while(0)\r
2854 \r
2855 #define __HAL_RCC_C1_LPUART1_CLK_ENABLE()   do { \\r
2856                                         __IO uint32_t tmpreg; \\r
2857                                         SET_BIT(RCC_C1->APB4ENR, RCC_APB4ENR_LPUART1EN);\\r
2858                                         /* Delay after an RCC peripheral clock enabling */ \\r
2859                                         tmpreg = READ_BIT(RCC_C1->APB4ENR, RCC_APB4ENR_LPUART1EN);\\r
2860                                         UNUSED(tmpreg); \\r
2861                                        } while(0)\r
2862 \r
2863 #define __HAL_RCC_C1_SPI6_CLK_ENABLE()   do { \\r
2864                                         __IO uint32_t tmpreg; \\r
2865                                         SET_BIT(RCC_C1->APB4ENR, RCC_APB4ENR_SPI6EN);\\r
2866                                         /* Delay after an RCC peripheral clock enabling */ \\r
2867                                         tmpreg = READ_BIT(RCC_C1->APB4ENR, RCC_APB4ENR_SPI6EN);\\r
2868                                         UNUSED(tmpreg); \\r
2869                                        } while(0)\r
2870 \r
2871 #define __HAL_RCC_C1_I2C4_CLK_ENABLE()   do { \\r
2872                                         __IO uint32_t tmpreg; \\r
2873                                         SET_BIT(RCC_C1->APB4ENR, RCC_APB4ENR_I2C4EN);\\r
2874                                         /* Delay after an RCC peripheral clock enabling */ \\r
2875                                         tmpreg = READ_BIT(RCC_C1->APB4ENR, RCC_APB4ENR_I2C4EN);\\r
2876                                         UNUSED(tmpreg); \\r
2877                                        } while(0)\r
2878 \r
2879 #define __HAL_RCC_C1_LPTIM2_CLK_ENABLE()   do { \\r
2880                                         __IO uint32_t tmpreg; \\r
2881                                         SET_BIT(RCC_C1->APB4ENR, RCC_APB4ENR_LPTIM2EN);\\r
2882                                         /* Delay after an RCC peripheral clock enabling */ \\r
2883                                         tmpreg = READ_BIT(RCC_C1->APB4ENR, RCC_APB4ENR_LPTIM2EN);\\r
2884                                         UNUSED(tmpreg); \\r
2885                                        } while(0)\r
2886 \r
2887 #define __HAL_RCC_C1_LPTIM3_CLK_ENABLE()   do { \\r
2888                                         __IO uint32_t tmpreg; \\r
2889                                         SET_BIT(RCC_C1->APB4ENR, RCC_APB4ENR_LPTIM3EN);\\r
2890                                         /* Delay after an RCC peripheral clock enabling */ \\r
2891                                         tmpreg = READ_BIT(RCC_C1->APB4ENR, RCC_APB4ENR_LPTIM3EN);\\r
2892                                         UNUSED(tmpreg); \\r
2893                                        } while(0)\r
2894 \r
2895 #define __HAL_RCC_C1_LPTIM4_CLK_ENABLE()   do { \\r
2896                                         __IO uint32_t tmpreg; \\r
2897                                         SET_BIT(RCC_C1->APB4ENR, RCC_APB4ENR_LPTIM4EN);\\r
2898                                         /* Delay after an RCC peripheral clock enabling */ \\r
2899                                         tmpreg = READ_BIT(RCC_C1->APB4ENR, RCC_APB4ENR_LPTIM4EN);\\r
2900                                         UNUSED(tmpreg); \\r
2901                                        } while(0)\r
2902 \r
2903 #define __HAL_RCC_C1_LPTIM5_CLK_ENABLE()   do { \\r
2904                                         __IO uint32_t tmpreg; \\r
2905                                         SET_BIT(RCC_C1->APB4ENR, RCC_APB4ENR_LPTIM5EN);\\r
2906                                         /* Delay after an RCC peripheral clock enabling */ \\r
2907                                         tmpreg = READ_BIT(RCC_C1->APB4ENR, RCC_APB4ENR_LPTIM5EN);\\r
2908                                         UNUSED(tmpreg); \\r
2909                                        } while(0)\r
2910 \r
2911 #define __HAL_RCC_C1_COMP12_CLK_ENABLE()   do { \\r
2912                                         __IO uint32_t tmpreg; \\r
2913                                         SET_BIT(RCC_C1->APB4ENR, RCC_APB4ENR_COMP12EN);\\r
2914                                         /* Delay after an RCC peripheral clock enabling */ \\r
2915                                         tmpreg = READ_BIT(RCC_C1->APB4ENR, RCC_APB4ENR_COMP12EN);\\r
2916                                         UNUSED(tmpreg); \\r
2917                                        } while(0)\r
2918 \r
2919 \r
2920 #define __HAL_RCC_C1_VREF_CLK_ENABLE()   do { \\r
2921                                         __IO uint32_t tmpreg; \\r
2922                                         SET_BIT(RCC_C1->APB4ENR, RCC_APB4ENR_VREFEN);\\r
2923                                         /* Delay after an RCC peripheral clock enabling */ \\r
2924                                         tmpreg = READ_BIT(RCC_C1->APB4ENR, RCC_APB4ENR_VREFEN);\\r
2925                                         UNUSED(tmpreg); \\r
2926                                        } while(0)\r
2927 \r
2928 #define __HAL_RCC_C1_RTC_CLK_ENABLE()   do { \\r
2929                                         __IO uint32_t tmpreg; \\r
2930                                         SET_BIT(RCC_C1->APB4ENR, RCC_APB4ENR_RTCAPBEN);\\r
2931                                         /* Delay after an RCC peripheral clock enabling */ \\r
2932                                         tmpreg = READ_BIT(RCC_C1->APB4ENR, RCC_APB4ENR_RTCAPBEN);\\r
2933                                         UNUSED(tmpreg); \\r
2934                                        } while(0)\r
2935 \r
2936 #define __HAL_RCC_C1_SAI4_CLK_ENABLE()   do { \\r
2937                                         __IO uint32_t tmpreg; \\r
2938                                         SET_BIT(RCC_C1->APB4ENR, RCC_APB4ENR_SAI4EN);\\r
2939                                         /* Delay after an RCC peripheral clock enabling */ \\r
2940                                         tmpreg = READ_BIT(RCC_C1->APB4ENR, RCC_APB4ENR_SAI4EN);\\r
2941                                         UNUSED(tmpreg); \\r
2942                                        } while(0)\r
2943 \r
2944 \r
2945 #define __HAL_RCC_C1_SYSCFG_CLK_DISABLE()           (RCC_C1->APB4ENR) &= ~ (RCC_APB4ENR_SYSCFGEN)\r
2946 #define __HAL_RCC_C1_LPUART1_CLK_DISABLE()          (RCC_C1->APB4ENR) &= ~ (RCC_APB4ENR_LPUART1EN)\r
2947 #define __HAL_RCC_C1_SPI6_CLK_DISABLE()             (RCC_C1->APB4ENR) &= ~ (RCC_APB4ENR_SPI6EN)\r
2948 #define __HAL_RCC_C1_I2C4_CLK_DISABLE()             (RCC_C1->APB4ENR) &= ~ (RCC_APB4ENR_I2C4EN)\r
2949 #define __HAL_RCC_C1_LPTIM2_CLK_DISABLE()           (RCC_C1->APB4ENR) &= ~ (RCC_APB4ENR_LPTIM2EN)\r
2950 #define __HAL_RCC_C1_LPTIM3_CLK_DISABLE()           (RCC_C1->APB4ENR) &= ~ (RCC_APB4ENR_LPTIM3EN)\r
2951 #define __HAL_RCC_C1_LPTIM4_CLK_DISABLE()           (RCC_C1->APB4ENR) &= ~ (RCC_APB4ENR_LPTIM4EN)\r
2952 #define __HAL_RCC_C1_LPTIM5_CLK_DISABLE()           (RCC_C1->APB4ENR) &= ~ (RCC_APB4ENR_LPTIM5EN)\r
2953 #define __HAL_RCC_C1_COMP12_CLK_DISABLE()           (RCC_C1->APB4ENR) &= ~ (RCC_APB4ENR_COMP12EN)\r
2954 #define __HAL_RCC_C1_VREF_CLK_DISABLE()             (RCC_C1->APB4ENR) &= ~ (RCC_APB4ENR_VREFEN)\r
2955 #define __HAL_RCC_C1_RTC_CLK_DISABLE()              (RCC_C1->APB4ENR) &= ~ (RCC_APB4ENR_RTCAPBEN)\r
2956 #define __HAL_RCC_C1_SAI4_CLK_DISABLE()             (RCC_C1->APB4ENR) &= ~ (RCC_APB4ENR_SAI4EN)\r
2957 \r
2958 /* Exported macros for RCC_C2 -------------------------------------------------*/\r
2959 \r
2960 /** @brief  Enable or disable the AHB3 peripheral clock.\r
2961   * @note   After reset, the peripheral clock (used for registers read/write access)\r
2962   *         is disabled and the application software has to enable this clock before\r
2963   *         using it.\r
2964   */\r
2965 \r
2966 \r
2967 #define __HAL_RCC_C2_MDMA_CLK_ENABLE()   do { \\r
2968                                         __IO uint32_t tmpreg; \\r
2969                                         SET_BIT(RCC_C2->AHB3ENR, RCC_AHB3ENR_MDMAEN);\\r
2970                                         /* Delay after an RCC peripheral clock enabling */ \\r
2971                                         tmpreg = READ_BIT(RCC_C2->AHB3ENR, RCC_AHB3ENR_MDMAEN);\\r
2972                                         UNUSED(tmpreg); \\r
2973                                        } while(0)\r
2974 \r
2975 #define __HAL_RCC_C2_DMA2D_CLK_ENABLE()   do { \\r
2976                                         __IO uint32_t tmpreg; \\r
2977                                         SET_BIT(RCC_C2->AHB3ENR, RCC_AHB3ENR_DMA2DEN);\\r
2978                                         /* Delay after an RCC peripheral clock enabling */ \\r
2979                                         tmpreg = READ_BIT(RCC_C2->AHB3ENR, RCC_AHB3ENR_DMA2DEN);\\r
2980                                         UNUSED(tmpreg); \\r
2981                                        } while(0)\r
2982 \r
2983 #define __HAL_RCC_C2_JPGDECEN_CLK_ENABLE()   do { \\r
2984                                         __IO uint32_t tmpreg; \\r
2985                                         SET_BIT(RCC_C2->AHB3ENR, RCC_AHB3ENR_JPGDECEN);\\r
2986                                         /* Delay after an RCC peripheral clock enabling */ \\r
2987                                         tmpreg = READ_BIT(RCC_C2->AHB3ENR, RCC_AHB3ENR_JPGDECEN);\\r
2988                                         UNUSED(tmpreg); \\r
2989                                        } while(0)\r
2990 \r
2991 #define __HAL_RCC_FLASH_C2_ALLOCATE()   do { \\r
2992                                         __IO uint32_t tmpreg; \\r
2993                                         SET_BIT(RCC_C2->AHB3ENR, RCC_AHB3ENR_FLASHEN);\\r
2994                                         /* Delay after an RCC peripheral clock enabling */ \\r
2995                                         tmpreg = READ_BIT(RCC_C2->AHB3ENR, RCC_AHB3ENR_FLASHEN);\\r
2996                                         UNUSED(tmpreg); \\r
2997                                        } while(0)\r
2998 \r
2999 #define __HAL_RCC_DTCM1_C2_ALLOCATE()   do { \\r
3000                                         __IO uint32_t tmpreg; \\r
3001                                         SET_BIT(RCC_C2->AHB3ENR, RCC_AHB3ENR_DTCM1EN);\\r
3002                                         /* Delay after an RCC peripheral clock enabling */ \\r
3003                                         tmpreg = READ_BIT(RCC_C2->AHB3ENR, RCC_AHB3ENR_DTCM1EN);\\r
3004                                         UNUSED(tmpreg); \\r
3005                                        } while(0)\r
3006 \r
3007 #define __HAL_RCC_DTCM2_C2_ALLOCATE()   do { \\r
3008                                         __IO uint32_t tmpreg; \\r
3009                                         SET_BIT(RCC_C2->AHB3ENR, RCC_AHB3ENR_DTCM2EN);\\r
3010                                         /* Delay after an RCC peripheral clock enabling */ \\r
3011                                         tmpreg = READ_BIT(RCC_C2->AHB3ENR, RCC_AHB3ENR_DTCM2EN);\\r
3012                                         UNUSED(tmpreg); \\r
3013                                        } while(0)\r
3014 \r
3015 #define __HAL_RCC_ITCM_C2_ALLOCATE()   do { \\r
3016                                         __IO uint32_t tmpreg; \\r
3017                                         SET_BIT(RCC_C2->AHB3ENR, RCC_AHB3ENR_ITCMEN);\\r
3018                                         /* Delay after an RCC peripheral clock enabling */ \\r
3019                                         tmpreg = READ_BIT(RCC_C2->AHB3ENR, RCC_AHB3ENR_ITCMEN);\\r
3020                                         UNUSED(tmpreg); \\r
3021                                        } while(0)\r
3022 \r
3023 #define __HAL_RCC_D1SRAM1_C2_ALLOCATE()   do { \\r
3024                                         __IO uint32_t tmpreg; \\r
3025                                         SET_BIT(RCC_C2->AHB3ENR, RCC_AHB3ENR_AXISRAMEN);\\r
3026                                         /* Delay after an RCC peripheral clock enabling */ \\r
3027                                         tmpreg = READ_BIT(RCC_C2->AHB3ENR, RCC_AHB3ENR_AXISRAMEN);\\r
3028                                         UNUSED(tmpreg); \\r
3029                                        } while(0)\r
3030 \r
3031 #define __HAL_RCC_C2_FMC_CLK_ENABLE()   do { \\r
3032                                         __IO uint32_t tmpreg; \\r
3033                                         SET_BIT(RCC_C2->AHB3ENR, RCC_AHB3ENR_FMCEN);\\r
3034                                         /* Delay after an RCC peripheral clock enabling */ \\r
3035                                         tmpreg = READ_BIT(RCC_C2->AHB3ENR, RCC_AHB3ENR_FMCEN);\\r
3036                                         UNUSED(tmpreg); \\r
3037                                        } while(0)\r
3038 \r
3039 #define __HAL_RCC_C2_QSPI_CLK_ENABLE()   do { \\r
3040                                         __IO uint32_t tmpreg; \\r
3041                                         SET_BIT(RCC_C2->AHB3ENR, RCC_AHB3ENR_QSPIEN);\\r
3042                                         /* Delay after an RCC peripheral clock enabling */ \\r
3043                                         tmpreg = READ_BIT(RCC_C2->AHB3ENR, RCC_AHB3ENR_QSPIEN);\\r
3044                                         UNUSED(tmpreg); \\r
3045                                        } while(0)\r
3046 \r
3047 #define __HAL_RCC_C2_SDMMC1_CLK_ENABLE()   do { \\r
3048                                         __IO uint32_t tmpreg; \\r
3049                                         SET_BIT(RCC_C2->AHB3ENR, RCC_AHB3ENR_SDMMC1EN);\\r
3050                                         /* Delay after an RCC peripheral clock enabling */ \\r
3051                                         tmpreg = READ_BIT(RCC_C2->AHB3ENR, RCC_AHB3ENR_SDMMC1EN);\\r
3052                                         UNUSED(tmpreg); \\r
3053                                        } while(0)\r
3054 \r
3055 \r
3056 \r
3057 \r
3058 #define __HAL_RCC_C2_MDMA_CLK_DISABLE()            (RCC_C2->AHB3ENR &= ~ (RCC_AHB3ENR_MDMAEN))\r
3059 #define __HAL_RCC_C2_DMA2D_CLK_DISABLE()           (RCC_C2->AHB3ENR &= ~ (RCC_AHB3ENR_DMA2DEN))\r
3060 #define __HAL_RCC_C2_JPGDECEN_CLK_DISABLE()        (RCC_C2->AHB3ENR &= ~ (RCC_AHB3ENR_JPGDECEN))\r
3061 #define __HAL_RCC_C2_FMC_CLK_DISABLE()             (RCC_C2->AHB3ENR &= ~ (RCC_AHB3ENR_FMCEN))\r
3062 #define __HAL_RCC_C2_QSPI_CLK_DISABLE()            (RCC_C2->AHB3ENR &= ~ (RCC_AHB3ENR_QSPIEN))\r
3063 #define __HAL_RCC_C2_SDMMC1_CLK_DISABLE()          (RCC_C2->AHB3ENR &= ~ (RCC_AHB3ENR_SDMMC1EN))\r
3064 #define __HAL_RCC_FLASH_C2_DEALLOCATE()            (RCC_C2->AHB3ENR &= ~ (RCC_AHB3ENR_FLASHEN))\r
3065 #define __HAL_RCC_DTCM1_C2_DEALLOCATE()            (RCC_C2->AHB3ENR &= ~ (RCC_AHB3ENR_DTCM1EN))\r
3066 #define __HAL_RCC_DTCM2_C2_DEALLOCATE()            (RCC_C2->AHB3ENR &= ~ (RCC_AHB3ENR_DTCM2EN))\r
3067 #define __HAL_RCC_ITCM_C2_DEALLOCATE()             (RCC_C2->AHB3ENR &= ~ (RCC_AHB3ENR_ITCMEN))\r
3068 #define __HAL_RCC_D1SRAM1_C2_DEALLOCATE()          (RCC_C2->AHB3ENR &= ~ (RCC_AHB3ENR_AXISRAMEN))\r
3069 \r
3070 /** @brief  Enable or disable the AHB1 peripheral clock.\r
3071   * @note   After reset, the peripheral clock (used for registers read/write access)\r
3072   *         is disabled and the application software has to enable this clock before\r
3073   *         using it.\r
3074   */\r
3075 \r
3076 #define __HAL_RCC_C2_DMA1_CLK_ENABLE()   do { \\r
3077                                         __IO uint32_t tmpreg; \\r
3078                                         SET_BIT(RCC_C2->AHB1ENR, RCC_AHB1ENR_DMA1EN);\\r
3079                                         /* Delay after an RCC peripheral clock enabling */ \\r
3080                                         tmpreg = READ_BIT(RCC_C2->AHB1ENR, RCC_AHB1ENR_DMA1EN);\\r
3081                                         UNUSED(tmpreg); \\r
3082                                        } while(0)\r
3083 \r
3084 #define __HAL_RCC_C2_DMA2_CLK_ENABLE()   do { \\r
3085                                         __IO uint32_t tmpreg; \\r
3086                                         SET_BIT(RCC_C2->AHB1ENR, RCC_AHB1ENR_DMA2EN);\\r
3087                                         /* Delay after an RCC peripheral clock enabling */ \\r
3088                                         tmpreg = READ_BIT(RCC_C2->AHB1ENR, RCC_AHB1ENR_DMA2EN);\\r
3089                                         UNUSED(tmpreg); \\r
3090                                        } while(0)\r
3091 \r
3092 #define __HAL_RCC_C2_ADC12_CLK_ENABLE()   do { \\r
3093                                         __IO uint32_t tmpreg; \\r
3094                                         SET_BIT(RCC_C2->AHB1ENR, RCC_AHB1ENR_ADC12EN);\\r
3095                                         /* Delay after an RCC peripheral clock enabling */ \\r
3096                                         tmpreg = READ_BIT(RCC_C2->AHB1ENR, RCC_AHB1ENR_ADC12EN);\\r
3097                                         UNUSED(tmpreg); \\r
3098                                        } while(0)\r
3099 \r
3100 #define __HAL_RCC_C2_ART_CLK_ENABLE()   do { \\r
3101                                         __IO uint32_t tmpreg; \\r
3102                                         SET_BIT(RCC_C2->AHB1ENR, RCC_AHB1ENR_ARTEN);\\r
3103                                         /* Delay after an RCC peripheral clock enabling */ \\r
3104                                         tmpreg = READ_BIT(RCC_C2->AHB1ENR, RCC_AHB1ENR_ARTEN);\\r
3105                                         UNUSED(tmpreg); \\r
3106                                        } while(0)\r
3107 \r
3108 #define __HAL_RCC_C2_ETH1MAC_CLK_ENABLE()   do { \\r
3109                                         __IO uint32_t tmpreg; \\r
3110                                         SET_BIT(RCC_C2->AHB1ENR, RCC_AHB1ENR_ETH1MACEN);\\r
3111                                         /* Delay after an RCC peripheral clock enabling */ \\r
3112                                         tmpreg = READ_BIT(RCC_C2->AHB1ENR, RCC_AHB1ENR_ETH1MACEN);\\r
3113                                         UNUSED(tmpreg); \\r
3114                                        } while(0)\r
3115 \r
3116 #define __HAL_RCC_C2_ETH1TX_CLK_ENABLE()   do { \\r
3117                                         __IO uint32_t tmpreg; \\r
3118                                         SET_BIT(RCC_C2->AHB1ENR, RCC_AHB1ENR_ETH1TXEN);\\r
3119                                         /* Delay after an RCC peripheral clock enabling */ \\r
3120                                         tmpreg = READ_BIT(RCC_C2->AHB1ENR, RCC_AHB1ENR_ETH1TXEN);\\r
3121                                         UNUSED(tmpreg); \\r
3122                                        } while(0)\r
3123 \r
3124 #define __HAL_RCC_C2_ETH1RX_CLK_ENABLE()   do { \\r
3125                                         __IO uint32_t tmpreg; \\r
3126                                         SET_BIT(RCC_C2->AHB1ENR, RCC_AHB1ENR_ETH1RXEN);\\r
3127                                         /* Delay after an RCC peripheral clock enabling */ \\r
3128                                         tmpreg = READ_BIT(RCC_C2->AHB1ENR, RCC_AHB1ENR_ETH1RXEN);\\r
3129                                         UNUSED(tmpreg); \\r
3130                                        } while(0)\r
3131 \r
3132 #define __HAL_RCC_C2_USB1_OTG_HS_CLK_ENABLE()   do { \\r
3133                                         __IO uint32_t tmpreg; \\r
3134                                         SET_BIT(RCC_C2->AHB1ENR, RCC_AHB1ENR_USB1OTGHSEN);\\r
3135                                         /* Delay after an RCC peripheral clock enabling */ \\r
3136                                         tmpreg = READ_BIT(RCC_C2->AHB1ENR, RCC_AHB1ENR_USB1OTGHSEN);\\r
3137                                         UNUSED(tmpreg); \\r
3138                                        } while(0)\r
3139 \r
3140 #define __HAL_RCC_C2_USB1_OTG_HS_ULPI_CLK_ENABLE()   do { \\r
3141                                         __IO uint32_t tmpreg; \\r
3142                                         SET_BIT(RCC_C2->AHB1ENR, RCC_AHB1ENR_USB1OTGHSULPIEN);\\r
3143                                         /* Delay after an RCC peripheral clock enabling */ \\r
3144                                         tmpreg = READ_BIT(RCC_C2->AHB1ENR, RCC_AHB1ENR_USB1OTGHSULPIEN);\\r
3145                                         UNUSED(tmpreg); \\r
3146                                        } while(0)\r
3147 \r
3148 #define __HAL_RCC_C2_USB2_OTG_FS_CLK_ENABLE()   do { \\r
3149                                         __IO uint32_t tmpreg; \\r
3150                                         SET_BIT(RCC_C2->AHB1ENR, RCC_AHB1ENR_USB2OTGHSEN);\\r
3151                                         /* Delay after an RCC peripheral clock enabling */ \\r
3152                                         tmpreg = READ_BIT(RCC_C2->AHB1ENR, RCC_AHB1ENR_USB2OTGHSEN);\\r
3153                                         UNUSED(tmpreg); \\r
3154                                        } while(0)\r
3155 \r
3156 \r
3157 #define __HAL_RCC_C2_USB2_OTG_FS_ULPI_CLK_ENABLE()   do { \\r
3158                                         __IO uint32_t tmpreg; \\r
3159                                         SET_BIT(RCC_C2->AHB1ENR, RCC_AHB1ENR_USB2OTGHSULPIEN);\\r
3160                                         /* Delay after an RCC peripheral clock enabling */ \\r
3161                                         tmpreg = READ_BIT(RCC_C2->AHB1ENR, RCC_AHB1ENR_USB2OTGHSULPIEN);\\r
3162                                         UNUSED(tmpreg); \\r
3163                                        } while(0)\r
3164 \r
3165 #define __HAL_RCC_C2_DMA1_CLK_DISABLE()             (RCC_C2->AHB1ENR &= ~ (RCC_AHB1ENR_DMA1EN))\r
3166 #define __HAL_RCC_C2_DMA2_CLK_DISABLE()             (RCC_C2->AHB1ENR &= ~ (RCC_AHB1ENR_DMA2EN))\r
3167 #define __HAL_RCC_C2_ADC12_CLK_DISABLE()            (RCC_C2->AHB1ENR &= ~ (RCC_AHB1ENR_ADC12EN))\r
3168 #define __HAL_RCC_C2_ART_CLK_DISABLE()              (RCC_C2->AHB1ENR &= ~ (RCC_AHB1ENR_ARTEN))\r
3169 #define __HAL_RCC_C2_ETH1MAC_CLK_DISABLE()          (RCC_C2->AHB1ENR &= ~ (RCC_AHB1ENR_ETH1MACEN))\r
3170 #define __HAL_RCC_C2_ETH1TX_CLK_DISABLE()           (RCC_C2->AHB1ENR &= ~ (RCC_AHB1ENR_ETH1TXEN))\r
3171 #define __HAL_RCC_C2_ETH1RX_CLK_DISABLE()           (RCC_C2->AHB1ENR &= ~ (RCC_AHB1ENR_ETH1RXEN))\r
3172 #define __HAL_RCC_C2_USB1_OTG_HS_CLK_DISABLE()      (RCC_C2->AHB1ENR &= ~ (RCC_AHB1ENR_USB1OTGHSEN))\r
3173 #define __HAL_RCC_C2_USB1_OTG_HS_ULPI_CLK_DISABLE() (RCC_C2->AHB1ENR &= ~ (RCC_AHB1ENR_USB1OTGHSULPIEN))\r
3174 #define __HAL_RCC_C2_USB2_OTG_FS_CLK_DISABLE()      (RCC_C2->AHB1ENR &= ~ (RCC_AHB1ENR_USB2OTGHSEN))\r
3175 #define __HAL_RCC_C2_USB2_OTG_FS_ULPI_CLK_DISABLE() (RCC_C2->AHB1ENR &= ~ (RCC_AHB1ENR_USB2OTGHSULPIEN))\r
3176 \r
3177 /** @brief  Enable or disable the AHB2 peripheral clock.\r
3178   * @note   After reset, the peripheral clock (used for registers read/write access)\r
3179   *         is disabled and the application software has to enable this clock before\r
3180   *         using it.\r
3181   */\r
3182 \r
3183 #define __HAL_RCC_C2_DCMI_CLK_ENABLE()   do { \\r
3184                                         __IO uint32_t tmpreg; \\r
3185                                         SET_BIT(RCC_C2->AHB2ENR, RCC_AHB2ENR_DCMIEN);\\r
3186                                         /* Delay after an RCC peripheral clock enabling */ \\r
3187                                         tmpreg = READ_BIT(RCC_C2->AHB2ENR, RCC_AHB2ENR_DCMIEN);\\r
3188                                         UNUSED(tmpreg); \\r
3189                                        } while(0)\r
3190 \r
3191 #define __HAL_RCC_C2_CRYP_CLK_ENABLE()   do { \\r
3192                                         __IO uint32_t tmpreg; \\r
3193                                         SET_BIT(RCC_C2->AHB2ENR, RCC_AHB2ENR_CRYPEN);\\r
3194                                         /* Delay after an RCC peripheral clock enabling */ \\r
3195                                         tmpreg = READ_BIT(RCC_C2->AHB2ENR, RCC_AHB2ENR_CRYPEN);\\r
3196                                         UNUSED(tmpreg); \\r
3197                                        } while(0)\r
3198 \r
3199 #define __HAL_RCC_C2_HASH_CLK_ENABLE()   do { \\r
3200                                         __IO uint32_t tmpreg; \\r
3201                                         SET_BIT(RCC_C2->AHB2ENR, RCC_AHB2ENR_HASHEN);\\r
3202                                         /* Delay after an RCC peripheral clock enabling */ \\r
3203                                         tmpreg = READ_BIT(RCC_C2->AHB2ENR, RCC_AHB2ENR_HASHEN);\\r
3204                                         UNUSED(tmpreg); \\r
3205                                        } while(0)\r
3206 \r
3207 #define __HAL_RCC_C2_RNG_CLK_ENABLE()   do { \\r
3208                                         __IO uint32_t tmpreg; \\r
3209                                         SET_BIT(RCC_C2->AHB2ENR, RCC_AHB2ENR_RNGEN);\\r
3210                                         /* Delay after an RCC peripheral clock enabling */ \\r
3211                                         tmpreg = READ_BIT(RCC_C2->AHB2ENR, RCC_AHB2ENR_RNGEN);\\r
3212                                         UNUSED(tmpreg); \\r
3213                                        } while(0)\r
3214 \r
3215 #define __HAL_RCC_C2_SDMMC2_CLK_ENABLE()   do { \\r
3216                                         __IO uint32_t tmpreg; \\r
3217                                         SET_BIT(RCC_C2->AHB2ENR, RCC_AHB2ENR_SDMMC2EN);\\r
3218                                         /* Delay after an RCC peripheral clock enabling */ \\r
3219                                         tmpreg = READ_BIT(RCC_C2->AHB2ENR, RCC_AHB2ENR_SDMMC2EN);\\r
3220                                         UNUSED(tmpreg); \\r
3221                                        } while(0)\r
3222 \r
3223 #define __HAL_RCC_C2_D2SRAM1_CLK_ENABLE()   do { \\r
3224                                         __IO uint32_t tmpreg; \\r
3225                                         SET_BIT(RCC_C2->AHB2ENR, RCC_AHB2ENR_D2SRAM1EN);\\r
3226                                         /* Delay after an RCC peripheral clock enabling */ \\r
3227                                         tmpreg = READ_BIT(RCC_C2->AHB2ENR, RCC_AHB2ENR_D2SRAM1EN);\\r
3228                                         UNUSED(tmpreg); \\r
3229                                        } while(0)\r
3230 \r
3231 #define __HAL_RCC_C2_D2SRAM2_CLK_ENABLE()   do { \\r
3232                                         __IO uint32_t tmpreg; \\r
3233                                         SET_BIT(RCC_C2->AHB2ENR, RCC_AHB2ENR_D2SRAM2EN);\\r
3234                                         /* Delay after an RCC peripheral clock enabling */ \\r
3235                                         tmpreg = READ_BIT(RCC_C2->AHB2ENR, RCC_AHB2ENR_D2SRAM2EN);\\r
3236                                         UNUSED(tmpreg); \\r
3237                                        } while(0)\r
3238 \r
3239 #define __HAL_RCC_C2_D2SRAM3_CLK_ENABLE()   do { \\r
3240                                         __IO uint32_t tmpreg; \\r
3241                                         SET_BIT(RCC_C2->AHB2ENR, RCC_AHB2ENR_D2SRAM3EN);\\r
3242                                         /* Delay after an RCC peripheral clock enabling */ \\r
3243                                         tmpreg = READ_BIT(RCC_C2->AHB2ENR, RCC_AHB2ENR_D2SRAM3EN);\\r
3244                                         UNUSED(tmpreg); \\r
3245                                        } while(0)\r
3246 \r
3247 #define __HAL_RCC_C2_DCMI_CLK_DISABLE()             (RCC_C2->AHB2ENR &= ~ (RCC_AHB2ENR_DCMIEN))\r
3248 #define __HAL_RCC_C2_CRYP_CLK_DISABLE()             (RCC_C2->AHB2ENR &= ~ (RCC_AHB2ENR_CRYPEN))\r
3249 #define __HAL_RCC_C2_HASH_CLK_DISABLE()             (RCC_C2->AHB2ENR &= ~ (RCC_AHB2ENR_HASHEN))\r
3250 #define __HAL_RCC_C2_RNG_CLK_DISABLE()              (RCC_C2->AHB2ENR &= ~ (RCC_AHB2ENR_RNGEN))\r
3251 #define __HAL_RCC_C2_SDMMC2_CLK_DISABLE()           (RCC_C2->AHB2ENR &= ~ (RCC_AHB2ENR_SDMMC2EN))\r
3252 #define __HAL_RCC_C2_D2SRAM1_CLK_DISABLE()          (RCC_C2->AHB2ENR &= ~ (RCC_AHB2ENR_D2SRAM1EN))\r
3253 #define __HAL_RCC_C2_D2SRAM2_CLK_DISABLE()          (RCC_C2->AHB2ENR &= ~ (RCC_AHB2ENR_D2SRAM2EN))\r
3254 #define __HAL_RCC_C2_D2SRAM3_CLK_DISABLE()          (RCC_C2->AHB2ENR &= ~ (RCC_AHB2ENR_D2SRAM3EN))\r
3255 \r
3256 /** @brief  Enable or disable the AHB4 peripheral clock.\r
3257   * @note   After reset, the peripheral clock (used for registers read/write access)\r
3258   *         is disabled and the application software has to enable this clock before\r
3259   *         using it.\r
3260   */\r
3261 \r
3262 #define __HAL_RCC_C2_GPIOA_CLK_ENABLE()   do { \\r
3263                                         __IO uint32_t tmpreg; \\r
3264                                         SET_BIT(RCC_C2->AHB4ENR, RCC_AHB4ENR_GPIOAEN);\\r
3265                                         /* Delay after an RCC peripheral clock enabling */ \\r
3266                                         tmpreg = READ_BIT(RCC_C2->AHB4ENR, RCC_AHB4ENR_GPIOAEN);\\r
3267                                         UNUSED(tmpreg); \\r
3268                                        } while(0)\r
3269 \r
3270 #define __HAL_RCC_C2_GPIOB_CLK_ENABLE()   do { \\r
3271                                         __IO uint32_t tmpreg; \\r
3272                                         SET_BIT(RCC_C2->AHB4ENR, RCC_AHB4ENR_GPIOBEN);\\r
3273                                         /* Delay after an RCC peripheral clock enabling */ \\r
3274                                         tmpreg = READ_BIT(RCC_C2->AHB4ENR, RCC_AHB4ENR_GPIOBEN);\\r
3275                                         UNUSED(tmpreg); \\r
3276                                        } while(0)\r
3277 \r
3278 #define __HAL_RCC_C2_GPIOC_CLK_ENABLE()   do { \\r
3279                                         __IO uint32_t tmpreg; \\r
3280                                         SET_BIT(RCC_C2->AHB4ENR, RCC_AHB4ENR_GPIOCEN);\\r
3281                                         /* Delay after an RCC peripheral clock enabling */ \\r
3282                                         tmpreg = READ_BIT(RCC_C2->AHB4ENR, RCC_AHB4ENR_GPIOCEN);\\r
3283                                         UNUSED(tmpreg); \\r
3284                                        } while(0)\r
3285 \r
3286 #define __HAL_RCC_C2_GPIOD_CLK_ENABLE()   do { \\r
3287                                         __IO uint32_t tmpreg; \\r
3288                                         SET_BIT(RCC_C2->AHB4ENR, RCC_AHB4ENR_GPIODEN);\\r
3289                                         /* Delay after an RCC peripheral clock enabling */ \\r
3290                                         tmpreg = READ_BIT(RCC_C2->AHB4ENR, RCC_AHB4ENR_GPIODEN);\\r
3291                                         UNUSED(tmpreg); \\r
3292                                        } while(0)\r
3293 \r
3294 #define __HAL_RCC_C2_GPIOE_CLK_ENABLE()   do { \\r
3295                                         __IO uint32_t tmpreg; \\r
3296                                         SET_BIT(RCC_C2->AHB4ENR, RCC_AHB4ENR_GPIOEEN);\\r
3297                                         /* Delay after an RCC peripheral clock enabling */ \\r
3298                                         tmpreg = READ_BIT(RCC_C2->AHB4ENR, RCC_AHB4ENR_GPIOEEN);\\r
3299                                         UNUSED(tmpreg); \\r
3300                                        } while(0)\r
3301 \r
3302 #define __HAL_RCC_C2_GPIOF_CLK_ENABLE()   do { \\r
3303                                         __IO uint32_t tmpreg; \\r
3304                                         SET_BIT(RCC_C2->AHB4ENR, RCC_AHB4ENR_GPIOFEN);\\r
3305                                         /* Delay after an RCC peripheral clock enabling */ \\r
3306                                         tmpreg = READ_BIT(RCC_C2->AHB4ENR, RCC_AHB4ENR_GPIOFEN);\\r
3307                                         UNUSED(tmpreg); \\r
3308                                        } while(0)\r
3309 \r
3310 #define __HAL_RCC_C2_GPIOG_CLK_ENABLE()   do { \\r
3311                                         __IO uint32_t tmpreg; \\r
3312                                         SET_BIT(RCC_C2->AHB4ENR, RCC_AHB4ENR_GPIOGEN);\\r
3313                                         /* Delay after an RCC peripheral clock enabling */ \\r
3314                                         tmpreg = READ_BIT(RCC_C2->AHB4ENR, RCC_AHB4ENR_GPIOGEN);\\r
3315                                         UNUSED(tmpreg); \\r
3316                                        } while(0)\r
3317 \r
3318 #define __HAL_RCC_C2_GPIOH_CLK_ENABLE()   do { \\r
3319                                         __IO uint32_t tmpreg; \\r
3320                                         SET_BIT(RCC_C2->AHB4ENR, RCC_AHB4ENR_GPIOHEN);\\r
3321                                         /* Delay after an RCC peripheral clock enabling */ \\r
3322                                         tmpreg = READ_BIT(RCC_C2->AHB4ENR, RCC_AHB4ENR_GPIOHEN);\\r
3323                                         UNUSED(tmpreg); \\r
3324                                        } while(0)\r
3325 \r
3326 #define __HAL_RCC_C2_GPIOI_CLK_ENABLE()   do { \\r
3327                                         __IO uint32_t tmpreg; \\r
3328                                         SET_BIT(RCC_C2->AHB4ENR, RCC_AHB4ENR_GPIOIEN);\\r
3329                                         /* Delay after an RCC peripheral clock enabling */ \\r
3330                                         tmpreg = READ_BIT(RCC_C2->AHB4ENR, RCC_AHB4ENR_GPIOIEN);\\r
3331                                         UNUSED(tmpreg); \\r
3332                                        } while(0)\r
3333 \r
3334 #define __HAL_RCC_C2_GPIOJ_CLK_ENABLE()   do { \\r
3335                                         __IO uint32_t tmpreg; \\r
3336                                         SET_BIT(RCC_C2->AHB4ENR, RCC_AHB4ENR_GPIOJEN);\\r
3337                                         /* Delay after an RCC peripheral clock enabling */ \\r
3338                                         tmpreg = READ_BIT(RCC_C2->AHB4ENR, RCC_AHB4ENR_GPIOJEN);\\r
3339                                         UNUSED(tmpreg); \\r
3340                                        } while(0)\r
3341 \r
3342 #define __HAL_RCC_C2_GPIOK_CLK_ENABLE()   do { \\r
3343                                         __IO uint32_t tmpreg; \\r
3344                                         SET_BIT(RCC_C2->AHB4ENR, RCC_AHB4ENR_GPIOKEN);\\r
3345                                         /* Delay after an RCC peripheral clock enabling */ \\r
3346                                         tmpreg = READ_BIT(RCC_C2->AHB4ENR, RCC_AHB4ENR_GPIOKEN);\\r
3347                                         UNUSED(tmpreg); \\r
3348                                        } while(0)\r
3349 \r
3350 #define __HAL_RCC_C2_CRC_CLK_ENABLE()   do { \\r
3351                                         __IO uint32_t tmpreg; \\r
3352                                         SET_BIT(RCC_C2->AHB4ENR, RCC_AHB4ENR_CRCEN);\\r
3353                                         /* Delay after an RCC peripheral clock enabling */ \\r
3354                                         tmpreg = READ_BIT(RCC_C2->AHB4ENR, RCC_AHB4ENR_CRCEN);\\r
3355                                         UNUSED(tmpreg); \\r
3356                                        } while(0)\r
3357 \r
3358 #define __HAL_RCC_C2_BDMA_CLK_ENABLE()   do { \\r
3359                                         __IO uint32_t tmpreg; \\r
3360                                         SET_BIT(RCC_C2->AHB4ENR, RCC_AHB4ENR_BDMAEN);\\r
3361                                         /* Delay after an RCC peripheral clock enabling */ \\r
3362                                         tmpreg = READ_BIT(RCC_C2->AHB4ENR, RCC_AHB4ENR_BDMAEN);\\r
3363                                         UNUSED(tmpreg); \\r
3364                                        } while(0)\r
3365 \r
3366 #define __HAL_RCC_C2_ADC3_CLK_ENABLE()   do { \\r
3367                                         __IO uint32_t tmpreg; \\r
3368                                         SET_BIT(RCC_C2->AHB4ENR, RCC_AHB4ENR_ADC3EN);\\r
3369                                         /* Delay after an RCC peripheral clock enabling */ \\r
3370                                         tmpreg = READ_BIT(RCC_C2->AHB4ENR, RCC_AHB4ENR_ADC3EN);\\r
3371                                         UNUSED(tmpreg); \\r
3372                                        } while(0)\r
3373 \r
3374 #define __HAL_RCC_C2_HSEM_CLK_ENABLE()   do { \\r
3375                                         __IO uint32_t tmpreg; \\r
3376                                         SET_BIT(RCC_C2->AHB4ENR, RCC_AHB4ENR_HSEMEN);\\r
3377                                         /* Delay after an RCC peripheral clock enabling */ \\r
3378                                         tmpreg = READ_BIT(RCC_C2->AHB4ENR, RCC_AHB4ENR_HSEMEN);\\r
3379                                         UNUSED(tmpreg); \\r
3380                                        } while(0)\r
3381 \r
3382 #define __HAL_RCC_C2_BKPRAM_CLK_ENABLE()   do { \\r
3383                                         __IO uint32_t tmpreg; \\r
3384                                         SET_BIT(RCC_C2->AHB4ENR, RCC_AHB4ENR_BKPRAMEN);\\r
3385                                         /* Delay after an RCC peripheral clock enabling */ \\r
3386                                         tmpreg = READ_BIT(RCC_C2->AHB4ENR, RCC_AHB4ENR_BKPRAMEN);\\r
3387                                         UNUSED(tmpreg); \\r
3388                                        } while(0)\r
3389 \r
3390 \r
3391 #define __HAL_RCC_C2_GPIOA_CLK_DISABLE()           (RCC_C2->AHB4ENR) &= ~ (RCC_AHB4ENR_GPIOAEN)\r
3392 #define __HAL_RCC_C2_GPIOB_CLK_DISABLE()           (RCC_C2->AHB4ENR) &= ~ (RCC_AHB4ENR_GPIOBEN)\r
3393 #define __HAL_RCC_C2_GPIOC_CLK_DISABLE()           (RCC_C2->AHB4ENR) &= ~ (RCC_AHB4ENR_GPIOCEN)\r
3394 #define __HAL_RCC_C2_GPIOD_CLK_DISABLE()           (RCC_C2->AHB4ENR) &= ~ (RCC_AHB4ENR_GPIODEN)\r
3395 #define __HAL_RCC_C2_GPIOE_CLK_DISABLE()           (RCC_C2->AHB4ENR) &= ~ (RCC_AHB4ENR_GPIOEEN)\r
3396 #define __HAL_RCC_C2_GPIOF_CLK_DISABLE()           (RCC_C2->AHB4ENR) &= ~ (RCC_AHB4ENR_GPIOFEN)\r
3397 #define __HAL_RCC_C2_GPIOG_CLK_DISABLE()           (RCC_C2->AHB4ENR) &= ~ (RCC_AHB4ENR_GPIOGEN)\r
3398 #define __HAL_RCC_C2_GPIOH_CLK_DISABLE()           (RCC_C2->AHB4ENR) &= ~ (RCC_AHB4ENR_GPIOHEN)\r
3399 #define __HAL_RCC_C2_GPIOI_CLK_DISABLE()           (RCC_C2->AHB4ENR) &= ~ (RCC_AHB4ENR_GPIOIEN)\r
3400 #define __HAL_RCC_C2_GPIOJ_CLK_DISABLE()           (RCC_C2->AHB4ENR) &= ~ (RCC_AHB4ENR_GPIOJEN)\r
3401 #define __HAL_RCC_C2_GPIOK_CLK_DISABLE()           (RCC_C2->AHB4ENR) &= ~ (RCC_AHB4ENR_GPIOKEN)\r
3402 #define __HAL_RCC_C2_CRC_CLK_DISABLE()             (RCC_C2->AHB4ENR) &= ~ (RCC_AHB4ENR_CRCEN)\r
3403 #define __HAL_RCC_C2_BDMA_CLK_DISABLE()            (RCC_C2->AHB4ENR) &= ~ (RCC_AHB4ENR_BDMAEN)\r
3404 #define __HAL_RCC_C2_ADC3_CLK_DISABLE()            (RCC_C2->AHB4ENR) &= ~ (RCC_AHB4ENR_ADC3EN)\r
3405 #define __HAL_RCC_C2_HSEM_CLK_DISABLE()            (RCC_C2->AHB4ENR) &= ~ (RCC_AHB4ENR_HSEMEN)\r
3406 #define __HAL_RCC_C2_BKPRAM_CLK_DISABLE()          (RCC_C2->AHB4ENR) &= ~ (RCC_AHB4ENR_BKPRAMEN)\r
3407 \r
3408 \r
3409 /** @brief  Enable or disable the APB3 peripheral clock.\r
3410   * @note   After reset, the peripheral clock (used for registers read/write access)\r
3411   *         is disabled and the application software has to enable this clock before\r
3412   *         using it.\r
3413   */\r
3414 \r
3415 #define __HAL_RCC_C2_LTDC_CLK_ENABLE()   do { \\r
3416                                         __IO uint32_t tmpreg; \\r
3417                                         SET_BIT(RCC_C2->APB3ENR, RCC_APB3ENR_LTDCEN);\\r
3418                                         /* Delay after an RCC peripheral clock enabling */ \\r
3419                                         tmpreg = READ_BIT(RCC_C2->APB3ENR, RCC_APB3ENR_LTDCEN);\\r
3420                                         UNUSED(tmpreg); \\r
3421                                        } while(0)\r
3422 \r
3423 #define __HAL_RCC_C2_DSI_CLK_ENABLE()   do { \\r
3424                                         __IO uint32_t tmpreg; \\r
3425                                         SET_BIT(RCC_C2->APB3ENR, RCC_APB3ENR_DSIEN);\\r
3426                                         /* Delay after an RCC peripheral clock enabling */ \\r
3427                                         tmpreg = READ_BIT(RCC_C2->APB3ENR, RCC_APB3ENR_DSIEN);\\r
3428                                         UNUSED(tmpreg); \\r
3429                                        } while(0)\r
3430 \r
3431 #define __HAL_RCC_C2_WWDG1_CLK_ENABLE()   do { \\r
3432                                         __IO uint32_t tmpreg; \\r
3433                                         SET_BIT(RCC_C2->APB3ENR, RCC_APB3ENR_WWDG1EN);\\r
3434                                         /* Delay after an RCC peripheral clock enabling */ \\r
3435                                         tmpreg = READ_BIT(RCC_C2->APB3ENR, RCC_APB3ENR_WWDG1EN);\\r
3436                                         UNUSED(tmpreg); \\r
3437                                        } while(0)\r
3438 \r
3439 #define __HAL_RCC_C2_LTDC_CLK_DISABLE()           (RCC_C2->APB3ENR) &= ~ (RCC_APB3ENR_LTDCEN)\r
3440 #define __HAL_RCC_C2_DSI_CLK_DISABLE()            (RCC_C2->APB3ENR) &= ~ (RCC_APB3ENR_DSIEN)\r
3441 #define __HAL_RCC_C2_WWDG1_CLK_DISABLE()          (RCC_C2->APB3ENR) &= ~ (RCC_APB3ENR_WWDG1EN)\r
3442 \r
3443 /** @brief  Enable or disable the APB1 peripheral clock.\r
3444   * @note   After reset, the peripheral clock (used for registers read/write access)\r
3445   *         is disabled and the application software has to enable this clock before\r
3446   *         using it.\r
3447   */\r
3448 \r
3449 #define __HAL_RCC_C2_TIM2_CLK_ENABLE()   do { \\r
3450                                         __IO uint32_t tmpreg; \\r
3451                                         SET_BIT(RCC_C2->APB1LENR, RCC_APB1LENR_TIM2EN);\\r
3452                                         /* Delay after an RCC peripheral clock enabling */ \\r
3453                                         tmpreg = READ_BIT(RCC_C2->APB1LENR, RCC_APB1LENR_TIM2EN);\\r
3454                                         UNUSED(tmpreg); \\r
3455                                        } while(0)\r
3456 \r
3457 #define __HAL_RCC_C2_TIM3_CLK_ENABLE()   do { \\r
3458                                         __IO uint32_t tmpreg; \\r
3459                                         SET_BIT(RCC_C2->APB1LENR, RCC_APB1LENR_TIM3EN);\\r
3460                                         /* Delay after an RCC peripheral clock enabling */ \\r
3461                                         tmpreg = READ_BIT(RCC_C2->APB1LENR, RCC_APB1LENR_TIM3EN);\\r
3462                                         UNUSED(tmpreg); \\r
3463                                        } while(0)\r
3464 \r
3465 #define __HAL_RCC_C2_TIM4_CLK_ENABLE()   do { \\r
3466                                         __IO uint32_t tmpreg; \\r
3467                                         SET_BIT(RCC_C2->APB1LENR, RCC_APB1LENR_TIM4EN);\\r
3468                                         /* Delay after an RCC peripheral clock enabling */ \\r
3469                                         tmpreg = READ_BIT(RCC_C2->APB1LENR, RCC_APB1LENR_TIM4EN);\\r
3470                                         UNUSED(tmpreg); \\r
3471                                        } while(0)\r
3472 \r
3473 #define __HAL_RCC_C2_TIM5_CLK_ENABLE()   do { \\r
3474                                         __IO uint32_t tmpreg; \\r
3475                                         SET_BIT(RCC_C2->APB1LENR, RCC_APB1LENR_TIM5EN);\\r
3476                                         /* Delay after an RCC peripheral clock enabling */ \\r
3477                                         tmpreg = READ_BIT(RCC_C2->APB1LENR, RCC_APB1LENR_TIM5EN);\\r
3478                                         UNUSED(tmpreg); \\r
3479                                        } while(0)\r
3480 \r
3481 #define __HAL_RCC_C2_TIM6_CLK_ENABLE()   do { \\r
3482                                         __IO uint32_t tmpreg; \\r
3483                                         SET_BIT(RCC_C2->APB1LENR, RCC_APB1LENR_TIM6EN);\\r
3484                                         /* Delay after an RCC peripheral clock enabling */ \\r
3485                                         tmpreg = READ_BIT(RCC_C2->APB1LENR, RCC_APB1LENR_TIM6EN);\\r
3486                                         UNUSED(tmpreg); \\r
3487                                        } while(0)\r
3488 \r
3489 #define __HAL_RCC_C2_TIM7_CLK_ENABLE()   do { \\r
3490                                         __IO uint32_t tmpreg; \\r
3491                                         SET_BIT(RCC_C2->APB1LENR, RCC_APB1LENR_TIM7EN);\\r
3492                                         /* Delay after an RCC peripheral clock enabling */ \\r
3493                                         tmpreg = READ_BIT(RCC_C2->APB1LENR, RCC_APB1LENR_TIM7EN);\\r
3494                                         UNUSED(tmpreg); \\r
3495                                        } while(0)\r
3496 \r
3497 #define __HAL_RCC_C2_TIM12_CLK_ENABLE()   do { \\r
3498                                         __IO uint32_t tmpreg; \\r
3499                                         SET_BIT(RCC_C2->APB1LENR, RCC_APB1LENR_TIM12EN);\\r
3500                                         /* Delay after an RCC peripheral clock enabling */ \\r
3501                                         tmpreg = READ_BIT(RCC_C2->APB1LENR, RCC_APB1LENR_TIM12EN);\\r
3502                                         UNUSED(tmpreg); \\r
3503                                        } while(0)\r
3504 \r
3505 #define __HAL_RCC_C2_TIM13_CLK_ENABLE()   do { \\r
3506                                         __IO uint32_t tmpreg; \\r
3507                                         SET_BIT(RCC_C2->APB1LENR, RCC_APB1LENR_TIM13EN);\\r
3508                                         /* Delay after an RCC peripheral clock enabling */ \\r
3509                                         tmpreg = READ_BIT(RCC_C2->APB1LENR, RCC_APB1LENR_TIM13EN);\\r
3510                                         UNUSED(tmpreg); \\r
3511                                        } while(0)\r
3512 \r
3513 #define __HAL_RCC_C2_TIM14_CLK_ENABLE()   do { \\r
3514                                         __IO uint32_t tmpreg; \\r
3515                                         SET_BIT(RCC_C2->APB1LENR, RCC_APB1LENR_TIM14EN);\\r
3516                                         /* Delay after an RCC peripheral clock enabling */ \\r
3517                                         tmpreg = READ_BIT(RCC_C2->APB1LENR, RCC_APB1LENR_TIM14EN);\\r
3518                                         UNUSED(tmpreg); \\r
3519                                        } while(0)\r
3520 \r
3521 #define __HAL_RCC_C2_LPTIM1_CLK_ENABLE()   do { \\r
3522                                         __IO uint32_t tmpreg; \\r
3523                                         SET_BIT(RCC_C2->APB1LENR, RCC_APB1LENR_LPTIM1EN);\\r
3524                                         /* Delay after an RCC peripheral clock enabling */ \\r
3525                                         tmpreg = READ_BIT(RCC_C2->APB1LENR, RCC_APB1LENR_LPTIM1EN);\\r
3526                                         UNUSED(tmpreg); \\r
3527                                        } while(0)\r
3528 \r
3529 #define __HAL_RCC_C2_WWDG2_CLK_ENABLE()   do { \\r
3530                                         __IO uint32_t tmpreg; \\r
3531                                         SET_BIT(RCC_C2->APB1LENR, RCC_APB1LENR_WWDG2EN);\\r
3532                                         /* Delay after an RCC peripheral clock enabling */ \\r
3533                                         tmpreg = READ_BIT(RCC_C2->APB1LENR, RCC_APB1LENR_WWDG2EN);\\r
3534                                         UNUSED(tmpreg); \\r
3535                                        } while(0)\r
3536 \r
3537 #define __HAL_RCC_C2_SPI2_CLK_ENABLE()   do { \\r
3538                                         __IO uint32_t tmpreg; \\r
3539                                         SET_BIT(RCC_C2->APB1LENR, RCC_APB1LENR_SPI2EN);\\r
3540                                         /* Delay after an RCC peripheral clock enabling */ \\r
3541                                         tmpreg = READ_BIT(RCC_C2->APB1LENR, RCC_APB1LENR_SPI2EN);\\r
3542                                         UNUSED(tmpreg); \\r
3543                                        } while(0)\r
3544 \r
3545 #define __HAL_RCC_C2_SPI3_CLK_ENABLE()   do { \\r
3546                                         __IO uint32_t tmpreg; \\r
3547                                         SET_BIT(RCC_C2->APB1LENR, RCC_APB1LENR_SPI3EN);\\r
3548                                         /* Delay after an RCC peripheral clock enabling */ \\r
3549                                         tmpreg = READ_BIT(RCC_C2->APB1LENR, RCC_APB1LENR_SPI3EN);\\r
3550                                         UNUSED(tmpreg); \\r
3551                                        } while(0)\r
3552 \r
3553 #define __HAL_RCC_C2_SPDIFRX_CLK_ENABLE()   do { \\r
3554                                         __IO uint32_t tmpreg; \\r
3555                                         SET_BIT(RCC_C2->APB1LENR, RCC_APB1LENR_SPDIFRXEN);\\r
3556                                         /* Delay after an RCC peripheral clock enabling */ \\r
3557                                         tmpreg = READ_BIT(RCC_C2->APB1LENR, RCC_APB1LENR_SPDIFRXEN);\\r
3558                                         UNUSED(tmpreg); \\r
3559                                        } while(0)\r
3560 \r
3561 #define __HAL_RCC_C2_USART2_CLK_ENABLE()   do { \\r
3562                                         __IO uint32_t tmpreg; \\r
3563                                         SET_BIT(RCC_C2->APB1LENR, RCC_APB1LENR_USART2EN);\\r
3564                                         /* Delay after an RCC peripheral clock enabling */ \\r
3565                                         tmpreg = READ_BIT(RCC_C2->APB1LENR, RCC_APB1LENR_USART2EN);\\r
3566                                         UNUSED(tmpreg); \\r
3567                                        } while(0)\r
3568 \r
3569 #define __HAL_RCC_C2_USART3_CLK_ENABLE()   do { \\r
3570                                         __IO uint32_t tmpreg; \\r
3571                                         SET_BIT(RCC_C2->APB1LENR, RCC_APB1LENR_USART3EN);\\r
3572                                         /* Delay after an RCC peripheral clock enabling */ \\r
3573                                         tmpreg = READ_BIT(RCC_C2->APB1LENR, RCC_APB1LENR_USART3EN);\\r
3574                                         UNUSED(tmpreg); \\r
3575                                        } while(0)\r
3576 \r
3577 #define __HAL_RCC_C2_UART4_CLK_ENABLE()   do { \\r
3578                                         __IO uint32_t tmpreg; \\r
3579                                         SET_BIT(RCC_C2->APB1LENR, RCC_APB1LENR_UART4EN);\\r
3580                                         /* Delay after an RCC peripheral clock enabling */ \\r
3581                                         tmpreg = READ_BIT(RCC_C2->APB1LENR, RCC_APB1LENR_UART4EN);\\r
3582                                         UNUSED(tmpreg); \\r
3583                                        } while(0)\r
3584 \r
3585 #define __HAL_RCC_C2_UART5_CLK_ENABLE()   do { \\r
3586                                         __IO uint32_t tmpreg; \\r
3587                                         SET_BIT(RCC_C2->APB1LENR, RCC_APB1LENR_UART5EN);\\r
3588                                         /* Delay after an RCC peripheral clock enabling */ \\r
3589                                         tmpreg = READ_BIT(RCC_C2->APB1LENR, RCC_APB1LENR_UART5EN);\\r
3590                                         UNUSED(tmpreg); \\r
3591                                        } while(0)\r
3592 \r
3593 #define __HAL_RCC_C2_I2C1_CLK_ENABLE()   do { \\r
3594                                         __IO uint32_t tmpreg; \\r
3595                                         SET_BIT(RCC_C2->APB1LENR, RCC_APB1LENR_I2C1EN);\\r
3596                                         /* Delay after an RCC peripheral clock enabling */ \\r
3597                                         tmpreg = READ_BIT(RCC_C2->APB1LENR, RCC_APB1LENR_I2C1EN);\\r
3598                                         UNUSED(tmpreg); \\r
3599                                        } while(0)\r
3600 \r
3601 #define __HAL_RCC_C2_I2C2_CLK_ENABLE()   do { \\r
3602                                         __IO uint32_t tmpreg; \\r
3603                                         SET_BIT(RCC_C2->APB1LENR, RCC_APB1LENR_I2C2EN);\\r
3604                                         /* Delay after an RCC peripheral clock enabling */ \\r
3605                                         tmpreg = READ_BIT(RCC_C2->APB1LENR, RCC_APB1LENR_I2C2EN);\\r
3606                                         UNUSED(tmpreg); \\r
3607                                        } while(0)\r
3608 \r
3609 #define __HAL_RCC_C2_I2C3_CLK_ENABLE()   do { \\r
3610                                         __IO uint32_t tmpreg; \\r
3611                                         SET_BIT(RCC_C2->APB1LENR, RCC_APB1LENR_I2C3EN);\\r
3612                                         /* Delay after an RCC peripheral clock enabling */ \\r
3613                                         tmpreg = READ_BIT(RCC_C2->APB1LENR, RCC_APB1LENR_I2C3EN);\\r
3614                                         UNUSED(tmpreg); \\r
3615                                        } while(0)\r
3616 \r
3617 #define __HAL_RCC_C2_CEC_CLK_ENABLE()   do { \\r
3618                                         __IO uint32_t tmpreg; \\r
3619                                         SET_BIT(RCC_C2->APB1LENR, RCC_APB1LENR_CECEN);\\r
3620                                         /* Delay after an RCC peripheral clock enabling */ \\r
3621                                         tmpreg = READ_BIT(RCC_C2->APB1LENR, RCC_APB1LENR_CECEN);\\r
3622                                         UNUSED(tmpreg); \\r
3623                                        } while(0)\r
3624 \r
3625 #define __HAL_RCC_C2_DAC12_CLK_ENABLE()   do { \\r
3626                                         __IO uint32_t tmpreg; \\r
3627                                         SET_BIT(RCC_C2->APB1LENR, RCC_APB1LENR_DAC12EN);\\r
3628                                         /* Delay after an RCC peripheral clock enabling */ \\r
3629                                         tmpreg = READ_BIT(RCC_C2->APB1LENR, RCC_APB1LENR_DAC12EN);\\r
3630                                         UNUSED(tmpreg); \\r
3631                                        } while(0)\r
3632 \r
3633 #define __HAL_RCC_C2_UART7_CLK_ENABLE()   do { \\r
3634                                         __IO uint32_t tmpreg; \\r
3635                                         SET_BIT(RCC_C2->APB1LENR, RCC_APB1LENR_UART7EN);\\r
3636                                         /* Delay after an RCC peripheral clock enabling */ \\r
3637                                         tmpreg = READ_BIT(RCC_C2->APB1LENR, RCC_APB1LENR_UART7EN);\\r
3638                                         UNUSED(tmpreg); \\r
3639                                        } while(0)\r
3640 \r
3641 #define __HAL_RCC_C2_UART8_CLK_ENABLE()   do { \\r
3642                                         __IO uint32_t tmpreg; \\r
3643                                         SET_BIT(RCC_C2->APB1LENR, RCC_APB1LENR_UART8EN);\\r
3644                                         /* Delay after an RCC peripheral clock enabling */ \\r
3645                                         tmpreg = READ_BIT(RCC_C2->APB1LENR, RCC_APB1LENR_UART8EN);\\r
3646                                         UNUSED(tmpreg); \\r
3647                                        } while(0)\r
3648 \r
3649 #define __HAL_RCC_C2_CRS_CLK_ENABLE()   do { \\r
3650                                         __IO uint32_t tmpreg; \\r
3651                                         SET_BIT(RCC_C2->APB1HENR, RCC_APB1HENR_CRSEN);\\r
3652                                         /* Delay after an RCC peripheral clock enabling */ \\r
3653                                         tmpreg = READ_BIT(RCC_C2->APB1HENR, RCC_APB1HENR_CRSEN);\\r
3654                                         UNUSED(tmpreg); \\r
3655                                        } while(0)\r
3656 \r
3657 #define __HAL_RCC_C2_SWPMI_CLK_ENABLE()   do { \\r
3658                                         __IO uint32_t tmpreg; \\r
3659                                         SET_BIT(RCC_C2->APB1HENR, RCC_APB1HENR_SWPMIEN);\\r
3660                                         /* Delay after an RCC peripheral clock enabling */ \\r
3661                                         tmpreg = READ_BIT(RCC_C2->APB1HENR, RCC_APB1HENR_SWPMIEN);\\r
3662                                         UNUSED(tmpreg); \\r
3663                                        } while(0)\r
3664 \r
3665 #define __HAL_RCC_C2_OPAMP_CLK_ENABLE()   do { \\r
3666                                         __IO uint32_t tmpreg; \\r
3667                                         SET_BIT(RCC_C2->APB1HENR, RCC_APB1HENR_OPAMPEN);\\r
3668                                         /* Delay after an RCC peripheral clock enabling */ \\r
3669                                         tmpreg = READ_BIT(RCC_C2->APB1HENR, RCC_APB1HENR_OPAMPEN);\\r
3670                                         UNUSED(tmpreg); \\r
3671                                        } while(0)\r
3672 \r
3673 #define __HAL_RCC_C2_MDIOS_CLK_ENABLE()   do { \\r
3674                                         __IO uint32_t tmpreg; \\r
3675                                         SET_BIT(RCC_C2->APB1HENR, RCC_APB1HENR_MDIOSEN);\\r
3676                                         /* Delay after an RCC peripheral clock enabling */ \\r
3677                                         tmpreg = READ_BIT(RCC_C2->APB1HENR, RCC_APB1HENR_MDIOSEN);\\r
3678                                         UNUSED(tmpreg); \\r
3679                                        } while(0)\r
3680 \r
3681 #define __HAL_RCC_C2_FDCAN_CLK_ENABLE()   do { \\r
3682                                         __IO uint32_t tmpreg; \\r
3683                                         SET_BIT(RCC_C2->APB1HENR, RCC_APB1HENR_FDCANEN);\\r
3684                                         /* Delay after an RCC peripheral clock enabling */ \\r
3685                                         tmpreg = READ_BIT(RCC_C2->APB1HENR, RCC_APB1HENR_FDCANEN);\\r
3686                                         UNUSED(tmpreg); \\r
3687                                        } while(0)\r
3688 \r
3689 \r
3690 #define __HAL_RCC_C2_TIM2_CLK_DISABLE()           (RCC_C2->APB1LENR) &= ~ (RCC_APB1LENR_TIM2EN)\r
3691 #define __HAL_RCC_C2_TIM3_CLK_DISABLE()           (RCC_C2->APB1LENR) &= ~ (RCC_APB1LENR_TIM3EN)\r
3692 #define __HAL_RCC_C2_TIM4_CLK_DISABLE()           (RCC_C2->APB1LENR) &= ~ (RCC_APB1LENR_TIM4EN)\r
3693 #define __HAL_RCC_C2_TIM5_CLK_DISABLE()           (RCC_C2->APB1LENR) &= ~ (RCC_APB1LENR_TIM5EN)\r
3694 #define __HAL_RCC_C2_TIM6_CLK_DISABLE()           (RCC_C2->APB1LENR) &= ~ (RCC_APB1LENR_TIM6EN)\r
3695 #define __HAL_RCC_C2_TIM7_CLK_DISABLE()           (RCC_C2->APB1LENR) &= ~ (RCC_APB1LENR_TIM7EN)\r
3696 #define __HAL_RCC_C2_TIM12_CLK_DISABLE()          (RCC_C2->APB1LENR) &= ~ (RCC_APB1LENR_TIM12EN)\r
3697 #define __HAL_RCC_C2_TIM13_CLK_DISABLE()          (RCC_C2->APB1LENR) &= ~ (RCC_APB1LENR_TIM13EN)\r
3698 #define __HAL_RCC_C2_TIM14_CLK_DISABLE()          (RCC_C2->APB1LENR) &= ~ (RCC_APB1LENR_TIM14EN)\r
3699 #define __HAL_RCC_C2_LPTIM1_CLK_DISABLE()         (RCC_C2->APB1LENR) &= ~ (RCC_APB1LENR_LPTIM1EN)\r
3700 #define __HAL_RCC_C2_WWDG2_CLK_DISABLE()          (RCC_C2->APB1LENR) &= ~ (RCC_APB1LENR_WWDG2EN)\r
3701 #define __HAL_RCC_C2_SPI2_CLK_DISABLE()           (RCC_C2->APB1LENR) &= ~ (RCC_APB1LENR_SPI2EN)\r
3702 #define __HAL_RCC_C2_SPI3_CLK_DISABLE()           (RCC_C2->APB1LENR) &= ~ (RCC_APB1LENR_SPI3EN)\r
3703 #define __HAL_RCC_C2_SPDIFRX_CLK_DISABLE()        (RCC_C2->APB1LENR) &= ~ (RCC_APB1LENR_SPDIFRXEN)\r
3704 #define __HAL_RCC_C2_USART2_CLK_DISABLE()         (RCC_C2->APB1LENR) &= ~ (RCC_APB1LENR_USART2EN)\r
3705 #define __HAL_RCC_C2_USART3_CLK_DISABLE()         (RCC_C2->APB1LENR) &= ~ (RCC_APB1LENR_USART3EN)\r
3706 #define __HAL_RCC_C2_UART4_CLK_DISABLE()          (RCC_C2->APB1LENR) &= ~ (RCC_APB1LENR_UART4EN)\r
3707 #define __HAL_RCC_C2_UART5_CLK_DISABLE()          (RCC_C2->APB1LENR) &= ~ (RCC_APB1LENR_UART5EN)\r
3708 #define __HAL_RCC_C2_I2C1_CLK_DISABLE()           (RCC_C2->APB1LENR) &= ~ (RCC_APB1LENR_I2C1EN)\r
3709 #define __HAL_RCC_C2_I2C2_CLK_DISABLE()           (RCC_C2->APB1LENR) &= ~ (RCC_APB1LENR_I2C2EN)\r
3710 #define __HAL_RCC_C2_I2C3_CLK_DISABLE()           (RCC_C2->APB1LENR) &= ~ (RCC_APB1LENR_I2C3EN)\r
3711 #define __HAL_RCC_C2_CEC_CLK_DISABLE()            (RCC_C2->APB1LENR) &= ~ (RCC_APB1LENR_CECEN)\r
3712 #define __HAL_RCC_C2_DAC12_CLK_DISABLE()          (RCC_C2->APB1LENR) &= ~ (RCC_APB1LENR_DAC12EN)\r
3713 #define __HAL_RCC_C2_UART7_CLK_DISABLE()         (RCC_C2->APB1LENR) &= ~ (RCC_APB1LENR_UART7EN)\r
3714 #define __HAL_RCC_C2_UART8_CLK_DISABLE()         (RCC_C2->APB1LENR) &= ~ (RCC_APB1LENR_UART8EN)\r
3715 #define __HAL_RCC_C2_CRS_CLK_DISABLE()            (RCC_C2->APB1HENR) &= ~ (RCC_APB1HENR_CRSEN)\r
3716 #define __HAL_RCC_C2_SWPMI_CLK_DISABLE()          (RCC_C2->APB1HENR) &= ~ (RCC_APB1HENR_SWPMIEN)\r
3717 #define __HAL_RCC_C2_OPAMP_CLK_DISABLE()          (RCC_C2->APB1HENR) &= ~ (RCC_APB1HENR_OPAMPEN)\r
3718 #define __HAL_RCC_C2_MDIOS_CLK_DISABLE()          (RCC_C2->APB1HENR) &= ~ (RCC_APB1HENR_MDIOSEN)\r
3719 #define __HAL_RCC_C2_FDCAN_CLK_DISABLE()          (RCC_C2->APB1HENR) &= ~ (RCC_APB1HENR_FDCANEN)\r
3720 \r
3721 /** @brief  Enable or disable the APB2 peripheral clock.\r
3722   * @note   After reset, the peripheral clock (used for registers read/write access)\r
3723   *         is disabled and the application software has to enable this clock before\r
3724   *         using it.\r
3725   */\r
3726 \r
3727 #define __HAL_RCC_C2_TIM1_CLK_ENABLE()   do { \\r
3728                                         __IO uint32_t tmpreg; \\r
3729                                         SET_BIT(RCC_C2->APB2ENR, RCC_APB2ENR_TIM1EN);\\r
3730                                         /* Delay after an RCC peripheral clock enabling */ \\r
3731                                         tmpreg = READ_BIT(RCC_C2->APB2ENR, RCC_APB2ENR_TIM1EN);\\r
3732                                         UNUSED(tmpreg); \\r
3733                                        } while(0)\r
3734 \r
3735 #define __HAL_RCC_C2_TIM8_CLK_ENABLE()   do { \\r
3736                                         __IO uint32_t tmpreg; \\r
3737                                         SET_BIT(RCC_C2->APB2ENR, RCC_APB2ENR_TIM8EN);\\r
3738                                         /* Delay after an RCC peripheral clock enabling */ \\r
3739                                         tmpreg = READ_BIT(RCC_C2->APB2ENR, RCC_APB2ENR_TIM8EN);\\r
3740                                         UNUSED(tmpreg); \\r
3741                                        } while(0)\r
3742 \r
3743 #define __HAL_RCC_C2_USART1_CLK_ENABLE()   do { \\r
3744                                         __IO uint32_t tmpreg; \\r
3745                                         SET_BIT(RCC_C2->APB2ENR, RCC_APB2ENR_USART1EN);\\r
3746                                         /* Delay after an RCC peripheral clock enabling */ \\r
3747                                         tmpreg = READ_BIT(RCC_C2->APB2ENR, RCC_APB2ENR_USART1EN);\\r
3748                                         UNUSED(tmpreg); \\r
3749                                        } while(0)\r
3750 \r
3751 #define __HAL_RCC_C2_USART6_CLK_ENABLE()   do { \\r
3752                                         __IO uint32_t tmpreg; \\r
3753                                         SET_BIT(RCC_C2->APB2ENR, RCC_APB2ENR_USART6EN);\\r
3754                                         /* Delay after an RCC peripheral clock enabling */ \\r
3755                                         tmpreg = READ_BIT(RCC_C2->APB2ENR, RCC_APB2ENR_USART6EN);\\r
3756                                         UNUSED(tmpreg); \\r
3757                                        } while(0)\r
3758 \r
3759 #define __HAL_RCC_C2_SPI1_CLK_ENABLE()   do { \\r
3760                                         __IO uint32_t tmpreg; \\r
3761                                         SET_BIT(RCC_C2->APB2ENR, RCC_APB2ENR_SPI1EN);\\r
3762                                         /* Delay after an RCC peripheral clock enabling */ \\r
3763                                         tmpreg = READ_BIT(RCC_C2->APB2ENR, RCC_APB2ENR_SPI1EN);\\r
3764                                         UNUSED(tmpreg); \\r
3765                                        } while(0)\r
3766 \r
3767 #define __HAL_RCC_C2_SPI4_CLK_ENABLE()   do { \\r
3768                                         __IO uint32_t tmpreg; \\r
3769                                         SET_BIT(RCC_C2->APB2ENR, RCC_APB2ENR_SPI4EN);\\r
3770                                         /* Delay after an RCC peripheral clock enabling */ \\r
3771                                         tmpreg = READ_BIT(RCC_C2->APB2ENR, RCC_APB2ENR_SPI4EN);\\r
3772                                         UNUSED(tmpreg); \\r
3773                                        } while(0)\r
3774 \r
3775 #define __HAL_RCC_C2_TIM15_CLK_ENABLE()   do { \\r
3776                                         __IO uint32_t tmpreg; \\r
3777                                         SET_BIT(RCC_C2->APB2ENR, RCC_APB2ENR_TIM15EN);\\r
3778                                         /* Delay after an RCC peripheral clock enabling */ \\r
3779                                         tmpreg = READ_BIT(RCC_C2->APB2ENR, RCC_APB2ENR_TIM15EN);\\r
3780                                         UNUSED(tmpreg); \\r
3781                                        } while(0)\r
3782 \r
3783 #define __HAL_RCC_C2_TIM16_CLK_ENABLE()   do { \\r
3784                                         __IO uint32_t tmpreg; \\r
3785                                         SET_BIT(RCC_C2->APB2ENR, RCC_APB2ENR_TIM16EN);\\r
3786                                         /* Delay after an RCC peripheral clock enabling */ \\r
3787                                         tmpreg = READ_BIT(RCC_C2->APB2ENR, RCC_APB2ENR_TIM16EN);\\r
3788                                         UNUSED(tmpreg); \\r
3789                                        } while(0)\r
3790 \r
3791 #define __HAL_RCC_C2_TIM17_CLK_ENABLE()   do { \\r
3792                                         __IO uint32_t tmpreg; \\r
3793                                         SET_BIT(RCC_C2->APB2ENR, RCC_APB2ENR_TIM17EN);\\r
3794                                         /* Delay after an RCC peripheral clock enabling */ \\r
3795                                         tmpreg = READ_BIT(RCC_C2->APB2ENR, RCC_APB2ENR_TIM17EN);\\r
3796                                         UNUSED(tmpreg); \\r
3797                                        } while(0)\r
3798 \r
3799 #define __HAL_RCC_C2_SPI5_CLK_ENABLE()   do { \\r
3800                                         __IO uint32_t tmpreg; \\r
3801                                         SET_BIT(RCC_C2->APB2ENR, RCC_APB2ENR_SPI5EN);\\r
3802                                         /* Delay after an RCC peripheral clock enabling */ \\r
3803                                         tmpreg = READ_BIT(RCC_C2->APB2ENR, RCC_APB2ENR_SPI5EN);\\r
3804                                         UNUSED(tmpreg); \\r
3805                                        } while(0)\r
3806 \r
3807 #define __HAL_RCC_C2_SAI1_CLK_ENABLE()   do { \\r
3808                                         __IO uint32_t tmpreg; \\r
3809                                         SET_BIT(RCC_C2->APB2ENR, RCC_APB2ENR_SAI1EN);\\r
3810                                         /* Delay after an RCC peripheral clock enabling */ \\r
3811                                         tmpreg = READ_BIT(RCC_C2->APB2ENR, RCC_APB2ENR_SAI1EN);\\r
3812                                         UNUSED(tmpreg); \\r
3813                                        } while(0)\r
3814 \r
3815 #define __HAL_RCC_C2_SAI2_CLK_ENABLE()   do { \\r
3816                                         __IO uint32_t tmpreg; \\r
3817                                         SET_BIT(RCC_C2->APB2ENR, RCC_APB2ENR_SAI2EN);\\r
3818                                         /* Delay after an RCC peripheral clock enabling */ \\r
3819                                         tmpreg = READ_BIT(RCC_C2->APB2ENR, RCC_APB2ENR_SAI2EN);\\r
3820                                         UNUSED(tmpreg); \\r
3821                                        } while(0)\r
3822 \r
3823 #define __HAL_RCC_C2_SAI3_CLK_ENABLE()   do { \\r
3824                                         __IO uint32_t tmpreg; \\r
3825                                         SET_BIT(RCC_C2->APB2ENR, RCC_APB2ENR_SAI3EN);\\r
3826                                         /* Delay after an RCC peripheral clock enabling */ \\r
3827                                         tmpreg = READ_BIT(RCC_C2->APB2ENR, RCC_APB2ENR_SAI3EN);\\r
3828                                         UNUSED(tmpreg); \\r
3829                                        } while(0)\r
3830 \r
3831 #define __HAL_RCC_C2_DFSDM1_CLK_ENABLE()   do { \\r
3832                                         __IO uint32_t tmpreg; \\r
3833                                         SET_BIT(RCC_C2->APB2ENR, RCC_APB2ENR_DFSDM1EN);\\r
3834                                         /* Delay after an RCC peripheral clock enabling */ \\r
3835                                         tmpreg = READ_BIT(RCC_C2->APB2ENR, RCC_APB2ENR_DFSDM1EN);\\r
3836                                         UNUSED(tmpreg); \\r
3837                                        } while(0)\r
3838 \r
3839 #define __HAL_RCC_C2_HRTIM1_CLK_ENABLE()   do { \\r
3840                                         __IO uint32_t tmpreg; \\r
3841                                         SET_BIT(RCC_C2->APB2ENR, RCC_APB2ENR_HRTIMEN);\\r
3842                                         /* Delay after an RCC peripheral clock enabling */ \\r
3843                                         tmpreg = READ_BIT(RCC_C2->APB2ENR, RCC_APB2ENR_HRTIMEN);\\r
3844                                         UNUSED(tmpreg); \\r
3845                                        } while(0)\r
3846 \r
3847 #define __HAL_RCC_C2_TIM1_CLK_DISABLE()           (RCC_C2->APB2ENR) &= ~ (RCC_APB2ENR_TIM1EN)\r
3848 #define __HAL_RCC_C2_TIM8_CLK_DISABLE()           (RCC_C2->APB2ENR) &= ~ (RCC_APB2ENR_TIM8EN)\r
3849 #define __HAL_RCC_C2_USART1_CLK_DISABLE()         (RCC_C2->APB2ENR) &= ~ (RCC_APB2ENR_USART1EN)\r
3850 #define __HAL_RCC_C2_USART6_CLK_DISABLE()         (RCC_C2->APB2ENR) &= ~ (RCC_APB2ENR_USART6EN)\r
3851 #define __HAL_RCC_C2_SPI1_CLK_DISABLE()           (RCC_C2->APB2ENR) &= ~ (RCC_APB2ENR_SPI1EN)\r
3852 #define __HAL_RCC_C2_SPI4_CLK_DISABLE()           (RCC_C2->APB2ENR) &= ~ (RCC_APB2ENR_SPI4EN)\r
3853 #define __HAL_RCC_C2_TIM15_CLK_DISABLE()          (RCC_C2->APB2ENR) &= ~ (RCC_APB2ENR_TIM15EN)\r
3854 #define __HAL_RCC_C2_TIM16_CLK_DISABLE()          (RCC_C2->APB2ENR) &= ~ (RCC_APB2ENR_TIM16EN)\r
3855 #define __HAL_RCC_C2_TIM17_CLK_DISABLE()          (RCC_C2->APB2ENR) &= ~ (RCC_APB2ENR_TIM17EN)\r
3856 #define __HAL_RCC_C2_SPI5_CLK_DISABLE()           (RCC_C2->APB2ENR) &= ~ (RCC_APB2ENR_SPI5EN)\r
3857 #define __HAL_RCC_C2_SAI1_CLK_DISABLE()           (RCC_C2->APB2ENR) &= ~ (RCC_APB2ENR_SAI1EN)\r
3858 #define __HAL_RCC_C2_SAI2_CLK_DISABLE()           (RCC_C2->APB2ENR) &= ~ (RCC_APB2ENR_SAI2EN)\r
3859 #define __HAL_RCC_C2_SAI3_CLK_DISABLE()           (RCC_C2->APB2ENR) &= ~ (RCC_APB2ENR_SAI3EN)\r
3860 #define __HAL_RCC_C2_DFSDM1_CLK_DISABLE()         (RCC_C2->APB2ENR) &= ~ (RCC_APB2ENR_DFSDM1EN)\r
3861 #define __HAL_RCC_C2_HRTIM1_CLK_DISABLE()         (RCC_C2->APB2ENR) &= ~ (RCC_APB2ENR_HRTIMEN)\r
3862 \r
3863 /** @brief  Enable or disable the APB4 peripheral clock.\r
3864   * @note   After reset, the peripheral clock (used for registers read/write access)\r
3865   *         is disabled and the application software has to enable this clock before\r
3866   *         using it.\r
3867   */\r
3868 \r
3869 #define __HAL_RCC_C2_SYSCFG_CLK_ENABLE()   do { \\r
3870                                         __IO uint32_t tmpreg; \\r
3871                                         SET_BIT(RCC_C2->APB4ENR, RCC_APB4ENR_SYSCFGEN);\\r
3872                                         /* Delay after an RCC peripheral clock enabling */ \\r
3873                                         tmpreg = READ_BIT(RCC_C2->APB4ENR, RCC_APB4ENR_SYSCFGEN);\\r
3874                                         UNUSED(tmpreg); \\r
3875                                        } while(0)\r
3876 \r
3877 #define __HAL_RCC_C2_LPUART1_CLK_ENABLE()   do { \\r
3878                                         __IO uint32_t tmpreg; \\r
3879                                         SET_BIT(RCC_C2->APB4ENR, RCC_APB4ENR_LPUART1EN);\\r
3880                                         /* Delay after an RCC peripheral clock enabling */ \\r
3881                                         tmpreg = READ_BIT(RCC_C2->APB4ENR, RCC_APB4ENR_LPUART1EN);\\r
3882                                         UNUSED(tmpreg); \\r
3883                                        } while(0)\r
3884 \r
3885 #define __HAL_RCC_C2_SPI6_CLK_ENABLE()   do { \\r
3886                                         __IO uint32_t tmpreg; \\r
3887                                         SET_BIT(RCC_C2->APB4ENR, RCC_APB4ENR_SPI6EN);\\r
3888                                         /* Delay after an RCC peripheral clock enabling */ \\r
3889                                         tmpreg = READ_BIT(RCC_C2->APB4ENR, RCC_APB4ENR_SPI6EN);\\r
3890                                         UNUSED(tmpreg); \\r
3891                                        } while(0)\r
3892 \r
3893 #define __HAL_RCC_C2_I2C4_CLK_ENABLE()   do { \\r
3894                                         __IO uint32_t tmpreg; \\r
3895                                         SET_BIT(RCC_C2->APB4ENR, RCC_APB4ENR_I2C4EN);\\r
3896                                         /* Delay after an RCC peripheral clock enabling */ \\r
3897                                         tmpreg = READ_BIT(RCC_C2->APB4ENR, RCC_APB4ENR_I2C4EN);\\r
3898                                         UNUSED(tmpreg); \\r
3899                                        } while(0)\r
3900 \r
3901 #define __HAL_RCC_C2_LPTIM2_CLK_ENABLE()   do { \\r
3902                                         __IO uint32_t tmpreg; \\r
3903                                         SET_BIT(RCC_C2->APB4ENR, RCC_APB4ENR_LPTIM2EN);\\r
3904                                         /* Delay after an RCC peripheral clock enabling */ \\r
3905                                         tmpreg = READ_BIT(RCC_C2->APB4ENR, RCC_APB4ENR_LPTIM2EN);\\r
3906                                         UNUSED(tmpreg); \\r
3907                                        } while(0)\r
3908 \r
3909 #define __HAL_RCC_C2_LPTIM3_CLK_ENABLE()   do { \\r
3910                                         __IO uint32_t tmpreg; \\r
3911                                         SET_BIT(RCC_C2->APB4ENR, RCC_APB4ENR_LPTIM3EN);\\r
3912                                         /* Delay after an RCC peripheral clock enabling */ \\r
3913                                         tmpreg = READ_BIT(RCC_C2->APB4ENR, RCC_APB4ENR_LPTIM3EN);\\r
3914                                         UNUSED(tmpreg); \\r
3915                                        } while(0)\r
3916 \r
3917 #define __HAL_RCC_C2_LPTIM4_CLK_ENABLE()   do { \\r
3918                                         __IO uint32_t tmpreg; \\r
3919                                         SET_BIT(RCC_C2->APB4ENR, RCC_APB4ENR_LPTIM4EN);\\r
3920                                         /* Delay after an RCC peripheral clock enabling */ \\r
3921                                         tmpreg = READ_BIT(RCC_C2->APB4ENR, RCC_APB4ENR_LPTIM4EN);\\r
3922                                         UNUSED(tmpreg); \\r
3923                                        } while(0)\r
3924 \r
3925 #define __HAL_RCC_C2_LPTIM5_CLK_ENABLE()   do { \\r
3926                                         __IO uint32_t tmpreg; \\r
3927                                         SET_BIT(RCC_C2->APB4ENR, RCC_APB4ENR_LPTIM5EN);\\r
3928                                         /* Delay after an RCC peripheral clock enabling */ \\r
3929                                         tmpreg = READ_BIT(RCC_C2->APB4ENR, RCC_APB4ENR_LPTIM5EN);\\r
3930                                         UNUSED(tmpreg); \\r
3931                                        } while(0)\r
3932 \r
3933 #define __HAL_RCC_C2_COMP12_CLK_ENABLE()   do { \\r
3934                                         __IO uint32_t tmpreg; \\r
3935                                         SET_BIT(RCC_C2->APB4ENR, RCC_APB4ENR_COMP12EN);\\r
3936                                         /* Delay after an RCC peripheral clock enabling */ \\r
3937                                         tmpreg = READ_BIT(RCC_C2->APB4ENR, RCC_APB4ENR_COMP12EN);\\r
3938                                         UNUSED(tmpreg); \\r
3939                                        } while(0)\r
3940 \r
3941 #define __HAL_RCC_C2_VREF_CLK_ENABLE()   do { \\r
3942                                         __IO uint32_t tmpreg; \\r
3943                                         SET_BIT(RCC_C2->APB4ENR, RCC_APB4ENR_VREFEN);\\r
3944                                         /* Delay after an RCC peripheral clock enabling */ \\r
3945                                         tmpreg = READ_BIT(RCC_C2->APB4ENR, RCC_APB4ENR_VREFEN);\\r
3946                                         UNUSED(tmpreg); \\r
3947                                        } while(0)\r
3948 \r
3949 #define __HAL_RCC_C2_RTC_CLK_ENABLE()   do { \\r
3950                                         __IO uint32_t tmpreg; \\r
3951                                         SET_BIT(RCC_C2->APB4ENR, RCC_APB4ENR_RTCAPBEN);\\r
3952                                         /* Delay after an RCC peripheral clock enabling */ \\r
3953                                         tmpreg = READ_BIT(RCC_C2->APB4ENR, RCC_APB4ENR_RTCAPBEN);\\r
3954                                         UNUSED(tmpreg); \\r
3955                                        } while(0)\r
3956 \r
3957 #define __HAL_RCC_C2_SAI4_CLK_ENABLE()   do { \\r
3958                                         __IO uint32_t tmpreg; \\r
3959                                         SET_BIT(RCC_C2->APB4ENR, RCC_APB4ENR_SAI4EN);\\r
3960                                         /* Delay after an RCC peripheral clock enabling */ \\r
3961                                         tmpreg = READ_BIT(RCC_C2->APB4ENR, RCC_APB4ENR_SAI4EN);\\r
3962                                         UNUSED(tmpreg); \\r
3963                                        } while(0)\r
3964 \r
3965 \r
3966 \r
3967 #define __HAL_RCC_C2_SYSCFG_CLK_DISABLE()           (RCC_C2->APB4ENR) &= ~ (RCC_APB4ENR_SYSCFGEN)\r
3968 #define __HAL_RCC_C2_LPUART1_CLK_DISABLE()          (RCC_C2->APB4ENR) &= ~ (RCC_APB4ENR_LPUART1EN)\r
3969 #define __HAL_RCC_C2_SPI6_CLK_DISABLE()             (RCC_C2->APB4ENR) &= ~ (RCC_APB4ENR_SPI6EN)\r
3970 #define __HAL_RCC_C2_I2C4_CLK_DISABLE()             (RCC_C2->APB4ENR) &= ~ (RCC_APB4ENR_I2C4EN)\r
3971 #define __HAL_RCC_C2_LPTIM2_CLK_DISABLE()           (RCC_C2->APB4ENR) &= ~ (RCC_APB4ENR_LPTIM2EN)\r
3972 #define __HAL_RCC_C2_LPTIM3_CLK_DISABLE()           (RCC_C2->APB4ENR) &= ~ (RCC_APB4ENR_LPTIM3EN)\r
3973 #define __HAL_RCC_C2_LPTIM4_CLK_DISABLE()           (RCC_C2->APB4ENR) &= ~ (RCC_APB4ENR_LPTIM4EN)\r
3974 #define __HAL_RCC_C2_LPTIM5_CLK_DISABLE()           (RCC_C2->APB4ENR) &= ~ (RCC_APB4ENR_LPTIM5EN)\r
3975 #define __HAL_RCC_C2_COMP12_CLK_DISABLE()           (RCC_C2->APB4ENR) &= ~ (RCC_APB4ENR_COMP12EN)\r
3976 #define __HAL_RCC_C2_VREF_CLK_DISABLE()             (RCC_C2->APB4ENR) &= ~ (RCC_APB4ENR_VREFEN)\r
3977 #define __HAL_RCC_C2_RTC_CLK_DISABLE()              (RCC_C2->APB4ENR) &= ~ (RCC_APB4ENR_RTCAPBEN)\r
3978 #define __HAL_RCC_C2_SAI4_CLK_DISABLE()             (RCC_C2->APB4ENR) &= ~ (RCC_APB4ENR_SAI4EN)\r
3979 \r
3980 #endif /*DUAL_CORE*/\r
3981 \r
3982 /** @brief  Enable or disable the AHB3 peripheral reset.\r
3983   */\r
3984 \r
3985 #define __HAL_RCC_AHB3_FORCE_RESET()          (RCC->AHB3RSTR = 0xFFFFFFFFU)\r
3986 #define __HAL_RCC_MDMA_FORCE_RESET()          (RCC->AHB3RSTR |= (RCC_AHB3RSTR_MDMARST))\r
3987 #define __HAL_RCC_DMA2D_FORCE_RESET()         (RCC->AHB3RSTR |= (RCC_AHB3RSTR_DMA2DRST))\r
3988 \r
3989 #if defined(JPEG)\r
3990 #define __HAL_RCC_JPGDECRST_FORCE_RESET()     (RCC->AHB3RSTR |= (RCC_AHB3RSTR_JPGDECRST))\r
3991 #endif /* JPEG */\r
3992 \r
3993 #define __HAL_RCC_FMC_FORCE_RESET()           (RCC->AHB3RSTR |= (RCC_AHB3RSTR_FMCRST))\r
3994 #define __HAL_RCC_QSPI_FORCE_RESET()          (RCC->AHB3RSTR |= (RCC_AHB3RSTR_QSPIRST))\r
3995 #define __HAL_RCC_SDMMC1_FORCE_RESET()        (RCC->AHB3RSTR |= (RCC_AHB3RSTR_SDMMC1RST))\r
3996 \r
3997 \r
3998 #define __HAL_RCC_AHB3_RELEASE_RESET()        (RCC->AHB3RSTR = 0x00)\r
3999 #define __HAL_RCC_MDMA_RELEASE_RESET()        (RCC->AHB3RSTR &= ~ (RCC_AHB3RSTR_MDMARST))\r
4000 #define __HAL_RCC_DMA2D_RELEASE_RESET()       (RCC->AHB3RSTR &= ~ (RCC_AHB3RSTR_DMA2DRST))\r
4001 \r
4002 #if defined(JPEG)\r
4003 #define __HAL_RCC_JPGDECRST_RELEASE_RESET()   (RCC->AHB3RSTR &= ~ (RCC_AHB3RSTR_JPGDECRST))\r
4004 #endif /* JPEG */\r
4005 \r
4006 #define __HAL_RCC_FMC_RELEASE_RESET()         (RCC->AHB3RSTR &= ~ (RCC_AHB3RSTR_FMCRST))\r
4007 #define __HAL_RCC_QSPI_RELEASE_RESET()        (RCC->AHB3RSTR &= ~ (RCC_AHB3RSTR_QSPIRST))\r
4008 #define __HAL_RCC_SDMMC1_RELEASE_RESET()      (RCC->AHB3RSTR &= ~ (RCC_AHB3RSTR_SDMMC1RST))\r
4009 \r
4010 \r
4011 \r
4012 /** @brief  Force or release the AHB1 peripheral reset.\r
4013   */\r
4014 #define __HAL_RCC_AHB1_FORCE_RESET()             (RCC->AHB1RSTR = 0xFFFFFFFFU)\r
4015 #define __HAL_RCC_DMA1_FORCE_RESET()             (RCC->AHB1RSTR |= (RCC_AHB1RSTR_DMA1RST))\r
4016 #define __HAL_RCC_DMA2_FORCE_RESET()             (RCC->AHB1RSTR |= (RCC_AHB1RSTR_DMA2RST))\r
4017 #define __HAL_RCC_ADC12_FORCE_RESET()            (RCC->AHB1RSTR |= (RCC_AHB1RSTR_ADC12RST))\r
4018 #if defined(DUAL_CORE)\r
4019 #define __HAL_RCC_ART_FORCE_RESET()              (RCC->AHB1RSTR |= (RCC_AHB1RSTR_ARTRST))\r
4020 #endif /*DUAL_CORE*/\r
4021 #define __HAL_RCC_ETH1MAC_FORCE_RESET()          (RCC->AHB1RSTR |= (RCC_AHB1RSTR_ETH1MACRST))\r
4022 #define __HAL_RCC_USB1_OTG_HS_FORCE_RESET()      (RCC->AHB1RSTR |= (RCC_AHB1RSTR_USB1OTGHSRST))\r
4023 #define __HAL_RCC_USB2_OTG_FS_FORCE_RESET()      (RCC->AHB1RSTR |= (RCC_AHB1RSTR_USB2OTGHSRST))\r
4024 \r
4025 #define __HAL_RCC_AHB1_RELEASE_RESET()           (RCC->AHB1RSTR = 0x00U)\r
4026 #define __HAL_RCC_DMA1_RELEASE_RESET()             (RCC->AHB1RSTR &= ~ (RCC_AHB1RSTR_DMA1RST))\r
4027 #define __HAL_RCC_DMA2_RELEASE_RESET()             (RCC->AHB1RSTR &= ~ (RCC_AHB1RSTR_DMA2RST))\r
4028 #define __HAL_RCC_ADC12_RELEASE_RESET()            (RCC->AHB1RSTR &= ~ (RCC_AHB1RSTR_ADC12RST))\r
4029 #if defined(DUAL_CORE)\r
4030 #define __HAL_RCC_ART_RELEASE_RESET()              (RCC->AHB1RSTR &= ~ (RCC_AHB1RSTR_ARTRST))\r
4031 #endif /*DUAL_CORE*/\r
4032 #define __HAL_RCC_ETH1MAC_RELEASE_RESET()          (RCC->AHB1RSTR &= ~ (RCC_AHB1RSTR_ETH1MACRST))\r
4033 #define __HAL_RCC_USB1_OTG_HS_RELEASE_RESET()      (RCC->AHB1RSTR &= ~ (RCC_AHB1RSTR_USB1OTGHSRST))\r
4034 #define __HAL_RCC_USB2_OTG_FS_RELEASE_RESET()      (RCC->AHB1RSTR &= ~ (RCC_AHB1RSTR_USB2OTGHSRST))\r
4035 \r
4036 \r
4037 /** @brief  Force or release the AHB2 peripheral reset.\r
4038   */\r
4039 #define __HAL_RCC_AHB2_FORCE_RESET()           (RCC->AHB2RSTR = 0xFFFFFFFFU)\r
4040 #define __HAL_RCC_DCMI_FORCE_RESET()             (RCC->AHB2RSTR |= (RCC_AHB2RSTR_DCMIRST))\r
4041 #define __HAL_RCC_CRYP_FORCE_RESET()             (RCC->AHB2RSTR |= (RCC_AHB2RSTR_CRYPRST))\r
4042 #define __HAL_RCC_HASH_FORCE_RESET()             (RCC->AHB2RSTR |= (RCC_AHB2RSTR_HASHRST))\r
4043 #define __HAL_RCC_RNG_FORCE_RESET()              (RCC->AHB2RSTR |= (RCC_AHB2RSTR_RNGRST))\r
4044 #define __HAL_RCC_SDMMC2_FORCE_RESET()           (RCC->AHB2RSTR |= (RCC_AHB2RSTR_SDMMC2RST))\r
4045 \r
4046 #define __HAL_RCC_AHB2_RELEASE_RESET()           (RCC->AHB2RSTR = 0x00U)\r
4047 #define __HAL_RCC_DCMI_RELEASE_RESET()             (RCC->AHB2RSTR &= ~ (RCC_AHB2RSTR_DCMIRST))\r
4048 #define __HAL_RCC_CRYP_RELEASE_RESET()             (RCC->AHB2RSTR &= ~ (RCC_AHB2RSTR_CRYPRST))\r
4049 #define __HAL_RCC_HASH_RELEASE_RESET()             (RCC->AHB2RSTR &= ~ (RCC_AHB2RSTR_HASHRST))\r
4050 #define __HAL_RCC_RNG_RELEASE_RESET()              (RCC->AHB2RSTR &= ~ (RCC_AHB2RSTR_RNGRST))\r
4051 #define __HAL_RCC_SDMMC2_RELEASE_RESET()           (RCC->AHB2RSTR &= ~ (RCC_AHB2RSTR_SDMMC2RST))\r
4052 \r
4053 \r
4054 /** @brief  Force or release the AHB4 peripheral reset.\r
4055   */\r
4056 \r
4057 #define __HAL_RCC_AHB4_FORCE_RESET()          (RCC->AHB4RSTR = 0xFFFFFFFFU)\r
4058 #define __HAL_RCC_GPIOA_FORCE_RESET()           (RCC->AHB4RSTR) |= (RCC_AHB4RSTR_GPIOARST)\r
4059 #define __HAL_RCC_GPIOB_FORCE_RESET()           (RCC->AHB4RSTR) |= (RCC_AHB4RSTR_GPIOBRST)\r
4060 #define __HAL_RCC_GPIOC_FORCE_RESET()           (RCC->AHB4RSTR) |= (RCC_AHB4RSTR_GPIOCRST)\r
4061 #define __HAL_RCC_GPIOD_FORCE_RESET()           (RCC->AHB4RSTR) |= (RCC_AHB4RSTR_GPIODRST)\r
4062 #define __HAL_RCC_GPIOE_FORCE_RESET()           (RCC->AHB4RSTR) |= (RCC_AHB4RSTR_GPIOERST)\r
4063 #define __HAL_RCC_GPIOF_FORCE_RESET()           (RCC->AHB4RSTR) |= (RCC_AHB4RSTR_GPIOFRST)\r
4064 #define __HAL_RCC_GPIOG_FORCE_RESET()           (RCC->AHB4RSTR) |= (RCC_AHB4RSTR_GPIOGRST)\r
4065 #define __HAL_RCC_GPIOH_FORCE_RESET()           (RCC->AHB4RSTR) |= (RCC_AHB4RSTR_GPIOHRST)\r
4066 #define __HAL_RCC_GPIOI_FORCE_RESET()           (RCC->AHB4RSTR) |= (RCC_AHB4RSTR_GPIOIRST)\r
4067 #define __HAL_RCC_GPIOJ_FORCE_RESET()           (RCC->AHB4RSTR) |= (RCC_AHB4RSTR_GPIOJRST)\r
4068 #define __HAL_RCC_GPIOK_FORCE_RESET()           (RCC->AHB4RSTR) |= (RCC_AHB4RSTR_GPIOKRST)\r
4069 #define __HAL_RCC_CRC_FORCE_RESET()             (RCC->AHB4RSTR) |= (RCC_AHB4RSTR_CRCRST)\r
4070 #define __HAL_RCC_BDMA_FORCE_RESET()            (RCC->AHB4RSTR) |= (RCC_AHB4RSTR_BDMARST)\r
4071 #define __HAL_RCC_ADC3_FORCE_RESET()            (RCC->AHB4RSTR) |= (RCC_AHB4RSTR_ADC3RST)\r
4072 #define __HAL_RCC_HSEM_FORCE_RESET()            (RCC->AHB4RSTR) |= (RCC_AHB4RSTR_HSEMRST)\r
4073 \r
4074 #define __HAL_RCC_AHB4_RELEASE_RESET()          (RCC->AHB4RSTR = 0x00U)\r
4075 #define __HAL_RCC_GPIOA_RELEASE_RESET()           (RCC->AHB4RSTR) &= ~ (RCC_AHB4RSTR_GPIOARST)\r
4076 #define __HAL_RCC_GPIOB_RELEASE_RESET()           (RCC->AHB4RSTR) &= ~ (RCC_AHB4RSTR_GPIOBRST)\r
4077 #define __HAL_RCC_GPIOC_RELEASE_RESET()           (RCC->AHB4RSTR) &= ~ (RCC_AHB4RSTR_GPIOCRST)\r
4078 #define __HAL_RCC_GPIOD_RELEASE_RESET()           (RCC->AHB4RSTR) &= ~ (RCC_AHB4RSTR_GPIODRST)\r
4079 #define __HAL_RCC_GPIOE_RELEASE_RESET()           (RCC->AHB4RSTR) &= ~ (RCC_AHB4RSTR_GPIOERST)\r
4080 #define __HAL_RCC_GPIOF_RELEASE_RESET()           (RCC->AHB4RSTR) &= ~ (RCC_AHB4RSTR_GPIOFRST)\r
4081 #define __HAL_RCC_GPIOG_RELEASE_RESET()           (RCC->AHB4RSTR) &= ~ (RCC_AHB4RSTR_GPIOGRST)\r
4082 #define __HAL_RCC_GPIOH_RELEASE_RESET()           (RCC->AHB4RSTR) &= ~ (RCC_AHB4RSTR_GPIOHRST)\r
4083 #define __HAL_RCC_GPIOI_RELEASE_RESET()           (RCC->AHB4RSTR) &= ~ (RCC_AHB4RSTR_GPIOIRST)\r
4084 #define __HAL_RCC_GPIOJ_RELEASE_RESET()           (RCC->AHB4RSTR) &= ~ (RCC_AHB4RSTR_GPIOJRST)\r
4085 #define __HAL_RCC_GPIOK_RELEASE_RESET()           (RCC->AHB4RSTR) &= ~ (RCC_AHB4RSTR_GPIOKRST)\r
4086 #define __HAL_RCC_CRC_RELEASE_RESET()             (RCC->AHB4RSTR) &= ~ (RCC_AHB4RSTR_CRCRST)\r
4087 #define __HAL_RCC_BDMA_RELEASE_RESET()            (RCC->AHB4RSTR) &= ~ (RCC_AHB4RSTR_BDMARST)\r
4088 #define __HAL_RCC_ADC3_RELEASE_RESET()            (RCC->AHB4RSTR) &= ~ (RCC_AHB4RSTR_ADC3RST)\r
4089 #define __HAL_RCC_HSEM_RELEASE_RESET()            (RCC->AHB4RSTR) &= ~ (RCC_AHB4RSTR_HSEMRST)\r
4090 \r
4091 \r
4092 /** @brief  Force or release the APB3 peripheral reset.\r
4093   */\r
4094 #define __HAL_RCC_APB3_FORCE_RESET()         (RCC->APB3RSTR = 0xFFFFFFFFU)\r
4095 \r
4096 #if defined(LTDC)\r
4097 #define __HAL_RCC_LTDC_FORCE_RESET()           (RCC->APB3RSTR) |= (RCC_APB3RSTR_LTDCRST)\r
4098 #endif /* LTDC */\r
4099 \r
4100 #if defined(DSI)\r
4101 #define __HAL_RCC_DSI_FORCE_RESET()            (RCC->APB3RSTR) |= (RCC_APB3RSTR_DSIRST)\r
4102 #endif /*DSI*/\r
4103 \r
4104 #define __HAL_RCC_APB3_RELEASE_RESET()         (RCC->APB3RSTR = 0x00U)\r
4105 \r
4106 #if defined(LTDC)\r
4107 #define __HAL_RCC_LTDC_RELEASE_RESET()           (RCC->APB3RSTR) &= ~ (RCC_APB3RSTR_LTDCRST)\r
4108 #endif /* LTDC */\r
4109 \r
4110 #if defined(DSI)\r
4111 #define __HAL_RCC_DSI_RELEASE_RESET()            (RCC->APB3RSTR) &= ~ (RCC_APB3RSTR_DSIRST)\r
4112 #endif /*DSI*/\r
4113 \r
4114 /** @brief  Force or release the APB1 peripheral reset.\r
4115   */\r
4116 #define __HAL_RCC_APB1L_FORCE_RESET()        (RCC->APB1LRSTR = 0xFFFFFFFFU)\r
4117 #define __HAL_RCC_APB1H_FORCE_RESET()        (RCC->APB1HRSTR = 0xFFFFFFFFU)\r
4118 #define __HAL_RCC_TIM2_FORCE_RESET()           (RCC->APB1LRSTR) |= (RCC_APB1LRSTR_TIM2RST)\r
4119 #define __HAL_RCC_TIM3_FORCE_RESET()           (RCC->APB1LRSTR) |= (RCC_APB1LRSTR_TIM3RST)\r
4120 #define __HAL_RCC_TIM4_FORCE_RESET()           (RCC->APB1LRSTR) |= (RCC_APB1LRSTR_TIM4RST)\r
4121 #define __HAL_RCC_TIM5_FORCE_RESET()           (RCC->APB1LRSTR) |= (RCC_APB1LRSTR_TIM5RST)\r
4122 #define __HAL_RCC_TIM6_FORCE_RESET()           (RCC->APB1LRSTR) |= (RCC_APB1LRSTR_TIM6RST)\r
4123 #define __HAL_RCC_TIM7_FORCE_RESET()           (RCC->APB1LRSTR) |= (RCC_APB1LRSTR_TIM7RST)\r
4124 #define __HAL_RCC_TIM12_FORCE_RESET()          (RCC->APB1LRSTR) |= (RCC_APB1LRSTR_TIM12RST)\r
4125 #define __HAL_RCC_TIM13_FORCE_RESET()          (RCC->APB1LRSTR) |= (RCC_APB1LRSTR_TIM13RST)\r
4126 #define __HAL_RCC_TIM14_FORCE_RESET()          (RCC->APB1LRSTR) |= (RCC_APB1LRSTR_TIM14RST)\r
4127 #define __HAL_RCC_LPTIM1_FORCE_RESET()         (RCC->APB1LRSTR) |= (RCC_APB1LRSTR_LPTIM1RST)\r
4128 #define __HAL_RCC_SPI2_FORCE_RESET()           (RCC->APB1LRSTR) |= (RCC_APB1LRSTR_SPI2RST)\r
4129 #define __HAL_RCC_SPI3_FORCE_RESET()           (RCC->APB1LRSTR) |= (RCC_APB1LRSTR_SPI3RST)\r
4130 #define __HAL_RCC_SPDIFRX_FORCE_RESET()        (RCC->APB1LRSTR) |= (RCC_APB1LRSTR_SPDIFRXRST)\r
4131 #define __HAL_RCC_USART2_FORCE_RESET()         (RCC->APB1LRSTR) |= (RCC_APB1LRSTR_USART2RST)\r
4132 #define __HAL_RCC_USART3_FORCE_RESET()         (RCC->APB1LRSTR) |= (RCC_APB1LRSTR_USART3RST)\r
4133 #define __HAL_RCC_UART4_FORCE_RESET()          (RCC->APB1LRSTR) |= (RCC_APB1LRSTR_UART4RST)\r
4134 #define __HAL_RCC_UART5_FORCE_RESET()          (RCC->APB1LRSTR) |= (RCC_APB1LRSTR_UART5RST)\r
4135 #define __HAL_RCC_I2C1_FORCE_RESET()           (RCC->APB1LRSTR) |= (RCC_APB1LRSTR_I2C1RST)\r
4136 #define __HAL_RCC_I2C2_FORCE_RESET()           (RCC->APB1LRSTR) |= (RCC_APB1LRSTR_I2C2RST)\r
4137 #define __HAL_RCC_I2C3_FORCE_RESET()           (RCC->APB1LRSTR) |= (RCC_APB1LRSTR_I2C3RST)\r
4138 #define __HAL_RCC_CEC_FORCE_RESET()            (RCC->APB1LRSTR) |= (RCC_APB1LRSTR_CECRST)\r
4139 #define __HAL_RCC_DAC12_FORCE_RESET()          (RCC->APB1LRSTR) |= (RCC_APB1LRSTR_DAC12RST)\r
4140 #define __HAL_RCC_UART7_FORCE_RESET()          (RCC->APB1LRSTR) |= (RCC_APB1LRSTR_UART7RST)\r
4141 #define __HAL_RCC_UART8_FORCE_RESET()          (RCC->APB1LRSTR) |= (RCC_APB1LRSTR_UART8RST)\r
4142 #define __HAL_RCC_CRS_FORCE_RESET()            (RCC->APB1HRSTR) |= (RCC_APB1HRSTR_CRSRST)\r
4143 #define __HAL_RCC_SWPMI1_FORCE_RESET()          (RCC->APB1HRSTR) |= (RCC_APB1HRSTR_SWPMIRST)\r
4144 #define __HAL_RCC_OPAMP_FORCE_RESET()          (RCC->APB1HRSTR) |= (RCC_APB1HRSTR_OPAMPRST)\r
4145 #define __HAL_RCC_MDIOS_FORCE_RESET()          (RCC->APB1HRSTR) |= (RCC_APB1HRSTR_MDIOSRST)\r
4146 #define __HAL_RCC_FDCAN_FORCE_RESET()          (RCC->APB1HRSTR) |= (RCC_APB1HRSTR_FDCANRST)\r
4147 \r
4148 #define __HAL_RCC_APB1L_RELEASE_RESET()       (RCC->APB1LRSTR = 0x00U)\r
4149 #define __HAL_RCC_APB1H_RELEASE_RESET()       (RCC->APB1HRSTR = 0x00U)\r
4150 #define __HAL_RCC_TIM2_RELEASE_RESET()           (RCC->APB1LRSTR) &= ~ (RCC_APB1LRSTR_TIM2RST)\r
4151 #define __HAL_RCC_TIM3_RELEASE_RESET()           (RCC->APB1LRSTR) &= ~ (RCC_APB1LRSTR_TIM3RST)\r
4152 #define __HAL_RCC_TIM4_RELEASE_RESET()           (RCC->APB1LRSTR) &= ~ (RCC_APB1LRSTR_TIM4RST)\r
4153 #define __HAL_RCC_TIM5_RELEASE_RESET()           (RCC->APB1LRSTR) &= ~ (RCC_APB1LRSTR_TIM5RST)\r
4154 #define __HAL_RCC_TIM6_RELEASE_RESET()           (RCC->APB1LRSTR) &= ~ (RCC_APB1LRSTR_TIM6RST)\r
4155 #define __HAL_RCC_TIM7_RELEASE_RESET()           (RCC->APB1LRSTR) &= ~ (RCC_APB1LRSTR_TIM7RST)\r
4156 #define __HAL_RCC_TIM12_RELEASE_RESET()          (RCC->APB1LRSTR) &= ~ (RCC_APB1LRSTR_TIM12RST)\r
4157 #define __HAL_RCC_TIM13_RELEASE_RESET()          (RCC->APB1LRSTR) &= ~ (RCC_APB1LRSTR_TIM13RST)\r
4158 #define __HAL_RCC_TIM14_RELEASE_RESET()          (RCC->APB1LRSTR) &= ~ (RCC_APB1LRSTR_TIM14RST)\r
4159 #define __HAL_RCC_LPTIM1_RELEASE_RESET()         (RCC->APB1LRSTR) &= ~ (RCC_APB1LRSTR_LPTIM1RST)\r
4160 #define __HAL_RCC_SPI2_RELEASE_RESET()           (RCC->APB1LRSTR) &= ~ (RCC_APB1LRSTR_SPI2RST)\r
4161 #define __HAL_RCC_SPI3_RELEASE_RESET()           (RCC->APB1LRSTR) &= ~ (RCC_APB1LRSTR_SPI3RST)\r
4162 #define __HAL_RCC_SPDIFRX_RELEASE_RESET()        (RCC->APB1LRSTR) &= ~ (RCC_APB1LRSTR_SPDIFRXRST)\r
4163 #define __HAL_RCC_USART2_RELEASE_RESET()         (RCC->APB1LRSTR) &= ~ (RCC_APB1LRSTR_USART2RST)\r
4164 #define __HAL_RCC_USART3_RELEASE_RESET()         (RCC->APB1LRSTR) &= ~ (RCC_APB1LRSTR_USART3RST)\r
4165 #define __HAL_RCC_UART4_RELEASE_RESET()          (RCC->APB1LRSTR) &= ~ (RCC_APB1LRSTR_UART4RST)\r
4166 #define __HAL_RCC_UART5_RELEASE_RESET()          (RCC->APB1LRSTR) &= ~ (RCC_APB1LRSTR_UART5RST)\r
4167 #define __HAL_RCC_I2C1_RELEASE_RESET()           (RCC->APB1LRSTR) &= ~ (RCC_APB1LRSTR_I2C1RST)\r
4168 #define __HAL_RCC_I2C2_RELEASE_RESET()           (RCC->APB1LRSTR) &= ~ (RCC_APB1LRSTR_I2C2RST)\r
4169 #define __HAL_RCC_I2C3_RELEASE_RESET()           (RCC->APB1LRSTR) &= ~ (RCC_APB1LRSTR_I2C3RST)\r
4170 #define __HAL_RCC_CEC_RELEASE_RESET()            (RCC->APB1LRSTR) &= ~ (RCC_APB1LRSTR_CECRST)\r
4171 #define __HAL_RCC_DAC12_RELEASE_RESET()          (RCC->APB1LRSTR) &= ~ (RCC_APB1LRSTR_DAC12RST)\r
4172 #define __HAL_RCC_UART7_RELEASE_RESET()          (RCC->APB1LRSTR) &= ~ (RCC_APB1LRSTR_UART7RST)\r
4173 #define __HAL_RCC_UART8_RELEASE_RESET()          (RCC->APB1LRSTR) &= ~ (RCC_APB1LRSTR_UART8RST)\r
4174 #define __HAL_RCC_CRS_RELEASE_RESET()            (RCC->APB1HRSTR) &= ~ (RCC_APB1HRSTR_CRSRST)\r
4175 #define __HAL_RCC_SWPMI1_RELEASE_RESET()          (RCC->APB1HRSTR) &= ~ (RCC_APB1HRSTR_SWPMIRST)\r
4176 #define __HAL_RCC_OPAMP_RELEASE_RESET()          (RCC->APB1HRSTR) &= ~ (RCC_APB1HRSTR_OPAMPRST)\r
4177 #define __HAL_RCC_MDIOS_RELEASE_RESET()          (RCC->APB1HRSTR) &= ~ (RCC_APB1HRSTR_MDIOSRST)\r
4178 #define __HAL_RCC_FDCAN_RELEASE_RESET()          (RCC->APB1HRSTR) &= ~ (RCC_APB1HRSTR_FDCANRST)\r
4179 \r
4180 /** @brief  Force or release the APB2 peripheral reset.\r
4181   */\r
4182 #define __HAL_RCC_APB2_FORCE_RESET()         (RCC->APB2RSTR = 0xFFFFFFFFU)\r
4183 #define __HAL_RCC_TIM1_FORCE_RESET()           (RCC->APB2RSTR) |= (RCC_APB2RSTR_TIM1RST)\r
4184 #define __HAL_RCC_TIM8_FORCE_RESET()           (RCC->APB2RSTR) |= (RCC_APB2RSTR_TIM8RST)\r
4185 #define __HAL_RCC_USART1_FORCE_RESET()         (RCC->APB2RSTR) |= (RCC_APB2RSTR_USART1RST)\r
4186 #define __HAL_RCC_USART6_FORCE_RESET()         (RCC->APB2RSTR) |= (RCC_APB2RSTR_USART6RST)\r
4187 #define __HAL_RCC_SPI1_FORCE_RESET()           (RCC->APB2RSTR) |= (RCC_APB2RSTR_SPI1RST)\r
4188 #define __HAL_RCC_SPI4_FORCE_RESET()           (RCC->APB2RSTR) |= (RCC_APB2RSTR_SPI4RST)\r
4189 #define __HAL_RCC_TIM15_FORCE_RESET()          (RCC->APB2RSTR) |= (RCC_APB2RSTR_TIM15RST)\r
4190 #define __HAL_RCC_TIM16_FORCE_RESET()          (RCC->APB2RSTR) |= (RCC_APB2RSTR_TIM16RST)\r
4191 #define __HAL_RCC_TIM17_FORCE_RESET()          (RCC->APB2RSTR) |= (RCC_APB2RSTR_TIM17RST)\r
4192 #define __HAL_RCC_SPI5_FORCE_RESET()           (RCC->APB2RSTR) |= (RCC_APB2RSTR_SPI5RST)\r
4193 #define __HAL_RCC_SAI1_FORCE_RESET()           (RCC->APB2RSTR) |= (RCC_APB2RSTR_SAI1RST)\r
4194 #define __HAL_RCC_SAI2_FORCE_RESET()           (RCC->APB2RSTR) |= (RCC_APB2RSTR_SAI2RST)\r
4195 #define __HAL_RCC_SAI3_FORCE_RESET()           (RCC->APB2RSTR) |= (RCC_APB2RSTR_SAI3RST)\r
4196 #define __HAL_RCC_DFSDM1_FORCE_RESET()         (RCC->APB2RSTR) |= (RCC_APB2RSTR_DFSDM1RST)\r
4197 #define __HAL_RCC_HRTIM1_FORCE_RESET()         (RCC->APB2RSTR) |= (RCC_APB2RSTR_HRTIMRST)\r
4198 \r
4199 #define __HAL_RCC_APB2_RELEASE_RESET()         (RCC->APB2RSTR = 0x00U)\r
4200 #define __HAL_RCC_TIM1_RELEASE_RESET()           (RCC->APB2RSTR) &= ~ (RCC_APB2RSTR_TIM1RST)\r
4201 #define __HAL_RCC_TIM8_RELEASE_RESET()           (RCC->APB2RSTR) &= ~ (RCC_APB2RSTR_TIM8RST)\r
4202 #define __HAL_RCC_USART1_RELEASE_RESET()         (RCC->APB2RSTR) &= ~ (RCC_APB2RSTR_USART1RST)\r
4203 #define __HAL_RCC_USART6_RELEASE_RESET()         (RCC->APB2RSTR) &= ~ (RCC_APB2RSTR_USART6RST)\r
4204 #define __HAL_RCC_SPI1_RELEASE_RESET()           (RCC->APB2RSTR) &= ~ (RCC_APB2RSTR_SPI1RST)\r
4205 #define __HAL_RCC_SPI4_RELEASE_RESET()           (RCC->APB2RSTR) &= ~ (RCC_APB2RSTR_SPI4RST)\r
4206 #define __HAL_RCC_TIM15_RELEASE_RESET()          (RCC->APB2RSTR) &= ~ (RCC_APB2RSTR_TIM15RST)\r
4207 #define __HAL_RCC_TIM16_RELEASE_RESET()          (RCC->APB2RSTR) &= ~ (RCC_APB2RSTR_TIM16RST)\r
4208 #define __HAL_RCC_TIM17_RELEASE_RESET()          (RCC->APB2RSTR) &= ~ (RCC_APB2RSTR_TIM17RST)\r
4209 #define __HAL_RCC_SPI5_RELEASE_RESET()           (RCC->APB2RSTR) &= ~ (RCC_APB2RSTR_SPI5RST)\r
4210 #define __HAL_RCC_SAI1_RELEASE_RESET()           (RCC->APB2RSTR) &= ~ (RCC_APB2RSTR_SAI1RST)\r
4211 #define __HAL_RCC_SAI2_RELEASE_RESET()           (RCC->APB2RSTR) &= ~ (RCC_APB2RSTR_SAI2RST)\r
4212 #define __HAL_RCC_SAI3_RELEASE_RESET()           (RCC->APB2RSTR) &= ~ (RCC_APB2RSTR_SAI3RST)\r
4213 #define __HAL_RCC_DFSDM1_RELEASE_RESET()         (RCC->APB2RSTR) &= ~ (RCC_APB2RSTR_DFSDM1RST)\r
4214 #define __HAL_RCC_HRTIM1_RELEASE_RESET()         (RCC->APB2RSTR) &= ~ (RCC_APB2RSTR_HRTIMRST)\r
4215 \r
4216 /** @brief  Force or release the APB4 peripheral reset.\r
4217   */\r
4218 \r
4219 #define __HAL_RCC_APB4_FORCE_RESET()           (RCC->APB4RSTR = 0xFFFFFFFFU)\r
4220 #define __HAL_RCC_SYSCFG_FORCE_RESET()           (RCC->APB4RSTR) |= (RCC_APB4RSTR_SYSCFGRST)\r
4221 #define __HAL_RCC_LPUART1_FORCE_RESET()          (RCC->APB4RSTR) |= (RCC_APB4RSTR_LPUART1RST)\r
4222 #define __HAL_RCC_SPI6_FORCE_RESET()             (RCC->APB4RSTR) |= (RCC_APB4RSTR_SPI6RST)\r
4223 #define __HAL_RCC_I2C4_FORCE_RESET()             (RCC->APB4RSTR) |= (RCC_APB4RSTR_I2C4RST)\r
4224 #define __HAL_RCC_LPTIM2_FORCE_RESET()           (RCC->APB4RSTR) |= (RCC_APB4RSTR_LPTIM2RST)\r
4225 #define __HAL_RCC_LPTIM3_FORCE_RESET()           (RCC->APB4RSTR) |= (RCC_APB4RSTR_LPTIM3RST)\r
4226 #define __HAL_RCC_LPTIM4_FORCE_RESET()           (RCC->APB4RSTR) |= (RCC_APB4RSTR_LPTIM4RST)\r
4227 #define __HAL_RCC_LPTIM5_FORCE_RESET()           (RCC->APB4RSTR) |= (RCC_APB4RSTR_LPTIM5RST)\r
4228 #define __HAL_RCC_COMP12_FORCE_RESET()           (RCC->APB4RSTR) |= (RCC_APB4RSTR_COMP12RST)\r
4229 #define __HAL_RCC_VREF_FORCE_RESET()             (RCC->APB4RSTR) |= (RCC_APB4RSTR_VREFRST)\r
4230 #define __HAL_RCC_SAI4_FORCE_RESET()             (RCC->APB4RSTR) |= (RCC_APB4RSTR_SAI4RST)\r
4231 \r
4232 #define __HAL_RCC_APB4_RELEASE_RESET()           (RCC->APB4RSTR = 0x00U)\r
4233 #define __HAL_RCC_SYSCFG_RELEASE_RESET()           (RCC->APB4RSTR) &= ~ (RCC_APB4RSTR_SYSCFGRST)\r
4234 #define __HAL_RCC_LPUART1_RELEASE_RESET()          (RCC->APB4RSTR) &= ~ (RCC_APB4RSTR_LPUART1RST)\r
4235 #define __HAL_RCC_SPI6_RELEASE_RESET()             (RCC->APB4RSTR) &= ~ (RCC_APB4RSTR_SPI6RST)\r
4236 #define __HAL_RCC_I2C4_RELEASE_RESET()             (RCC->APB4RSTR) &= ~ (RCC_APB4RSTR_I2C4RST)\r
4237 #define __HAL_RCC_LPTIM2_RELEASE_RESET()           (RCC->APB4RSTR) &= ~ (RCC_APB4RSTR_LPTIM2RST)\r
4238 #define __HAL_RCC_LPTIM3_RELEASE_RESET()           (RCC->APB4RSTR) &= ~ (RCC_APB4RSTR_LPTIM3RST)\r
4239 #define __HAL_RCC_LPTIM4_RELEASE_RESET()           (RCC->APB4RSTR) &= ~ (RCC_APB4RSTR_LPTIM4RST)\r
4240 #define __HAL_RCC_LPTIM5_RELEASE_RESET()           (RCC->APB4RSTR) &= ~ (RCC_APB4RSTR_LPTIM5RST)\r
4241 #define __HAL_RCC_COMP12_RELEASE_RESET()           (RCC->APB4RSTR) &= ~ (RCC_APB4RSTR_COMP12RST)\r
4242 #define __HAL_RCC_VREF_RELEASE_RESET()             (RCC->APB4RSTR) &= ~ (RCC_APB4RSTR_VREFRST)\r
4243 #define __HAL_RCC_SAI4_RELEASE_RESET()             (RCC->APB4RSTR) &= ~ (RCC_APB4RSTR_SAI4RST)\r
4244 \r
4245 /** @brief  Enable or disable the AHB3 peripheral clock during Low Power (Sleep) mode.\r
4246   * @note   Peripheral clock gating in SLEEP mode can be used to further reduce\r
4247   *         power consumption.\r
4248   * @note   After wakeup from SLEEP mode, the peripheral clock is enabled again.\r
4249   * @note   By default, all peripheral clocks are enabled during SLEEP mode.\r
4250   */\r
4251 \r
4252 \r
4253 #define __HAL_RCC_MDMA_CLK_SLEEP_ENABLE()            (RCC->AHB3LPENR |= (RCC_AHB3LPENR_MDMALPEN))\r
4254 #define __HAL_RCC_DMA2D_CLK_SLEEP_ENABLE()           (RCC->AHB3LPENR |= (RCC_AHB3LPENR_DMA2DLPEN))\r
4255 \r
4256 #if defined(JPEG)\r
4257 #define __HAL_RCC_JPGDEC_CLK_SLEEP_ENABLE()          (RCC->AHB3LPENR |= (RCC_AHB3LPENR_JPGDECLPEN))\r
4258 #endif /* JPEG */\r
4259 \r
4260 #define __HAL_RCC_FLASH_CLK_SLEEP_ENABLE()           (RCC->AHB3LPENR |= (RCC_AHB3LPENR_FLASHLPEN))\r
4261 #define __HAL_RCC_FMC_CLK_SLEEP_ENABLE()             (RCC->AHB3LPENR |= (RCC_AHB3LPENR_FMCLPEN))\r
4262 #define __HAL_RCC_QSPI_CLK_SLEEP_ENABLE()            (RCC->AHB3LPENR |= (RCC_AHB3LPENR_QSPILPEN))\r
4263 #define __HAL_RCC_SDMMC1_CLK_SLEEP_ENABLE()          (RCC->AHB3LPENR |= (RCC_AHB3LPENR_SDMMC1LPEN))\r
4264 #define __HAL_RCC_DTCM1_CLK_SLEEP_ENABLE()           (RCC->AHB3LPENR |= (RCC_AHB3LPENR_DTCM1LPEN))\r
4265 #define __HAL_RCC_DTCM2_CLK_SLEEP_ENABLE()           (RCC->AHB3LPENR |= (RCC_AHB3LPENR_DTCM2LPEN))\r
4266 #define __HAL_RCC_ITCM_CLK_SLEEP_ENABLE()            (RCC->AHB3LPENR |= (RCC_AHB3LPENR_ITCMLPEN))\r
4267 #define __HAL_RCC_D1SRAM1_CLK_SLEEP_ENABLE()         (RCC->AHB3LPENR |= (RCC_AHB3LPENR_AXISRAMLPEN))\r
4268 \r
4269 \r
4270 #define __HAL_RCC_MDMA_CLK_SLEEP_DISABLE()            (RCC->AHB3LPENR &= ~ (RCC_AHB3LPENR_MDMALPEN))\r
4271 #define __HAL_RCC_DMA2D_CLK_SLEEP_DISABLE()           (RCC->AHB3LPENR &= ~ (RCC_AHB3LPENR_DMA2DLPEN))\r
4272 \r
4273 #if defined(JPEG)\r
4274 #define __HAL_RCC_JPGDEC_CLK_SLEEP_DISABLE()          (RCC->AHB3LPENR &= ~ (RCC_AHB3LPENR_JPGDECLPEN))\r
4275 #endif /* JPEG */\r
4276 \r
4277 #define __HAL_RCC_FLASH_CLK_SLEEP_DISABLE()           (RCC->AHB3LPENR &= ~ (RCC_AHB3LPENR_FLASHLPEN))\r
4278 #define __HAL_RCC_FMC_CLK_SLEEP_DISABLE()             (RCC->AHB3LPENR &= ~ (RCC_AHB3LPENR_FMCLPEN))\r
4279 #define __HAL_RCC_QSPI_CLK_SLEEP_DISABLE()            (RCC->AHB3LPENR &= ~ (RCC_AHB3LPENR_QSPILPEN))\r
4280 #define __HAL_RCC_SDMMC1_CLK_SLEEP_DISABLE()          (RCC->AHB3LPENR &= ~ (RCC_AHB3LPENR_SDMMC1LPEN))\r
4281 #define __HAL_RCC_DTCM1_CLK_SLEEP_DISABLE()           (RCC->AHB3LPENR &= ~ (RCC_AHB3LPENR_DTCM1LPEN))\r
4282 #define __HAL_RCC_DTCM2_CLK_SLEEP_DISABLE()           (RCC->AHB3LPENR &= ~ (RCC_AHB3LPENR_DTCM2LPEN))\r
4283 #define __HAL_RCC_ITCM_CLK_SLEEP_DISABLE()            (RCC->AHB3LPENR &= ~ (RCC_AHB3LPENR_ITCMLPEN))\r
4284 #define __HAL_RCC_D1SRAM1_CLK_SLEEP_DISABLE()         (RCC->AHB3LPENR &= ~ (RCC_AHB3LPENR_AXISRAMLPEN))\r
4285 \r
4286 \r
4287 /** @brief  Get the enable or disable status of the AHB3 peripheral clock during Low Poser (Sleep) mode.\r
4288   * @note   Peripheral clock gating in SLEEP mode can be used to further reduce\r
4289   *         power consumption.\r
4290   * @note   After wakeup from SLEEP mode, the peripheral clock is enabled again.\r
4291   * @note   By default, all peripheral clocks are enabled during SLEEP mode.\r
4292   */\r
4293 \r
4294 #define __HAL_RCC_MDMA_IS_CLK_SLEEP_ENABLED()             ((RCC->AHB3LPENR & RCC_AHB3LPENR_MDMALPEN)    != 0U)\r
4295 #define __HAL_RCC_DMA2D_IS_CLK_SLEEP_ENABLED()            ((RCC->AHB3LPENR & RCC_AHB3LPENR_DMA2DLPEN)   != 0U)\r
4296 \r
4297 #if defined(JPEG)\r
4298 #define __HAL_RCC_JPGDEC_IS_CLK_SLEEP_ENABLED()           ((RCC->AHB3LPENR & RCC_AHB3LPENR_JPGDECLPEN)  != 0U)\r
4299 #endif /* JPEG */\r
4300 \r
4301 #define __HAL_RCC_FLASH_IS_CLK_SLEEP_ENABLED()            ((RCC->AHB3LPENR & RCC_AHB3LPENR_FLASHLPEN)   != 0U)\r
4302 #define __HAL_RCC_FMC_IS_CLK_SLEEP_ENABLED()              ((RCC->AHB3LPENR & RCC_AHB3LPENR_FMCLPEN)     != 0U)\r
4303 #define __HAL_RCC_QSPI_IS_CLK_SLEEP_ENABLED()             ((RCC->AHB3LPENR & RCC_AHB3LPENR_QSPILPEN)    != 0U)\r
4304 #define __HAL_RCC_SDMMC1_IS_CLK_SLEEP_ENABLED()           ((RCC->AHB3LPENR & RCC_AHB3LPENR_SDMMC1LPEN)  != 0U)\r
4305 #define __HAL_RCC_DTCM1_IS_CLK_SLEEP_ENABLED()            ((RCC->AHB3LPENR & RCC_AHB3LPENR_DTCM1LPEN)   != 0U)\r
4306 #define __HAL_RCC_DTCM2_IS_CLK_SLEEP_ENABLED()            ((RCC->AHB3LPENR & RCC_AHB3LPENR_DTCM2LPEN)   != 0U)\r
4307 #define __HAL_RCC_ITCM_IS_CLK_SLEEP_ENABLED()             ((RCC->AHB3LPENR & RCC_AHB3LPENR_ITCMLPEN)    != 0U)\r
4308 #define __HAL_RCC_D1SRAM1_IS_CLK_SLEEP_ENABLED()          ((RCC->AHB3LPENR & RCC_AHB3LPENR_AXISRAMLPEN) != 0U)\r
4309 \r
4310 #define __HAL_RCC_MDMA_IS_CLK_SLEEP_DISABLED()            ((RCC->AHB3LPENR & RCC_AHB3LPENR_MDMALPEN)    == 0U)\r
4311 #define __HAL_RCC_DMA2D_IS_CLK_SLEEP_DISABLED()           ((RCC->AHB3LPENR & RCC_AHB3LPENR_DMA2DLPEN)   == 0U)\r
4312 \r
4313 #if defined(JPEG)\r
4314 #define __HAL_RCC_JPGDEC_IS_CLK_SLEEP_DISABLED()          ((RCC->AHB3LPENR & RCC_AHB3LPENR_JPGDECLPEN)  == 0U)\r
4315 #endif /* JPEG */\r
4316 \r
4317 #define __HAL_RCC_FLASH_IS_CLK_SLEEP_DISABLED()           ((RCC->AHB3LPENR & RCC_AHB3LPENR_FLASHLPEN)   == 0U)\r
4318 #define __HAL_RCC_FMC_IS_CLK_SLEEP_DISABLED()             ((RCC->AHB3LPENR & RCC_AHB3LPENR_FMCLPEN)     == 0U)\r
4319 #define __HAL_RCC_QSPI_IS_CLK_SLEEP_DISABLED()            ((RCC->AHB3LPENR & RCC_AHB3LPENR_QSPILPEN)    == 0U)\r
4320 #define __HAL_RCC_SDMMC1_IS_CLK_SLEEP_DISABLED()          ((RCC->AHB3LPENR & RCC_AHB3LPENR_SDMMC1LPEN)  == 0U)\r
4321 #define __HAL_RCC_DTCM1_IS_CLK_SLEEP_DISABLED()           ((RCC->AHB3LPENR & RCC_AHB3LPENR_DTCM1LPEN)   == 0U)\r
4322 #define __HAL_RCC_DTCM2_IS_CLK_SLEEP_DISABLED()           ((RCC->AHB3LPENR & RCC_AHB3LPENR_DTCM2LPEN)   == 0U)\r
4323 #define __HAL_RCC_ITCM_IS_CLK_SLEEP_DISABLED()            ((RCC->AHB3LPENR & RCC_AHB3LPENR_ITCMLPEN)    == 0U)\r
4324 #define __HAL_RCC_D1SRAM1_IS_CLK_SLEEP_DISABLED()         ((RCC->AHB3LPENR & RCC_AHB3LPENR_AXISRAMLPEN) == 0U)\r
4325 \r
4326 \r
4327 /** @brief  ENABLE or disable the AHB1 peripheral clock during Low Power (Sleep) mode.\r
4328   * @note   Peripheral clock gating in SLEEP mode can be used to further reduce\r
4329   *         power consumption.\r
4330   * @note   After wakeup from SLEEP mode, the peripheral clock is ENABLEd again.\r
4331   * @note   By default, all peripheral clocks are ENABLEd during SLEEP mode.\r
4332   */\r
4333 \r
4334 #define __HAL_RCC_DMA1_CLK_SLEEP_ENABLE()             (RCC->AHB1LPENR |= (RCC_AHB1LPENR_DMA1LPEN))\r
4335 #define __HAL_RCC_DMA2_CLK_SLEEP_ENABLE()             (RCC->AHB1LPENR |= (RCC_AHB1LPENR_DMA2LPEN))\r
4336 #define __HAL_RCC_ADC12_CLK_SLEEP_ENABLE()            (RCC->AHB1LPENR |= (RCC_AHB1LPENR_ADC12LPEN))\r
4337 #define __HAL_RCC_ETH1MAC_CLK_SLEEP_ENABLE()          (RCC->AHB1LPENR |= (RCC_AHB1LPENR_ETH1MACLPEN))\r
4338 #if defined(DUAL_CORE)\r
4339 #define __HAL_RCC_ART_CLK_SLEEP_ENABLE()              (RCC->AHB1LPENR |= (RCC_AHB1LPENR_ARTLPEN))\r
4340 #endif /*DUAL_CORE*/\r
4341 #define __HAL_RCC_ETH1TX_CLK_SLEEP_ENABLE()           (RCC->AHB1LPENR |= (RCC_AHB1LPENR_ETH1TXLPEN))\r
4342 #define __HAL_RCC_ETH1RX_CLK_SLEEP_ENABLE()           (RCC->AHB1LPENR |= (RCC_AHB1LPENR_ETH1RXLPEN))\r
4343 #define __HAL_RCC_USB1_OTG_HS_CLK_SLEEP_ENABLE()      (RCC->AHB1LPENR |= (RCC_AHB1LPENR_USB1OTGHSLPEN))\r
4344 #define __HAL_RCC_USB1_OTG_HS_ULPI_CLK_SLEEP_ENABLE() (RCC->AHB1LPENR |= (RCC_AHB1LPENR_USB1OTGHSULPILPEN))\r
4345 #define __HAL_RCC_USB2_OTG_FS_CLK_SLEEP_ENABLE()      (RCC->AHB1LPENR |= (RCC_AHB1LPENR_USB2OTGHSLPEN))\r
4346 #define __HAL_RCC_USB2_OTG_FS_ULPI_CLK_SLEEP_ENABLE() (RCC->AHB1LPENR |= (RCC_AHB1LPENR_USB2OTGHSULPILPEN))\r
4347 \r
4348 #define __HAL_RCC_DMA1_CLK_SLEEP_DISABLE()             (RCC->AHB1LPENR &= ~ (RCC_AHB1LPENR_DMA1LPEN))\r
4349 #define __HAL_RCC_DMA2_CLK_SLEEP_DISABLE()             (RCC->AHB1LPENR &= ~ (RCC_AHB1LPENR_DMA2LPEN))\r
4350 #define __HAL_RCC_ADC12_CLK_SLEEP_DISABLE()            (RCC->AHB1LPENR &= ~ (RCC_AHB1LPENR_ADC12LPEN))\r
4351 #define __HAL_RCC_ETH1MAC_CLK_SLEEP_DISABLE()          (RCC->AHB1LPENR &= ~ (RCC_AHB1LPENR_ETH1MACLPEN))\r
4352 #if defined(DUAL_CORE)\r
4353 #define __HAL_RCC_ART_CLK_SLEEP_DISABLE()              (RCC->AHB1LPENR &= ~ (RCC_AHB1LPENR_ARTLPEN))\r
4354 #endif /*DUAL_CORE*/\r
4355 #define __HAL_RCC_ETH1TX_CLK_SLEEP_DISABLE()           (RCC->AHB1LPENR &= ~ (RCC_AHB1LPENR_ETH1TXLPEN))\r
4356 #define __HAL_RCC_ETH1RX_CLK_SLEEP_DISABLE()           (RCC->AHB1LPENR &= ~ (RCC_AHB1LPENR_ETH1RXLPEN))\r
4357 #define __HAL_RCC_USB1_OTG_HS_CLK_SLEEP_DISABLE()      (RCC->AHB1LPENR &= ~ (RCC_AHB1LPENR_USB1OTGHSLPEN))\r
4358 #define __HAL_RCC_USB1_OTG_HS_ULPI_CLK_SLEEP_DISABLE() (RCC->AHB1LPENR &= ~ (RCC_AHB1LPENR_USB1OTGHSULPILPEN))\r
4359 #define __HAL_RCC_USB2_OTG_FS_CLK_SLEEP_DISABLE()      (RCC->AHB1LPENR &= ~ (RCC_AHB1LPENR_USB2OTGHSLPEN))\r
4360 #define __HAL_RCC_USB2_OTG_FS_ULPI_CLK_SLEEP_DISABLE() (RCC->AHB1LPENR &= ~ (RCC_AHB1LPENR_USB2OTGHSULPILPEN))\r
4361 \r
4362 \r
4363 /** @brief  Get the enable or disable status of the AHB1 peripheral clock during Low Poser (Sleep) mode.\r
4364   * @note   Peripheral clock gating in SLEEP mode can be used to further reduce\r
4365   *         power consumption.\r
4366   * @note   After wakeup from SLEEP mode, the peripheral clock is enabled again.\r
4367   * @note   By default, all peripheral clocks are enabled during SLEEP mode.\r
4368   */\r
4369 \r
4370 #define __HAL_RCC_DMA1_IS_CLK_SLEEP_ENABLED()              ((RCC->AHB1LPENR & (RCC_AHB1LPENR_DMA1LPEN))          != 0U)\r
4371 #define __HAL_RCC_DMA2_IS_CLK_SLEEP_ENABLED()              ((RCC->AHB1LPENR & (RCC_AHB1LPENR_DMA2LPEN))          != 0U)\r
4372 #define __HAL_RCC_ADC12_IS_CLK_SLEEP_ENABLED()             ((RCC->AHB1LPENR & (RCC_AHB1LPENR_ADC12LPEN))         != 0U)\r
4373 #define __HAL_RCC_ETH1MAC_IS_CLK_SLEEP_ENABLED()           ((RCC->AHB1LPENR & (RCC_AHB1LPENR_ETH1MACLPEN))       != 0U)\r
4374 #if defined(DUAL_CORE)\r
4375 #define __HAL_RCC_ART_IS_CLK_SLEEP_ENABLED()               ((RCC->AHB1LPENR & (RCC_AHB1LPENR_ARTLPEN))       != 0U)\r
4376 #endif /*DUAL_CORE*/\r
4377 #define __HAL_RCC_ETH1TX_IS_CLK_SLEEP_ENABLED()            ((RCC->AHB1LPENR & (RCC_AHB1LPENR_ETH1TXLPEN))        != 0U)\r
4378 #define __HAL_RCC_ETH1RX_IS_CLK_SLEEP_ENABLED()            ((RCC->AHB1LPENR & (RCC_AHB1LPENR_ETH1RXLPEN))        != 0U)\r
4379 #define __HAL_RCC_USB1_OTG_HS_IS_CLK_SLEEP_ENABLED()       ((RCC->AHB1LPENR & (RCC_AHB1LPENR_USB1OTGHSLPEN))     != 0U)\r
4380 #define __HAL_RCC_USB1_OTG_HS_ULPI_IS_CLK_SLEEP_ENABLED()  ((RCC->AHB1LPENR & (RCC_AHB1LPENR_USB1OTGHSULPILPEN)) != 0U)\r
4381 #define __HAL_RCC_USB2_OTG_FS_IS_CLK_SLEEP_ENABLED()       ((RCC->AHB1LPENR & (RCC_AHB1LPENR_USB2OTGHSLPEN))     != 0U)\r
4382 #define __HAL_RCC_USB2_OTG_FS_ULPI_IS_CLK_SLEEP_ENABLED()  ((RCC->AHB1LPENR & (RCC_AHB1LPENR_USB2OTGHSULPILPEN)) != 0U)\r
4383 \r
4384 #define __HAL_RCC_DMA1_IS_CLK_SLEEP_DISABLED()             ((RCC->AHB1LPENR & (RCC_AHB1LPENR_DMA1LPEN))          == 0U)\r
4385 #define __HAL_RCC_DMA2_IS_CLK_SLEEP_DISABLED()             ((RCC->AHB1LPENR & (RCC_AHB1LPENR_DMA2LPEN))          == 0U)\r
4386 #define __HAL_RCC_ADC12_IS_CLK_SLEEP_DISABLED()            ((RCC->AHB1LPENR & (RCC_AHB1LPENR_ADC12LPEN))         == 0U)\r
4387 #define __HAL_RCC_ETH1MAC_IS_CLK_SLEEP_DISABLED()          ((RCC->AHB1LPENR & (RCC_AHB1LPENR_ETH1MACLPEN))       == 0U)\r
4388 #if defined(DUAL_CORE)\r
4389 #define __HAL_RCC_ART_IS_CLK_SLEEP_DISABLED()              ((RCC->AHB1LPENR & (RCC_AHB1LPENR_ARTLPEN))           == 0U)\r
4390 #endif /*DUAL_CORE*/\r
4391 #define __HAL_RCC_ETH1TX_IS_CLK_SLEEP_DISABLED()           ((RCC->AHB1LPENR & (RCC_AHB1LPENR_ETH1TXLPEN))        == 0U)\r
4392 #define __HAL_RCC_ETH1RX_IS_CLK_SLEEP_DISABLED()           ((RCC->AHB1LPENR & (RCC_AHB1LPENR_ETH1RXLPEN))        == 0U)\r
4393 #define __HAL_RCC_USB1_OTG_HS_IS_CLK_SLEEP_DISABLED()      ((RCC->AHB1LPENR & (RCC_AHB1LPENR_USB1OTGHSLPEN))     == 0U)\r
4394 #define __HAL_RCC_USB1_OTG_HS_ULPI_IS_CLK_SLEEP_DISABLED() ((RCC->AHB1LPENR & (RCC_AHB1LPENR_USB1OTGHSULPILPEN)) == 0U)\r
4395 #define __HAL_RCC_USB2_OTG_FS_IS_CLK_SLEEP_DISABLED()      ((RCC->AHB1LPENR & (RCC_AHB1LPENR_USB2OTGHSLPEN))     == 0U)\r
4396 #define __HAL_RCC_USB2_OTG_FS_ULPI_IS_CLK_SLEEP_DISABLED() ((RCC->AHB1LPENR & (RCC_AHB1LPENR_USB2OTGHSULPILPEN)) == 0U)\r
4397 \r
4398 \r
4399 /** @brief  ENABLE or disable the AHB2 peripheral clock during Low Power (Sleep) mode.\r
4400   * @note   Peripheral clock gating in SLEEP mode can be used to further reduce\r
4401   *         power consumption.\r
4402   * @note   After wakeup from SLEEP mode, the peripheral clock is ENABLEd again.\r
4403   * @note   By default, all peripheral clocks are ENABLEd during SLEEP mode.\r
4404   */\r
4405 \r
4406 #define __HAL_RCC_DCMI_CLK_SLEEP_ENABLE()             (RCC->AHB2LPENR |= (RCC_AHB2LPENR_DCMILPEN))\r
4407 #define __HAL_RCC_CRYP_CLK_SLEEP_ENABLE()             (RCC->AHB2LPENR |= (RCC_AHB2LPENR_CRYPLPEN))\r
4408 #define __HAL_RCC_HASH_CLK_SLEEP_ENABLE()             (RCC->AHB2LPENR |= (RCC_AHB2LPENR_HASHLPEN))\r
4409 #define __HAL_RCC_RNG_CLK_SLEEP_ENABLE()              (RCC->AHB2LPENR |= (RCC_AHB2LPENR_RNGLPEN))\r
4410 #define __HAL_RCC_SDMMC2_CLK_SLEEP_ENABLE()           (RCC->AHB2LPENR |= (RCC_AHB2LPENR_SDMMC2LPEN))\r
4411 #define __HAL_RCC_D2SRAM1_CLK_SLEEP_ENABLE()          (RCC->AHB2LPENR |= (RCC_AHB2LPENR_D2SRAM1LPEN))\r
4412 #define __HAL_RCC_D2SRAM2_CLK_SLEEP_ENABLE()          (RCC->AHB2LPENR |= (RCC_AHB2LPENR_D2SRAM2LPEN))\r
4413 #define __HAL_RCC_D2SRAM3_CLK_SLEEP_ENABLE()          (RCC->AHB2LPENR |= (RCC_AHB2LPENR_D2SRAM3LPEN))\r
4414 \r
4415 #define __HAL_RCC_DCMI_CLK_SLEEP_DISABLE()             (RCC->AHB2LPENR &= ~ (RCC_AHB2LPENR_DCMILPEN))\r
4416 #define __HAL_RCC_CRYP_CLK_SLEEP_DISABLE()             (RCC->AHB2LPENR &= ~ (RCC_AHB2LPENR_CRYPLPEN))\r
4417 #define __HAL_RCC_HASH_CLK_SLEEP_DISABLE()             (RCC->AHB2LPENR &= ~ (RCC_AHB2LPENR_HASHLPEN))\r
4418 #define __HAL_RCC_RNG_CLK_SLEEP_DISABLE()              (RCC->AHB2LPENR &= ~ (RCC_AHB2LPENR_RNGLPEN))\r
4419 #define __HAL_RCC_SDMMC2_CLK_SLEEP_DISABLE()           (RCC->AHB2LPENR &= ~ (RCC_AHB2LPENR_SDMMC2LPEN))\r
4420 #define __HAL_RCC_D2SRAM1_CLK_SLEEP_DISABLE()          (RCC->AHB2LPENR &= ~ (RCC_AHB2LPENR_D2SRAM1LPEN))\r
4421 #define __HAL_RCC_D2SRAM2_CLK_SLEEP_DISABLE()          (RCC->AHB2LPENR &= ~ (RCC_AHB2LPENR_D2SRAM2LPEN))\r
4422 #define __HAL_RCC_D2SRAM3_CLK_SLEEP_DISABLE()          (RCC->AHB2LPENR &= ~ (RCC_AHB2LPENR_D2SRAM3LPEN))\r
4423 \r
4424 \r
4425 /** @brief  Get the enable or disable status of the AHB2 peripheral clock during Low Poser (Sleep) mode.\r
4426   * @note   Peripheral clock gating in SLEEP mode can be used to further reduce\r
4427   *         power consumption.\r
4428   * @note   After wakeup from SLEEP mode, the peripheral clock is enabled again.\r
4429   * @note   By default, all peripheral clocks are enabled during SLEEP mode.\r
4430   */\r
4431 \r
4432 #define __HAL_RCC_DCMI_IS_CLK_SLEEP_ENABLED()              ((RCC->AHB2LPENR & (RCC_AHB2LPENR_DCMILPEN))    != 0U)\r
4433 #define __HAL_RCC_CRYP_IS_CLK_SLEEP_ENABLED()              ((RCC->AHB2LPENR & (RCC_AHB2LPENR_CRYPLPEN))    != 0U)\r
4434 #define __HAL_RCC_HASH_IS_CLK_SLEEP_ENABLED()              ((RCC->AHB2LPENR & (RCC_AHB2LPENR_HASHLPEN))    != 0U)\r
4435 #define __HAL_RCC_RNG_IS_CLK_SLEEP_ENABLED()               ((RCC->AHB2LPENR & (RCC_AHB2LPENR_RNGLPEN))     != 0U)\r
4436 #define __HAL_RCC_SDMMC2_IS_CLK_SLEEP_ENABLED()            ((RCC->AHB2LPENR & (RCC_AHB2LPENR_SDMMC2LPEN))  != 0U)\r
4437 #define __HAL_RCC_D2SRAM1_IS_CLK_SLEEP_ENABLED()           ((RCC->AHB2LPENR & (RCC_AHB2LPENR_D2SRAM1LPEN)) != 0U)\r
4438 #define __HAL_RCC_D2SRAM2_IS_CLK_SLEEP_ENABLED()           ((RCC->AHB2LPENR & (RCC_AHB2LPENR_D2SRAM2LPEN)) != 0U)\r
4439 #define __HAL_RCC_D2SRAM3_IS_CLK_SLEEP_ENABLED()           ((RCC->AHB2LPENR & (RCC_AHB2LPENR_D2SRAM3LPEN)) != 0U)\r
4440 \r
4441 #define __HAL_RCC_DCMI_IS_CLK_SLEEP_DISABLED()             ((RCC->AHB2LPENR & (RCC_AHB2LPENR_DCMILPEN))    == 0U)\r
4442 #define __HAL_RCC_CRYP_IS_CLK_SLEEP_DISABLED()             ((RCC->AHB2LPENR & (RCC_AHB2LPENR_CRYPLPEN))    == 0U)\r
4443 #define __HAL_RCC_HASH_IS_CLK_SLEEP_DISABLED()             ((RCC->AHB2LPENR & (RCC_AHB2LPENR_HASHLPEN))    == 0U)\r
4444 #define __HAL_RCC_RNG_IS_CLK_SLEEP_DISABLED()              ((RCC->AHB2LPENR & (RCC_AHB2LPENR_RNGLPEN))     == 0U)\r
4445 #define __HAL_RCC_SDMMC2_IS_CLK_SLEEP_DISABLED()           ((RCC->AHB2LPENR & (RCC_AHB2LPENR_SDMMC2LPEN))  == 0U)\r
4446 #define __HAL_RCC_D2SRAM1_IS_CLK_SLEEP_DISABLED()          ((RCC->AHB2LPENR & (RCC_AHB2LPENR_D2SRAM1LPEN)) == 0U)\r
4447 #define __HAL_RCC_D2SRAM2_IS_CLK_SLEEP_DISABLED()          ((RCC->AHB2LPENR & (RCC_AHB2LPENR_D2SRAM2LPEN)) == 0U)\r
4448 #define __HAL_RCC_D2SRAM3_IS_CLK_SLEEP_DISABLED()          ((RCC->AHB2LPENR & (RCC_AHB2LPENR_D2SRAM3LPEN)) == 0U)\r
4449 \r
4450 \r
4451 /** @brief  ENABLE or disable the AHB4 peripheral clock during Low Power (Sleep) mode.\r
4452   * @note   Peripheral clock gating in SLEEP mode can be used to further reduce\r
4453   *         power consumption.\r
4454   * @note   After wakeup from SLEEP mode, the peripheral clock is ENABLEd again.\r
4455   * @note   By default, all peripheral clocks are ENABLEd during SLEEP mode.\r
4456   */\r
4457 \r
4458 #define __HAL_RCC_GPIOA_CLK_SLEEP_ENABLE()           (RCC->AHB4LPENR) |= (RCC_AHB4LPENR_GPIOALPEN)\r
4459 #define __HAL_RCC_GPIOB_CLK_SLEEP_ENABLE()           (RCC->AHB4LPENR) |= (RCC_AHB4LPENR_GPIOBLPEN)\r
4460 #define __HAL_RCC_GPIOC_CLK_SLEEP_ENABLE()           (RCC->AHB4LPENR) |= (RCC_AHB4LPENR_GPIOCLPEN)\r
4461 #define __HAL_RCC_GPIOD_CLK_SLEEP_ENABLE()           (RCC->AHB4LPENR) |= (RCC_AHB4LPENR_GPIODLPEN)\r
4462 #define __HAL_RCC_GPIOE_CLK_SLEEP_ENABLE()           (RCC->AHB4LPENR) |= (RCC_AHB4LPENR_GPIOELPEN)\r
4463 #define __HAL_RCC_GPIOF_CLK_SLEEP_ENABLE()           (RCC->AHB4LPENR) |= (RCC_AHB4LPENR_GPIOFLPEN)\r
4464 #define __HAL_RCC_GPIOG_CLK_SLEEP_ENABLE()           (RCC->AHB4LPENR) |= (RCC_AHB4LPENR_GPIOGLPEN)\r
4465 #define __HAL_RCC_GPIOH_CLK_SLEEP_ENABLE()           (RCC->AHB4LPENR) |= (RCC_AHB4LPENR_GPIOHLPEN)\r
4466 #define __HAL_RCC_GPIOI_CLK_SLEEP_ENABLE()           (RCC->AHB4LPENR) |= (RCC_AHB4LPENR_GPIOILPEN)\r
4467 #define __HAL_RCC_GPIOJ_CLK_SLEEP_ENABLE()           (RCC->AHB4LPENR) |= (RCC_AHB4LPENR_GPIOJLPEN)\r
4468 #define __HAL_RCC_GPIOK_CLK_SLEEP_ENABLE()           (RCC->AHB4LPENR) |= (RCC_AHB4LPENR_GPIOKLPEN)\r
4469 #define __HAL_RCC_CRC_CLK_SLEEP_ENABLE()             (RCC->AHB4LPENR) |= (RCC_AHB4LPENR_CRCLPEN)\r
4470 #define __HAL_RCC_BDMA_CLK_SLEEP_ENABLE()            (RCC->AHB4LPENR) |= (RCC_AHB4LPENR_BDMALPEN)\r
4471 #define __HAL_RCC_ADC3_CLK_SLEEP_ENABLE()            (RCC->AHB4LPENR) |= (RCC_AHB4LPENR_ADC3LPEN)\r
4472 #define __HAL_RCC_BKPRAM_CLK_SLEEP_ENABLE()          (RCC->AHB4LPENR) |= (RCC_AHB4LPENR_BKPRAMLPEN)\r
4473 #define __HAL_RCC_D3SRAM1_CLK_SLEEP_ENABLE()         (RCC->AHB4LPENR  |= (RCC_AHB4LPENR_D3SRAM1LPEN))\r
4474 \r
4475 #define __HAL_RCC_GPIOA_CLK_SLEEP_DISABLE()           (RCC->AHB4LPENR) &= ~ (RCC_AHB4LPENR_GPIOALPEN)\r
4476 #define __HAL_RCC_GPIOB_CLK_SLEEP_DISABLE()           (RCC->AHB4LPENR) &= ~ (RCC_AHB4LPENR_GPIOBLPEN)\r
4477 #define __HAL_RCC_GPIOC_CLK_SLEEP_DISABLE()           (RCC->AHB4LPENR) &= ~ (RCC_AHB4LPENR_GPIOCLPEN)\r
4478 #define __HAL_RCC_GPIOD_CLK_SLEEP_DISABLE()           (RCC->AHB4LPENR) &= ~ (RCC_AHB4LPENR_GPIODLPEN)\r
4479 #define __HAL_RCC_GPIOE_CLK_SLEEP_DISABLE()           (RCC->AHB4LPENR) &= ~ (RCC_AHB4LPENR_GPIOELPEN)\r
4480 #define __HAL_RCC_GPIOF_CLK_SLEEP_DISABLE()           (RCC->AHB4LPENR) &= ~ (RCC_AHB4LPENR_GPIOFLPEN)\r
4481 #define __HAL_RCC_GPIOG_CLK_SLEEP_DISABLE()           (RCC->AHB4LPENR) &= ~ (RCC_AHB4LPENR_GPIOGLPEN)\r
4482 #define __HAL_RCC_GPIOH_CLK_SLEEP_DISABLE()           (RCC->AHB4LPENR) &= ~ (RCC_AHB4LPENR_GPIOHLPEN)\r
4483 #define __HAL_RCC_GPIOI_CLK_SLEEP_DISABLE()           (RCC->AHB4LPENR) &= ~ (RCC_AHB4LPENR_GPIOILPEN)\r
4484 #define __HAL_RCC_GPIOJ_CLK_SLEEP_DISABLE()           (RCC->AHB4LPENR) &= ~ (RCC_AHB4LPENR_GPIOJLPEN)\r
4485 #define __HAL_RCC_GPIOK_CLK_SLEEP_DISABLE()           (RCC->AHB4LPENR) &= ~ (RCC_AHB4LPENR_GPIOKLPEN)\r
4486 #define __HAL_RCC_CRC_CLK_SLEEP_DISABLE()             (RCC->AHB4LPENR) &= ~ (RCC_AHB4LPENR_CRCLPEN)\r
4487 #define __HAL_RCC_BDMA_CLK_SLEEP_DISABLE()            (RCC->AHB4LPENR) &= ~ (RCC_AHB4LPENR_BDMALPEN)\r
4488 #define __HAL_RCC_ADC3_CLK_SLEEP_DISABLE()            (RCC->AHB4LPENR) &= ~ (RCC_AHB4LPENR_ADC3LPEN)\r
4489 #define __HAL_RCC_BKPRAM_CLK_SLEEP_DISABLE()          (RCC->AHB4LPENR) &= ~ (RCC_AHB4LPENR_BKPRAMLPEN)\r
4490 #define __HAL_RCC_D3SRAM1_CLK_SLEEP_DISABLE()         (RCC->AHB4LPENR  &= ~ (RCC_AHB4LPENR_D3SRAM1LPEN))\r
4491 \r
4492 \r
4493 /** @brief  Get the enable or disable status of the AHB4 peripheral clock during Low Poser (Sleep) mode.\r
4494   * @note   Peripheral clock gating in SLEEP mode can be used to further reduce\r
4495   *         power consumption.\r
4496   * @note   After wakeup from SLEEP mode, the peripheral clock is enabled again.\r
4497   * @note   By default, all peripheral clocks are enabled during SLEEP mode.\r
4498   */\r
4499 \r
4500 #define __HAL_RCC_GPIOA_IS_CLK_SLEEP_ENABLED()            ((RCC->AHB4LPENR & (RCC_AHB4LPENR_GPIOALPEN))   != 0U)\r
4501 #define __HAL_RCC_GPIOB_IS_CLK_SLEEP_ENABLED()            ((RCC->AHB4LPENR & (RCC_AHB4LPENR_GPIOBLPEN))   != 0U)\r
4502 #define __HAL_RCC_GPIOC_IS_CLK_SLEEP_ENABLED()            ((RCC->AHB4LPENR & (RCC_AHB4LPENR_GPIOCLPEN))   != 0U)\r
4503 #define __HAL_RCC_GPIOD_IS_CLK_SLEEP_ENABLED()            ((RCC->AHB4LPENR & (RCC_AHB4LPENR_GPIODLPEN))   != 0U)\r
4504 #define __HAL_RCC_GPIOE_IS_CLK_SLEEP_ENABLED()            ((RCC->AHB4LPENR & (RCC_AHB4LPENR_GPIOELPEN))   != 0U)\r
4505 #define __HAL_RCC_GPIOF_IS_CLK_SLEEP_ENABLED()            ((RCC->AHB4LPENR & (RCC_AHB4LPENR_GPIOFLPEN))   != 0U)\r
4506 #define __HAL_RCC_GPIOG_IS_CLK_SLEEP_ENABLED()            ((RCC->AHB4LPENR & (RCC_AHB4LPENR_GPIOGLPEN))   != 0U)\r
4507 #define __HAL_RCC_GPIOH_IS_CLK_SLEEP_ENABLED()            ((RCC->AHB4LPENR & (RCC_AHB4LPENR_GPIOHLPEN))   != 0U)\r
4508 #define __HAL_RCC_GPIOI_IS_CLK_SLEEP_ENABLED()            ((RCC->AHB4LPENR & (RCC_AHB4LPENR_GPIOILPEN))   != 0U)\r
4509 #define __HAL_RCC_GPIOJ_IS_CLK_SLEEP_ENABLED()            ((RCC->AHB4LPENR & (RCC_AHB4LPENR_GPIOJLPEN))   != 0U)\r
4510 #define __HAL_RCC_GPIOK_IS_CLK_SLEEP_ENABLED()            ((RCC->AHB4LPENR & (RCC_AHB4LPENR_GPIOKLPEN))   != 0U)\r
4511 #define __HAL_RCC_CRC_IS_CLK_SLEEP_ENABLED()              ((RCC->AHB4LPENR & (RCC_AHB4LPENR_CRCLPEN))     != 0U)\r
4512 #define __HAL_RCC_BDMA_IS_CLK_SLEEP_ENABLED()             ((RCC->AHB4LPENR & (RCC_AHB4LPENR_BDMALPEN))    != 0U)\r
4513 #define __HAL_RCC_ADC3_IS_CLK_SLEEP_ENABLED()             ((RCC->AHB4LPENR & (RCC_AHB4LPENR_ADC3LPEN))    != 0U)\r
4514 #define __HAL_RCC_BKPRAM_IS_CLK_SLEEP_ENABLED()           ((RCC->AHB4LPENR & (RCC_AHB4LPENR_BKPRAMLPEN))  != 0U)\r
4515 #define __HAL_RCC_D3SRAM1_IS_CLK_SLEEP_ENABLED()          ((RCC->AHB4LPENR & (RCC_AHB4LPENR_D3SRAM1LPEN)) != 0U)\r
4516 \r
4517 #define __HAL_RCC_GPIOA_IS_CLK_SLEEP_DISABLED()           ((RCC->AHB4LPENR & (RCC_AHB4LPENR_GPIOALPEN))   == 0U)\r
4518 #define __HAL_RCC_GPIOB_IS_CLK_SLEEP_DISABLED()           ((RCC->AHB4LPENR & (RCC_AHB4LPENR_GPIOBLPEN))   == 0U)\r
4519 #define __HAL_RCC_GPIOC_IS_CLK_SLEEP_DISABLED()           ((RCC->AHB4LPENR & (RCC_AHB4LPENR_GPIOCLPEN))   == 0U)\r
4520 #define __HAL_RCC_GPIOD_IS_CLK_SLEEP_DISABLED()           ((RCC->AHB4LPENR & (RCC_AHB4LPENR_GPIODLPEN))   == 0U)\r
4521 #define __HAL_RCC_GPIOE_IS_CLK_SLEEP_DISABLED()           ((RCC->AHB4LPENR & (RCC_AHB4LPENR_GPIOELPEN))   == 0U)\r
4522 #define __HAL_RCC_GPIOF_IS_CLK_SLEEP_DISABLED()           ((RCC->AHB4LPENR & (RCC_AHB4LPENR_GPIOFLPEN))   == 0U)\r
4523 #define __HAL_RCC_GPIOG_IS_CLK_SLEEP_DISABLED()           ((RCC->AHB4LPENR & (RCC_AHB4LPENR_GPIOGLPEN))   == 0U)\r
4524 #define __HAL_RCC_GPIOH_IS_CLK_SLEEP_DISABLED()           ((RCC->AHB4LPENR & (RCC_AHB4LPENR_GPIOHLPEN))   == 0U)\r
4525 #define __HAL_RCC_GPIOI_IS_CLK_SLEEP_DISABLED()           ((RCC->AHB4LPENR & (RCC_AHB4LPENR_GPIOILPEN))   == 0U)\r
4526 #define __HAL_RCC_GPIOJ_IS_CLK_SLEEP_DISABLED()           ((RCC->AHB4LPENR & (RCC_AHB4LPENR_GPIOJLPEN))   == 0U)\r
4527 #define __HAL_RCC_GPIOK_IS_CLK_SLEEP_DISABLED()           ((RCC->AHB4LPENR & (RCC_AHB4LPENR_GPIOKLPEN))   == 0U)\r
4528 #define __HAL_RCC_CRC_IS_CLK_SLEEP_DISABLED()             ((RCC->AHB4LPENR & (RCC_AHB4LPENR_CRCLPEN))     == 0U)\r
4529 #define __HAL_RCC_BDMA_IS_CLK_SLEEP_DISABLED()            ((RCC->AHB4LPENR & (RCC_AHB4LPENR_BDMALPEN))    == 0U)\r
4530 #define __HAL_RCC_ADC3_IS_CLK_SLEEP_DISABLED()            ((RCC->AHB4LPENR & (RCC_AHB4LPENR_ADC3LPEN))    == 0U)\r
4531 #define __HAL_RCC_BKPRAM_IS_CLK_SLEEP_DISABLED()          ((RCC->AHB4LPENR & (RCC_AHB4LPENR_BKPRAMLPEN))  == 0U)\r
4532 #define __HAL_RCC_D3SRAM1_IS_CLK_SLEEP_DISABLED()         ((RCC->AHB4LPENR & (RCC_AHB4LPENR_D3SRAM1LPEN)) == 0U)\r
4533 \r
4534 \r
4535 /** @brief  ENABLE or disable the APB3 peripheral clock during Low Power (Sleep) mode.\r
4536   * @note   Peripheral clock gating in SLEEP mode can be used to further reduce\r
4537   *         power consumption.\r
4538   * @note   After wakeup from SLEEP mode, the peripheral clock is ENABLEd again.\r
4539   * @note   By default, all peripheral clocks are ENABLEd during SLEEP mode.\r
4540   */\r
4541 \r
4542 #if defined(LTDC)\r
4543 #define __HAL_RCC_LTDC_CLK_SLEEP_ENABLE()           (RCC->APB3LPENR) |= (RCC_APB3LPENR_LTDCLPEN)\r
4544 #endif /* LTDC */\r
4545 \r
4546 #if defined(DSI)\r
4547 #define __HAL_RCC_DSI_CLK_SLEEP_ENABLE()            (RCC->APB3LPENR) |= (RCC_APB3LPENR_DSILPEN)\r
4548 #endif /*DSI*/\r
4549 #define __HAL_RCC_WWDG1_CLK_SLEEP_ENABLE()          (RCC->APB3LPENR) |= (RCC_APB3LPENR_WWDG1LPEN)\r
4550 \r
4551 #if defined(LTDC)\r
4552 #define __HAL_RCC_LTDC_CLK_SLEEP_DISABLE()           (RCC->APB3LPENR) &= ~ (RCC_APB3LPENR_LTDCLPEN)\r
4553 #endif /* LTDC */\r
4554 \r
4555 #if defined(DSI)\r
4556 #define __HAL_RCC_DSI_CLK_SLEEP_DISABLE()            (RCC->APB3LPENR) &= ~ (RCC_APB3LPENR_DSILPEN)\r
4557 #endif /*DSI*/\r
4558 #define __HAL_RCC_WWDG1_CLK_SLEEP_DISABLE()          (RCC->APB3LPENR) &= ~ (RCC_APB3LPENR_WWDG1LPEN)\r
4559 \r
4560 \r
4561 /** @brief  Get the enable or disable status of the APB3 peripheral clock during Low Poser (Sleep) mode.\r
4562   * @note   Peripheral clock gating in SLEEP mode can be used to further reduce\r
4563   *         power consumption.\r
4564   * @note   After wakeup from SLEEP mode, the peripheral clock is enabled again.\r
4565   * @note   By default, all peripheral clocks are enabled during SLEEP mode.\r
4566   */\r
4567 \r
4568 #if defined(LTDC)\r
4569 #define __HAL_RCC_LTDC_IS_CLK_SLEEP_ENABLED()            ((RCC->APB3LPENR & (RCC_APB3LPENR_LTDCLPEN))  != 0U)\r
4570 #endif /* LTDC */\r
4571 \r
4572 #if defined(DSI)\r
4573 #define __HAL_RCC_DSI_IS_CLK_SLEEP_ENABLED()             ((RCC->APB3LPENR & (RCC_APB3LPENR_DSILPEN))   != 0U)\r
4574 #endif /*DSI*/\r
4575 #define __HAL_RCC_WWDG1_IS_CLK_SLEEP_ENABLED()           ((RCC->APB3LPENR & (RCC_APB3LPENR_WWDG1LPEN)) != 0U)\r
4576 \r
4577 #if defined(LTDC)\r
4578 #define __HAL_RCC_LTDC_IS_CLK_SLEEP_DISABLED()           ((RCC->APB3LPENR & (RCC_APB3LPENR_LTDCLPEN))  == 0U)\r
4579 #endif /* LTDC */\r
4580 \r
4581 #if defined(DSI)\r
4582 #define __HAL_RCC_DSI_IS_CLK_SLEEP_DISABLED()            ((RCC->APB3LPENR & (RCC_APB3LPENR_DSILPEN))   == 0U)\r
4583 #endif /*DSI*/\r
4584 #define __HAL_RCC_WWDG1_IS_CLK_SLEEP_DISABLED()          ((RCC->APB3LPENR & (RCC_APB3LPENR_WWDG1LPEN)) == 0U)\r
4585 \r
4586 \r
4587 /** @brief  ENABLE or disable the APB1 peripheral clock during Low Power (Sleep) mode.\r
4588   * @note   Peripheral clock gating in SLEEP mode can be used to further reduce\r
4589   *         power consumption.\r
4590   * @note   After wakeup from SLEEP mode, the peripheral clock is ENABLEd again.\r
4591   * @note   By default, all peripheral clocks are ENABLEd during SLEEP mode.\r
4592   */\r
4593 \r
4594 #define __HAL_RCC_TIM2_CLK_SLEEP_ENABLE()           (RCC->APB1LLPENR) |= (RCC_APB1LLPENR_TIM2LPEN)\r
4595 #define __HAL_RCC_TIM3_CLK_SLEEP_ENABLE()           (RCC->APB1LLPENR) |= (RCC_APB1LLPENR_TIM3LPEN)\r
4596 #define __HAL_RCC_TIM4_CLK_SLEEP_ENABLE()           (RCC->APB1LLPENR) |= (RCC_APB1LLPENR_TIM4LPEN)\r
4597 #define __HAL_RCC_TIM5_CLK_SLEEP_ENABLE()           (RCC->APB1LLPENR) |= (RCC_APB1LLPENR_TIM5LPEN)\r
4598 #define __HAL_RCC_TIM6_CLK_SLEEP_ENABLE()           (RCC->APB1LLPENR) |= (RCC_APB1LLPENR_TIM6LPEN)\r
4599 #define __HAL_RCC_TIM7_CLK_SLEEP_ENABLE()           (RCC->APB1LLPENR) |= (RCC_APB1LLPENR_TIM7LPEN)\r
4600 #define __HAL_RCC_TIM12_CLK_SLEEP_ENABLE()          (RCC->APB1LLPENR) |= (RCC_APB1LLPENR_TIM12LPEN)\r
4601 #define __HAL_RCC_TIM13_CLK_SLEEP_ENABLE()          (RCC->APB1LLPENR) |= (RCC_APB1LLPENR_TIM13LPEN)\r
4602 #define __HAL_RCC_TIM14_CLK_SLEEP_ENABLE()          (RCC->APB1LLPENR) |= (RCC_APB1LLPENR_TIM14LPEN)\r
4603 #define __HAL_RCC_LPTIM1_CLK_SLEEP_ENABLE()         (RCC->APB1LLPENR) |= (RCC_APB1LLPENR_LPTIM1LPEN)\r
4604 \r
4605 #if defined(DUAL_CORE)\r
4606 #define __HAL_RCC_WWDG2_CLK_SLEEP_ENABLE()          (RCC->APB1LLPENR) |= (RCC_APB1LLPENR_WWDG2LPEN)\r
4607 #endif /*DUAL_CORE*/\r
4608 \r
4609 #define __HAL_RCC_SPI2_CLK_SLEEP_ENABLE()           (RCC->APB1LLPENR) |= (RCC_APB1LLPENR_SPI2LPEN)\r
4610 #define __HAL_RCC_SPI3_CLK_SLEEP_ENABLE()           (RCC->APB1LLPENR) |= (RCC_APB1LLPENR_SPI3LPEN)\r
4611 #define __HAL_RCC_SPDIFRX_CLK_SLEEP_ENABLE()        (RCC->APB1LLPENR) |= (RCC_APB1LLPENR_SPDIFRXLPEN)\r
4612 #define __HAL_RCC_USART2_CLK_SLEEP_ENABLE()         (RCC->APB1LLPENR) |= (RCC_APB1LLPENR_USART2LPEN)\r
4613 #define __HAL_RCC_USART3_CLK_SLEEP_ENABLE()         (RCC->APB1LLPENR) |= (RCC_APB1LLPENR_USART3LPEN)\r
4614 #define __HAL_RCC_UART4_CLK_SLEEP_ENABLE()          (RCC->APB1LLPENR) |= (RCC_APB1LLPENR_UART4LPEN)\r
4615 #define __HAL_RCC_UART5_CLK_SLEEP_ENABLE()          (RCC->APB1LLPENR) |= (RCC_APB1LLPENR_UART5LPEN)\r
4616 #define __HAL_RCC_I2C1_CLK_SLEEP_ENABLE()           (RCC->APB1LLPENR) |= (RCC_APB1LLPENR_I2C1LPEN)\r
4617 #define __HAL_RCC_I2C2_CLK_SLEEP_ENABLE()           (RCC->APB1LLPENR) |= (RCC_APB1LLPENR_I2C2LPEN)\r
4618 #define __HAL_RCC_I2C3_CLK_SLEEP_ENABLE()           (RCC->APB1LLPENR) |= (RCC_APB1LLPENR_I2C3LPEN)\r
4619 #define __HAL_RCC_CEC_CLK_SLEEP_ENABLE()            (RCC->APB1LLPENR) |= (RCC_APB1LLPENR_CECLPEN)\r
4620 #define __HAL_RCC_DAC12_CLK_SLEEP_ENABLE()          (RCC->APB1LLPENR) |= (RCC_APB1LLPENR_DAC12LPEN)\r
4621 #define __HAL_RCC_UART7_CLK_SLEEP_ENABLE()          (RCC->APB1LLPENR) |= (RCC_APB1LLPENR_UART7LPEN)\r
4622 #define __HAL_RCC_UART8_CLK_SLEEP_ENABLE()          (RCC->APB1LLPENR) |= (RCC_APB1LLPENR_UART8LPEN)\r
4623 #define __HAL_RCC_CRS_CLK_SLEEP_ENABLE()            (RCC->APB1HLPENR) |= (RCC_APB1HLPENR_CRSLPEN)\r
4624 #define __HAL_RCC_SWPMI1_CLK_SLEEP_ENABLE()          (RCC->APB1HLPENR) |= (RCC_APB1HLPENR_SWPMILPEN)\r
4625 #define __HAL_RCC_OPAMP_CLK_SLEEP_ENABLE()          (RCC->APB1HLPENR) |= (RCC_APB1HLPENR_OPAMPLPEN)\r
4626 #define __HAL_RCC_MDIOS_CLK_SLEEP_ENABLE()          (RCC->APB1HLPENR) |= (RCC_APB1HLPENR_MDIOSLPEN)\r
4627 #define __HAL_RCC_FDCAN_CLK_SLEEP_ENABLE()          (RCC->APB1HLPENR) |= (RCC_APB1HLPENR_FDCANLPEN)\r
4628 \r
4629 \r
4630 #define __HAL_RCC_TIM2_CLK_SLEEP_DISABLE()           (RCC->APB1LLPENR) &= ~ (RCC_APB1LLPENR_TIM2LPEN)\r
4631 #define __HAL_RCC_TIM3_CLK_SLEEP_DISABLE()           (RCC->APB1LLPENR) &= ~ (RCC_APB1LLPENR_TIM3LPEN)\r
4632 #define __HAL_RCC_TIM4_CLK_SLEEP_DISABLE()           (RCC->APB1LLPENR) &= ~ (RCC_APB1LLPENR_TIM4LPEN)\r
4633 #define __HAL_RCC_TIM5_CLK_SLEEP_DISABLE()           (RCC->APB1LLPENR) &= ~ (RCC_APB1LLPENR_TIM5LPEN)\r
4634 #define __HAL_RCC_TIM6_CLK_SLEEP_DISABLE()           (RCC->APB1LLPENR) &= ~ (RCC_APB1LLPENR_TIM6LPEN)\r
4635 #define __HAL_RCC_TIM7_CLK_SLEEP_DISABLE()           (RCC->APB1LLPENR) &= ~ (RCC_APB1LLPENR_TIM7LPEN)\r
4636 #define __HAL_RCC_TIM12_CLK_SLEEP_DISABLE()          (RCC->APB1LLPENR) &= ~ (RCC_APB1LLPENR_TIM12LPEN)\r
4637 #define __HAL_RCC_TIM13_CLK_SLEEP_DISABLE()          (RCC->APB1LLPENR) &= ~ (RCC_APB1LLPENR_TIM13LPEN)\r
4638 #define __HAL_RCC_TIM14_CLK_SLEEP_DISABLE()          (RCC->APB1LLPENR) &= ~ (RCC_APB1LLPENR_TIM14LPEN)\r
4639 #define __HAL_RCC_LPTIM1_CLK_SLEEP_DISABLE()         (RCC->APB1LLPENR) &= ~ (RCC_APB1LLPENR_LPTIM1LPEN)\r
4640 \r
4641 #if defined(DUAL_CORE)\r
4642 #define __HAL_RCC_WWDG2_CLK_SLEEP_DISABLE()          (RCC->APB1LLPENR) &= ~ (RCC_APB1LLPENR_WWDG2LPEN)\r
4643 #endif /*DUAL_CORE*/\r
4644 \r
4645 #define __HAL_RCC_SPI2_CLK_SLEEP_DISABLE()           (RCC->APB1LLPENR) &= ~ (RCC_APB1LLPENR_SPI2LPEN)\r
4646 #define __HAL_RCC_SPI3_CLK_SLEEP_DISABLE()           (RCC->APB1LLPENR) &= ~ (RCC_APB1LLPENR_SPI3LPEN)\r
4647 #define __HAL_RCC_SPDIFRX_CLK_SLEEP_DISABLE()        (RCC->APB1LLPENR) &= ~ (RCC_APB1LLPENR_SPDIFRXLPEN)\r
4648 #define __HAL_RCC_USART2_CLK_SLEEP_DISABLE()         (RCC->APB1LLPENR) &= ~ (RCC_APB1LLPENR_USART2LPEN)\r
4649 #define __HAL_RCC_USART3_CLK_SLEEP_DISABLE()         (RCC->APB1LLPENR) &= ~ (RCC_APB1LLPENR_USART3LPEN)\r
4650 #define __HAL_RCC_UART4_CLK_SLEEP_DISABLE()          (RCC->APB1LLPENR) &= ~ (RCC_APB1LLPENR_UART4LPEN)\r
4651 #define __HAL_RCC_UART5_CLK_SLEEP_DISABLE()          (RCC->APB1LLPENR) &= ~ (RCC_APB1LLPENR_UART5LPEN)\r
4652 #define __HAL_RCC_I2C1_CLK_SLEEP_DISABLE()           (RCC->APB1LLPENR) &= ~ (RCC_APB1LLPENR_I2C1LPEN)\r
4653 #define __HAL_RCC_I2C2_CLK_SLEEP_DISABLE()           (RCC->APB1LLPENR) &= ~ (RCC_APB1LLPENR_I2C2LPEN)\r
4654 #define __HAL_RCC_I2C3_CLK_SLEEP_DISABLE()           (RCC->APB1LLPENR) &= ~ (RCC_APB1LLPENR_I2C3LPEN)\r
4655 #define __HAL_RCC_CEC_CLK_SLEEP_DISABLE()            (RCC->APB1LLPENR) &= ~ (RCC_APB1LLPENR_CECLPEN)\r
4656 #define __HAL_RCC_DAC12_CLK_SLEEP_DISABLE()          (RCC->APB1LLPENR) &= ~ (RCC_APB1LLPENR_DAC12LPEN)\r
4657 #define __HAL_RCC_UART7_CLK_SLEEP_DISABLE()          (RCC->APB1LLPENR) &= ~ (RCC_APB1LLPENR_UART7LPEN)\r
4658 #define __HAL_RCC_UART8_CLK_SLEEP_DISABLE()          (RCC->APB1LLPENR) &= ~ (RCC_APB1LLPENR_UART8LPEN)\r
4659 #define __HAL_RCC_CRS_CLK_SLEEP_DISABLE()            (RCC->APB1HLPENR) &= ~ (RCC_APB1HLPENR_CRSLPEN)\r
4660 #define __HAL_RCC_SWPMI1_CLK_SLEEP_DISABLE()          (RCC->APB1HLPENR) &= ~ (RCC_APB1HLPENR_SWPMILPEN)\r
4661 #define __HAL_RCC_OPAMP_CLK_SLEEP_DISABLE()          (RCC->APB1HLPENR) &= ~ (RCC_APB1HLPENR_OPAMPLPEN)\r
4662 #define __HAL_RCC_MDIOS_CLK_SLEEP_DISABLE()          (RCC->APB1HLPENR) &= ~ (RCC_APB1HLPENR_MDIOSLPEN)\r
4663 #define __HAL_RCC_FDCAN_CLK_SLEEP_DISABLE()          (RCC->APB1HLPENR) &= ~ (RCC_APB1HLPENR_FDCANLPEN)\r
4664 \r
4665 \r
4666 /** @brief  Get the enable or disable status of the APB1 peripheral clock during Low Poser (Sleep) mode.\r
4667   * @note   Peripheral clock gating in SLEEP mode can be used to further reduce\r
4668   *         power consumption.\r
4669   * @note   After wakeup from SLEEP mode, the peripheral clock is enabled again.\r
4670   * @note   By default, all peripheral clocks are enabled during SLEEP mode.\r
4671   */\r
4672 \r
4673 #define __HAL_RCC_TIM2_IS_CLK_SLEEP_ENABLED()            ((RCC->APB1LLPENR & (RCC_APB1LLPENR_TIM2LPEN))    != 0U)\r
4674 #define __HAL_RCC_TIM3_IS_CLK_SLEEP_ENABLED()            ((RCC->APB1LLPENR & (RCC_APB1LLPENR_TIM3LPEN))    != 0U)\r
4675 #define __HAL_RCC_TIM4_IS_CLK_SLEEP_ENABLED()            ((RCC->APB1LLPENR & (RCC_APB1LLPENR_TIM4LPEN))    != 0U)\r
4676 #define __HAL_RCC_TIM5_IS_CLK_SLEEP_ENABLED()            ((RCC->APB1LLPENR & (RCC_APB1LLPENR_TIM5LPEN))    != 0U)\r
4677 #define __HAL_RCC_TIM6_IS_CLK_SLEEP_ENABLED()            ((RCC->APB1LLPENR & (RCC_APB1LLPENR_TIM6LPEN))    != 0U)\r
4678 #define __HAL_RCC_TIM7_IS_CLK_SLEEP_ENABLED()            ((RCC->APB1LLPENR & (RCC_APB1LLPENR_TIM7LPEN))    != 0U)\r
4679 #define __HAL_RCC_TIM12_IS_CLK_SLEEP_ENABLED()           ((RCC->APB1LLPENR & (RCC_APB1LLPENR_TIM12LPEN))   != 0U)\r
4680 #define __HAL_RCC_TIM13_IS_CLK_SLEEP_ENABLED()           ((RCC->APB1LLPENR & (RCC_APB1LLPENR_TIM13LPEN))   != 0U)\r
4681 #define __HAL_RCC_TIM14_IS_CLK_SLEEP_ENABLED()           ((RCC->APB1LLPENR & (RCC_APB1LLPENR_TIM14LPEN))   != 0U)\r
4682 #define __HAL_RCC_LPTIM1_IS_CLK_SLEEP_ENABLED()          ((RCC->APB1LLPENR & (RCC_APB1LLPENR_LPTIM1LPEN))  != 0U)\r
4683 #if defined(DUAL_CORE)\r
4684 #define __HAL_RCC_WWDG2_IS_CLK_SLEEP_ENABLED()           ((RCC->APB1LLPENR & (RCC_APB1LLPENR_WWDG2LPEN))   != 0U)\r
4685 #endif /*DUAL_CORE*/\r
4686 #define __HAL_RCC_SPI2_IS_CLK_SLEEP_ENABLED()            ((RCC->APB1LLPENR & (RCC_APB1LLPENR_SPI2LPEN))    != 0U)\r
4687 #define __HAL_RCC_SPI3_IS_CLK_SLEEP_ENABLED()            ((RCC->APB1LLPENR & (RCC_APB1LLPENR_SPI3LPEN))    != 0U)\r
4688 #define __HAL_RCC_SPDIFRX_IS_CLK_SLEEP_ENABLED()         ((RCC->APB1LLPENR & (RCC_APB1LLPENR_SPDIFRXLPEN)) != 0U)\r
4689 #define __HAL_RCC_USART2_IS_CLK_SLEEP_ENABLED()          ((RCC->APB1LLPENR & (RCC_APB1LLPENR_USART2LPEN))  != 0U)\r
4690 #define __HAL_RCC_USART3_IS_CLK_SLEEP_ENABLED()          ((RCC->APB1LLPENR & (RCC_APB1LLPENR_USART3LPEN))  != 0U)\r
4691 #define __HAL_RCC_UART4_IS_CLK_SLEEP_ENABLED()           ((RCC->APB1LLPENR & (RCC_APB1LLPENR_UART4LPEN))   != 0U)\r
4692 #define __HAL_RCC_UART5_IS_CLK_SLEEP_ENABLED()           ((RCC->APB1LLPENR & (RCC_APB1LLPENR_UART5LPEN))   != 0U)\r
4693 #define __HAL_RCC_I2C1_IS_CLK_SLEEP_ENABLED()            ((RCC->APB1LLPENR & (RCC_APB1LLPENR_I2C1LPEN))    != 0U)\r
4694 #define __HAL_RCC_I2C2_IS_CLK_SLEEP_ENABLED()            ((RCC->APB1LLPENR & (RCC_APB1LLPENR_I2C2LPEN))    != 0U)\r
4695 #define __HAL_RCC_I2C3_IS_CLK_SLEEP_ENABLED()            ((RCC->APB1LLPENR & (RCC_APB1LLPENR_I2C3LPEN))    != 0U)\r
4696 #define __HAL_RCC_CEC_IS_CLK_SLEEP_ENABLED()             ((RCC->APB1LLPENR & (RCC_APB1LLPENR_CECLPEN))     != 0U)\r
4697 #define __HAL_RCC_DAC12_IS_CLK_SLEEP_ENABLED()           ((RCC->APB1LLPENR & (RCC_APB1LLPENR_DAC12LPEN))   != 0U)\r
4698 #define __HAL_RCC_UART7_IS_CLK_SLEEP_ENABLED()           ((RCC->APB1LLPENR & (RCC_APB1LLPENR_UART7LPEN))   != 0U)\r
4699 #define __HAL_RCC_UART8_IS_CLK_SLEEP_ENABLED()           ((RCC->APB1LLPENR & (RCC_APB1LLPENR_UART8LPEN))   != 0U)\r
4700 #define __HAL_RCC_CRS_IS_CLK_SLEEP_ENABLED()             ((RCC->APB1HLPENR & (RCC_APB1HLPENR_CRSLPEN))     != 0U)\r
4701 #define __HAL_RCC_SWPMI1_IS_CLK_SLEEP_ENABLED()          ((RCC->APB1HLPENR & (RCC_APB1HLPENR_SWPMILPEN))   != 0U)\r
4702 #define __HAL_RCC_OPAMP_IS_CLK_SLEEP_ENABLED()           ((RCC->APB1HLPENR & (RCC_APB1HLPENR_OPAMPLPEN))   != 0U)\r
4703 #define __HAL_RCC_MDIOS_IS_CLK_SLEEP_ENABLED()           ((RCC->APB1HLPENR & (RCC_APB1HLPENR_MDIOSLPEN))   != 0U)\r
4704 #define __HAL_RCC_FDCAN_IS_CLK_SLEEP_ENABLED()           ((RCC->APB1HLPENR & (RCC_APB1HLPENR_FDCANLPEN))   != 0U)\r
4705 \r
4706 #define __HAL_RCC_TIM2_IS_CLK_SLEEP_DISABLED()           ((RCC->APB1LLPENR & (RCC_APB1LLPENR_TIM2LPEN))    == 0U)\r
4707 #define __HAL_RCC_TIM3_IS_CLK_SLEEP_DISABLED()           ((RCC->APB1LLPENR & (RCC_APB1LLPENR_TIM3LPEN))    == 0U)\r
4708 #define __HAL_RCC_TIM4_IS_CLK_SLEEP_DISABLED()           ((RCC->APB1LLPENR & (RCC_APB1LLPENR_TIM4LPEN))    == 0U)\r
4709 #define __HAL_RCC_TIM5_IS_CLK_SLEEP_DISABLED()           ((RCC->APB1LLPENR & (RCC_APB1LLPENR_TIM5LPEN))    == 0U)\r
4710 #define __HAL_RCC_TIM6_IS_CLK_SLEEP_DISABLED()           ((RCC->APB1LLPENR & (RCC_APB1LLPENR_TIM6LPEN))    == 0U)\r
4711 #define __HAL_RCC_TIM7_IS_CLK_SLEEP_DISABLED()           ((RCC->APB1LLPENR & (RCC_APB1LLPENR_TIM7LPEN))    == 0U)\r
4712 #define __HAL_RCC_TIM12_IS_CLK_SLEEP_DISABLED()          ((RCC->APB1LLPENR & (RCC_APB1LLPENR_TIM12LPEN))   == 0U)\r
4713 #define __HAL_RCC_TIM13_IS_CLK_SLEEP_DISABLED()          ((RCC->APB1LLPENR & (RCC_APB1LLPENR_TIM13LPEN))   == 0U)\r
4714 #define __HAL_RCC_TIM14_IS_CLK_SLEEP_DISABLED()          ((RCC->APB1LLPENR & (RCC_APB1LLPENR_TIM14LPEN))   == 0U)\r
4715 #define __HAL_RCC_LPTIM1_IS_CLK_SLEEP_DISABLED()         ((RCC->APB1LLPENR & (RCC_APB1LLPENR_LPTIM1LPEN))  == 0U)\r
4716 #if defined(DUAL_CORE)\r
4717 #define __HAL_RCC_WWDG2_IS_CLK_SLEEP_DISABLED()          ((RCC->APB1LLPENR & (RCC_APB1LLPENR_WWDG2LPEN))   == 0U)\r
4718 #endif /*DUAL_CORE*/\r
4719 #define __HAL_RCC_SPI2_IS_CLK_SLEEP_DISABLED()           ((RCC->APB1LLPENR & (RCC_APB1LLPENR_SPI2LPEN))    == 0U)\r
4720 #define __HAL_RCC_SPI3_IS_CLK_SLEEP_DISABLED()           ((RCC->APB1LLPENR & (RCC_APB1LLPENR_SPI3LPEN))    == 0U)\r
4721 #define __HAL_RCC_SPDIFRX_IS_CLK_SLEEP_DISABLED()        ((RCC->APB1LLPENR & (RCC_APB1LLPENR_SPDIFRXLPEN)) == 0U)\r
4722 #define __HAL_RCC_USART2_IS_CLK_SLEEP_DISABLED()         ((RCC->APB1LLPENR & (RCC_APB1LLPENR_USART2LPEN))  == 0U)\r
4723 #define __HAL_RCC_USART3_IS_CLK_SLEEP_DISABLED()         ((RCC->APB1LLPENR & (RCC_APB1LLPENR_USART3LPEN))  == 0U)\r
4724 #define __HAL_RCC_UART4_IS_CLK_SLEEP_DISABLED()          ((RCC->APB1LLPENR & (RCC_APB1LLPENR_UART4LPEN))   == 0U)\r
4725 #define __HAL_RCC_UART5_IS_CLK_SLEEP_DISABLED()          ((RCC->APB1LLPENR & (RCC_APB1LLPENR_UART5LPEN))   == 0U)\r
4726 #define __HAL_RCC_I2C1_IS_CLK_SLEEP_DISABLED()           ((RCC->APB1LLPENR & (RCC_APB1LLPENR_I2C1LPEN))    == 0U)\r
4727 #define __HAL_RCC_I2C2_IS_CLK_SLEEP_DISABLED()           ((RCC->APB1LLPENR & (RCC_APB1LLPENR_I2C2LPEN))    == 0U)\r
4728 #define __HAL_RCC_I2C3_IS_CLK_SLEEP_DISABLED()           ((RCC->APB1LLPENR & (RCC_APB1LLPENR_I2C3LPEN))    == 0U)\r
4729 #define __HAL_RCC_CEC_IS_CLK_SLEEP_DISABLED()            ((RCC->APB1LLPENR & (RCC_APB1LLPENR_CECLPEN))     == 0U)\r
4730 #define __HAL_RCC_DAC12_IS_CLK_SLEEP_DISABLED()          ((RCC->APB1LLPENR & (RCC_APB1LLPENR_DAC12LPEN))   == 0U)\r
4731 #define __HAL_RCC_UART7_IS_CLK_SLEEP_DISABLED()          ((RCC->APB1LLPENR & (RCC_APB1LLPENR_UART7LPEN))   == 0U)\r
4732 #define __HAL_RCC_UART8_IS_CLK_SLEEP_DISABLED()          ((RCC->APB1LLPENR & (RCC_APB1LLPENR_UART8LPEN))   == 0U)\r
4733 #define __HAL_RCC_CRS_IS_CLK_SLEEP_DISABLED()            ((RCC->APB1HLPENR & (RCC_APB1HLPENR_CRSLPEN))     == 0U)\r
4734 #define __HAL_RCC_SWPMI1_IS_CLK_SLEEP_DISABLED()         ((RCC->APB1HLPENR & (RCC_APB1HLPENR_SWPMILPEN))   == 0U)\r
4735 #define __HAL_RCC_OPAMP_IS_CLK_SLEEP_DISABLED()          ((RCC->APB1HLPENR & (RCC_APB1HLPENR_OPAMPLPEN))   == 0U)\r
4736 #define __HAL_RCC_MDIOS_IS_CLK_SLEEP_DISABLED()          ((RCC->APB1HLPENR & (RCC_APB1HLPENR_MDIOSLPEN))   == 0U)\r
4737 #define __HAL_RCC_FDCAN_IS_CLK_SLEEP_DISABLED()          ((RCC->APB1HLPENR & (RCC_APB1HLPENR_FDCANLPEN))   == 0U)\r
4738 \r
4739 \r
4740 /** @brief  ENABLE or disable the APB2 peripheral clock during Low Power (Sleep) mode.\r
4741   * @note   Peripheral clock gating in SLEEP mode can be used to further reduce\r
4742   *         power consumption.\r
4743   * @note   After wakeup from SLEEP mode, the peripheral clock is ENABLEd again.\r
4744   * @note   By default, all peripheral clocks are ENABLEd during SLEEP mode.\r
4745   */\r
4746 \r
4747 #define __HAL_RCC_TIM1_CLK_SLEEP_ENABLE()           (RCC->APB2LPENR) |= (RCC_APB2LPENR_TIM1LPEN)\r
4748 #define __HAL_RCC_TIM8_CLK_SLEEP_ENABLE()           (RCC->APB2LPENR) |= (RCC_APB2LPENR_TIM8LPEN)\r
4749 #define __HAL_RCC_USART1_CLK_SLEEP_ENABLE()         (RCC->APB2LPENR) |= (RCC_APB2LPENR_USART1LPEN)\r
4750 #define __HAL_RCC_USART6_CLK_SLEEP_ENABLE()         (RCC->APB2LPENR) |= (RCC_APB2LPENR_USART6LPEN)\r
4751 #define __HAL_RCC_SPI1_CLK_SLEEP_ENABLE()           (RCC->APB2LPENR) |= (RCC_APB2LPENR_SPI1LPEN)\r
4752 #define __HAL_RCC_SPI4_CLK_SLEEP_ENABLE()           (RCC->APB2LPENR) |= (RCC_APB2LPENR_SPI4LPEN)\r
4753 #define __HAL_RCC_TIM15_CLK_SLEEP_ENABLE()          (RCC->APB2LPENR) |= (RCC_APB2LPENR_TIM15LPEN)\r
4754 #define __HAL_RCC_TIM16_CLK_SLEEP_ENABLE()          (RCC->APB2LPENR) |= (RCC_APB2LPENR_TIM16LPEN)\r
4755 #define __HAL_RCC_TIM17_CLK_SLEEP_ENABLE()          (RCC->APB2LPENR) |= (RCC_APB2LPENR_TIM17LPEN)\r
4756 #define __HAL_RCC_SPI5_CLK_SLEEP_ENABLE()           (RCC->APB2LPENR) |= (RCC_APB2LPENR_SPI5LPEN)\r
4757 #define __HAL_RCC_SAI1_CLK_SLEEP_ENABLE()           (RCC->APB2LPENR) |= (RCC_APB2LPENR_SAI1LPEN)\r
4758 #define __HAL_RCC_SAI2_CLK_SLEEP_ENABLE()           (RCC->APB2LPENR) |= (RCC_APB2LPENR_SAI2LPEN)\r
4759 #define __HAL_RCC_SAI3_CLK_SLEEP_ENABLE()           (RCC->APB2LPENR) |= (RCC_APB2LPENR_SAI3LPEN)\r
4760 #define __HAL_RCC_DFSDM1_CLK_SLEEP_ENABLE()         (RCC->APB2LPENR) |= (RCC_APB2LPENR_DFSDM1LPEN)\r
4761 #define __HAL_RCC_HRTIM1_CLK_SLEEP_ENABLE()         (RCC->APB2LPENR) |= (RCC_APB2LPENR_HRTIMLPEN)\r
4762 \r
4763 #define __HAL_RCC_TIM1_CLK_SLEEP_DISABLE()           (RCC->APB2LPENR) &= ~ (RCC_APB2LPENR_TIM1LPEN)\r
4764 #define __HAL_RCC_TIM8_CLK_SLEEP_DISABLE()           (RCC->APB2LPENR) &= ~ (RCC_APB2LPENR_TIM8LPEN)\r
4765 #define __HAL_RCC_USART1_CLK_SLEEP_DISABLE()         (RCC->APB2LPENR) &= ~ (RCC_APB2LPENR_USART1LPEN)\r
4766 #define __HAL_RCC_USART6_CLK_SLEEP_DISABLE()         (RCC->APB2LPENR) &= ~ (RCC_APB2LPENR_USART6LPEN)\r
4767 #define __HAL_RCC_SPI1_CLK_SLEEP_DISABLE()           (RCC->APB2LPENR) &= ~ (RCC_APB2LPENR_SPI1LPEN)\r
4768 #define __HAL_RCC_SPI4_CLK_SLEEP_DISABLE()           (RCC->APB2LPENR) &= ~ (RCC_APB2LPENR_SPI4LPEN)\r
4769 #define __HAL_RCC_TIM15_CLK_SLEEP_DISABLE()          (RCC->APB2LPENR) &= ~ (RCC_APB2LPENR_TIM15LPEN)\r
4770 #define __HAL_RCC_TIM16_CLK_SLEEP_DISABLE()          (RCC->APB2LPENR) &= ~ (RCC_APB2LPENR_TIM16LPEN)\r
4771 #define __HAL_RCC_TIM17_CLK_SLEEP_DISABLE()          (RCC->APB2LPENR) &= ~ (RCC_APB2LPENR_TIM17LPEN)\r
4772 #define __HAL_RCC_SPI5_CLK_SLEEP_DISABLE()           (RCC->APB2LPENR) &= ~ (RCC_APB2LPENR_SPI5LPEN)\r
4773 #define __HAL_RCC_SAI1_CLK_SLEEP_DISABLE()           (RCC->APB2LPENR) &= ~ (RCC_APB2LPENR_SAI1LPEN)\r
4774 #define __HAL_RCC_SAI2_CLK_SLEEP_DISABLE()           (RCC->APB2LPENR) &= ~ (RCC_APB2LPENR_SAI2LPEN)\r
4775 #define __HAL_RCC_SAI3_CLK_SLEEP_DISABLE()           (RCC->APB2LPENR) &= ~ (RCC_APB2LPENR_SAI3LPEN)\r
4776 #define __HAL_RCC_DFSDM1_CLK_SLEEP_DISABLE()         (RCC->APB2LPENR) &= ~ (RCC_APB2LPENR_DFSDM1LPEN)\r
4777 #define __HAL_RCC_HRTIM1_CLK_SLEEP_DISABLE()         (RCC->APB2LPENR) &= ~ (RCC_APB2LPENR_HRTIMLPEN)\r
4778 \r
4779 \r
4780 /** @brief  Get the enable or disable status of the APB2 peripheral clock during Low Poser (Sleep) mode.\r
4781   * @note   Peripheral clock gating in SLEEP mode can be used to further reduce\r
4782   *         power consumption.\r
4783   * @note   After wakeup from SLEEP mode, the peripheral clock is enabled again.\r
4784   * @note   By default, all peripheral clocks are enabled during SLEEP mode.\r
4785   */\r
4786 \r
4787 #define __HAL_RCC_TIM1_IS_CLK_SLEEP_ENABLED()            ((RCC->APB2LPENR & (RCC_APB2LPENR_TIM1LPEN))   != 0U)\r
4788 #define __HAL_RCC_TIM8_IS_CLK_SLEEP_ENABLED()            ((RCC->APB2LPENR & (RCC_APB2LPENR_TIM8LPEN))   != 0U)\r
4789 #define __HAL_RCC_USART1_IS_CLK_SLEEP_ENABLED()          ((RCC->APB2LPENR & (RCC_APB2LPENR_USART1LPEN)) != 0U)\r
4790 #define __HAL_RCC_USART6_IS_CLK_SLEEP_ENABLED()          ((RCC->APB2LPENR & (RCC_APB2LPENR_USART6LPEN)) != 0U)\r
4791 #define __HAL_RCC_SPI1_IS_CLK_SLEEP_ENABLED()            ((RCC->APB2LPENR & (RCC_APB2LPENR_SPI1LPEN))   != 0U)\r
4792 #define __HAL_RCC_SPI4_IS_CLK_SLEEP_ENABLED()            ((RCC->APB2LPENR & (RCC_APB2LPENR_SPI4LPEN))   != 0U)\r
4793 #define __HAL_RCC_TIM15_IS_CLK_SLEEP_ENABLED()           ((RCC->APB2LPENR & (RCC_APB2LPENR_TIM15LPEN))  != 0U)\r
4794 #define __HAL_RCC_TIM16_IS_CLK_SLEEP_ENABLED()           ((RCC->APB2LPENR & (RCC_APB2LPENR_TIM16LPEN))  != 0U)\r
4795 #define __HAL_RCC_TIM17_IS_CLK_SLEEP_ENABLED()           ((RCC->APB2LPENR & (RCC_APB2LPENR_TIM17LPEN))  != 0U)\r
4796 #define __HAL_RCC_SPI5_IS_CLK_SLEEP_ENABLED()            ((RCC->APB2LPENR & (RCC_APB2LPENR_SPI5LPEN))   != 0U)\r
4797 #define __HAL_RCC_SAI1_IS_CLK_SLEEP_ENABLED()            ((RCC->APB2LPENR & (RCC_APB2LPENR_SAI1LPEN))   != 0U)\r
4798 #define __HAL_RCC_SAI2_IS_CLK_SLEEP_ENABLED()            ((RCC->APB2LPENR & (RCC_APB2LPENR_SAI2LPEN))   != 0U)\r
4799 #define __HAL_RCC_SAI3_IS_CLK_SLEEP_ENABLED()            ((RCC->APB2LPENR & (RCC_APB2LPENR_SAI3LPEN))   != 0U)\r
4800 #define __HAL_RCC_DFSDM1_IS_CLK_SLEEP_ENABLED()          ((RCC->APB2LPENR & (RCC_APB2LPENR_DFSDM1LPEN)) != 0U)\r
4801 #define __HAL_RCC_HRTIM1_IS_CLK_SLEEP_ENABLED()          ((RCC->APB2LPENR & (RCC_APB2LPENR_HRTIMLPEN))  != 0U)\r
4802 \r
4803 #define __HAL_RCC_TIM1_IS_CLK_SLEEP_DISABLED()           ((RCC->APB2LPENR & (RCC_APB2LPENR_TIM1LPEN))   == 0U)\r
4804 #define __HAL_RCC_TIM8_IS_CLK_SLEEP_DISABLED()           ((RCC->APB2LPENR & (RCC_APB2LPENR_TIM8LPEN))   == 0U)\r
4805 #define __HAL_RCC_USART1_IS_CLK_SLEEP_DISABLED()         ((RCC->APB2LPENR & (RCC_APB2LPENR_USART1LPEN)) == 0U)\r
4806 #define __HAL_RCC_USART6_IS_CLK_SLEEP_DISABLED()         ((RCC->APB2LPENR & (RCC_APB2LPENR_USART6LPEN)) == 0U)\r
4807 #define __HAL_RCC_SPI1_IS_CLK_SLEEP_DISABLED()           ((RCC->APB2LPENR & (RCC_APB2LPENR_SPI1LPEN))   == 0U)\r
4808 #define __HAL_RCC_SPI4_IS_CLK_SLEEP_DISABLED()           ((RCC->APB2LPENR & (RCC_APB2LPENR_SPI4LPEN))   == 0U)\r
4809 #define __HAL_RCC_TIM15_IS_CLK_SLEEP_DISABLED()          ((RCC->APB2LPENR & (RCC_APB2LPENR_TIM15LPEN))  == 0U)\r
4810 #define __HAL_RCC_TIM16_IS_CLK_SLEEP_DISABLED()          ((RCC->APB2LPENR & (RCC_APB2LPENR_TIM16LPEN))  == 0U)\r
4811 #define __HAL_RCC_TIM17_IS_CLK_SLEEP_DISABLED()          ((RCC->APB2LPENR & (RCC_APB2LPENR_TIM17LPEN))  == 0U)\r
4812 #define __HAL_RCC_SPI5_IS_CLK_SLEEP_DISABLED()           ((RCC->APB2LPENR & (RCC_APB2LPENR_SPI5LPEN))   == 0U)\r
4813 #define __HAL_RCC_SAI1_IS_CLK_SLEEP_DISABLED()           ((RCC->APB2LPENR & (RCC_APB2LPENR_SAI1LPEN))   == 0U)\r
4814 #define __HAL_RCC_SAI2_IS_CLK_SLEEP_DISABLED()           ((RCC->APB2LPENR & (RCC_APB2LPENR_SAI2LPEN))   == 0U)\r
4815 #define __HAL_RCC_SAI3_IS_CLK_SLEEP_DISABLED()           ((RCC->APB2LPENR & (RCC_APB2LPENR_SAI3LPEN))   == 0U)\r
4816 #define __HAL_RCC_DFSDM1_IS_CLK_SLEEP_DISABLED()         ((RCC->APB2LPENR & (RCC_APB2LPENR_DFSDM1LPEN)) == 0U)\r
4817 #define __HAL_RCC_HRTIM1_IS_CLK_SLEEP_DISABLED()         ((RCC->APB2LPENR & (RCC_APB2LPENR_HRTIMLPEN))  == 0U)\r
4818 \r
4819 \r
4820 /** @brief  ENABLE or disable the APB4 peripheral clock during Low Power (Sleep) mode.\r
4821   * @note   Peripheral clock gating in SLEEP mode can be used to further reduce\r
4822   *         power consumption.\r
4823   * @note   After wakeup from SLEEP mode, the peripheral clock is ENABLEd again.\r
4824   * @note   By default, all peripheral clocks are ENABLEd during SLEEP mode.\r
4825   */\r
4826 \r
4827 #define __HAL_RCC_SYSCFG_CLK_SLEEP_ENABLE()           (RCC->APB4LPENR) |= (RCC_APB4LPENR_SYSCFGLPEN)\r
4828 #define __HAL_RCC_LPUART1_CLK_SLEEP_ENABLE()          (RCC->APB4LPENR) |= (RCC_APB4LPENR_LPUART1LPEN)\r
4829 #define __HAL_RCC_SPI6_CLK_SLEEP_ENABLE()             (RCC->APB4LPENR) |= (RCC_APB4LPENR_SPI6LPEN)\r
4830 #define __HAL_RCC_I2C4_CLK_SLEEP_ENABLE()             (RCC->APB4LPENR) |= (RCC_APB4LPENR_I2C4LPEN)\r
4831 #define __HAL_RCC_LPTIM2_CLK_SLEEP_ENABLE()           (RCC->APB4LPENR) |= (RCC_APB4LPENR_LPTIM2LPEN)\r
4832 #define __HAL_RCC_LPTIM3_CLK_SLEEP_ENABLE()           (RCC->APB4LPENR) |= (RCC_APB4LPENR_LPTIM3LPEN)\r
4833 #define __HAL_RCC_LPTIM4_CLK_SLEEP_ENABLE()           (RCC->APB4LPENR) |= (RCC_APB4LPENR_LPTIM4LPEN)\r
4834 #define __HAL_RCC_LPTIM5_CLK_SLEEP_ENABLE()           (RCC->APB4LPENR) |= (RCC_APB4LPENR_LPTIM5LPEN)\r
4835 #define __HAL_RCC_COMP12_CLK_SLEEP_ENABLE()           (RCC->APB4LPENR) |= (RCC_APB4LPENR_COMP12LPEN)\r
4836 #define __HAL_RCC_VREF_CLK_SLEEP_ENABLE()             (RCC->APB4LPENR) |= (RCC_APB4LPENR_VREFLPEN)\r
4837 #define __HAL_RCC_RTC_CLK_SLEEP_ENABLE()              (RCC->APB4LPENR) |= (RCC_APB4LPENR_RTCAPBLPEN)\r
4838 #define __HAL_RCC_SAI4_CLK_SLEEP_ENABLE()             (RCC->APB4LPENR) |= (RCC_APB4LPENR_SAI4LPEN)\r
4839 \r
4840 #define __HAL_RCC_SYSCFG_CLK_SLEEP_DISABLE()           (RCC->APB4LPENR) &= ~ (RCC_APB4LPENR_SYSCFGLPEN)\r
4841 #define __HAL_RCC_LPUART1_CLK_SLEEP_DISABLE()          (RCC->APB4LPENR) &= ~ (RCC_APB4LPENR_LPUART1LPEN)\r
4842 #define __HAL_RCC_SPI6_CLK_SLEEP_DISABLE()             (RCC->APB4LPENR) &= ~ (RCC_APB4LPENR_SPI6LPEN)\r
4843 #define __HAL_RCC_I2C4_CLK_SLEEP_DISABLE()             (RCC->APB4LPENR) &= ~ (RCC_APB4LPENR_I2C4LPEN)\r
4844 #define __HAL_RCC_LPTIM2_CLK_SLEEP_DISABLE()           (RCC->APB4LPENR) &= ~ (RCC_APB4LPENR_LPTIM2LPEN)\r
4845 #define __HAL_RCC_LPTIM3_CLK_SLEEP_DISABLE()           (RCC->APB4LPENR) &= ~ (RCC_APB4LPENR_LPTIM3LPEN)\r
4846 #define __HAL_RCC_LPTIM4_CLK_SLEEP_DISABLE()           (RCC->APB4LPENR) &= ~ (RCC_APB4LPENR_LPTIM4LPEN)\r
4847 #define __HAL_RCC_LPTIM5_CLK_SLEEP_DISABLE()           (RCC->APB4LPENR) &= ~ (RCC_APB4LPENR_LPTIM5LPEN)\r
4848 #define __HAL_RCC_COMP12_CLK_SLEEP_DISABLE()           (RCC->APB4LPENR) &= ~ (RCC_APB4LPENR_COMP12LPEN)\r
4849 #define __HAL_RCC_VREF_CLK_SLEEP_DISABLE()             (RCC->APB4LPENR) &= ~ (RCC_APB4LPENR_VREFLPEN)\r
4850 #define __HAL_RCC_RTC_CLK_SLEEP_DISABLE()              (RCC->APB4LPENR) &= ~ (RCC_APB4LPENR_RTCAPBLPEN)\r
4851 #define __HAL_RCC_SAI4_CLK_SLEEP_DISABLE()             (RCC->APB4LPENR) &= ~ (RCC_APB4LPENR_SAI4LPEN)\r
4852 \r
4853 \r
4854 \r
4855 /** @brief  Get the enable or disable status of the APB4 peripheral clock during Low Poser (Sleep) mode.\r
4856   * @note   Peripheral clock gating in SLEEP mode can be used to further reduce\r
4857   *         power consumption.\r
4858   * @note   After wakeup from SLEEP mode, the peripheral clock is enabled again.\r
4859   * @note   By default, all peripheral clocks are enabled during SLEEP mode.\r
4860   */\r
4861 \r
4862 #define __HAL_RCC_SYSCFG_IS_CLK_SLEEP_ENABLED()            ((RCC->APB4LPENR & (RCC_APB4LPENR_SYSCFGLPEN))  != 0U)\r
4863 #define __HAL_RCC_LPUART1_IS_CLK_SLEEP_ENABLED()           ((RCC->APB4LPENR & (RCC_APB4LPENR_LPUART1LPEN)) != 0U)\r
4864 #define __HAL_RCC_SPI6_IS_CLK_SLEEP_ENABLED()              ((RCC->APB4LPENR & (RCC_APB4LPENR_SPI6LPEN))    != 0U)\r
4865 #define __HAL_RCC_I2C4_IS_CLK_SLEEP_ENABLED()              ((RCC->APB4LPENR & (RCC_APB4LPENR_I2C4LPEN))    != 0U)\r
4866 #define __HAL_RCC_LPTIM2_IS_CLK_SLEEP_ENABLED()            ((RCC->APB4LPENR & (RCC_APB4LPENR_LPTIM2LPEN))  != 0U)\r
4867 #define __HAL_RCC_LPTIM3_IS_CLK_SLEEP_ENABLED()            ((RCC->APB4LPENR & (RCC_APB4LPENR_LPTIM3LPEN))  != 0U)\r
4868 #define __HAL_RCC_LPTIM4_IS_CLK_SLEEP_ENABLED()            ((RCC->APB4LPENR & (RCC_APB4LPENR_LPTIM4LPEN))  != 0U)\r
4869 #define __HAL_RCC_LPTIM5_IS_CLK_SLEEP_ENABLED()            ((RCC->APB4LPENR & (RCC_APB4LPENR_LPTIM5LPEN))  != 0U)\r
4870 #define __HAL_RCC_COMP12_IS_CLK_SLEEP_ENABLED()            ((RCC->APB4LPENR & (RCC_APB4LPENR_COMP12LPEN))  != 0U)\r
4871 #define __HAL_RCC_VREF_IS_CLK_SLEEP_ENABLED()              ((RCC->APB4LPENR & (RCC_APB4LPENR_VREFLPEN))    != 0U)\r
4872 #define __HAL_RCC_RTC_IS_CLK_SLEEP_ENABLED()               ((RCC->APB4LPENR & (RCC_APB4LPENR_RTCAPBLPEN))  != 0U)\r
4873 #define __HAL_RCC_SAI4_IS_CLK_SLEEP_ENABLED()              ((RCC->APB4LPENR & (RCC_APB4LPENR_SAI4LPEN))    != 0U)\r
4874 \r
4875 #define __HAL_RCC_SYSCFG_IS_CLK_SLEEP_DISABLED()           ((RCC->APB4LPENR & (RCC_APB4LPENR_SYSCFGLPEN))  == 0U)\r
4876 #define __HAL_RCC_LPUART1_IS_CLK_SLEEP_DISABLED()          ((RCC->APB4LPENR & (RCC_APB4LPENR_LPUART1LPEN)) == 0U)\r
4877 #define __HAL_RCC_SPI6_IS_CLK_SLEEP_DISABLED()             ((RCC->APB4LPENR & (RCC_APB4LPENR_SPI6LPEN))    == 0U)\r
4878 #define __HAL_RCC_I2C4_IS_CLK_SLEEP_DISABLED()             ((RCC->APB4LPENR & (RCC_APB4LPENR_I2C4LPEN))    == 0U)\r
4879 #define __HAL_RCC_LPTIM2_IS_CLK_SLEEP_DISABLED()           ((RCC->APB4LPENR & (RCC_APB4LPENR_LPTIM2LPEN))  == 0U)\r
4880 #define __HAL_RCC_LPTIM3_IS_CLK_SLEEP_DISABLED()           ((RCC->APB4LPENR & (RCC_APB4LPENR_LPTIM3LPEN))  == 0U)\r
4881 #define __HAL_RCC_LPTIM4_IS_CLK_SLEEP_DISABLED()           ((RCC->APB4LPENR & (RCC_APB4LPENR_LPTIM4LPEN))  == 0U)\r
4882 #define __HAL_RCC_LPTIM5_IS_CLK_SLEEP_DISABLED()           ((RCC->APB4LPENR & (RCC_APB4LPENR_LPTIM5LPEN))  == 0U)\r
4883 #define __HAL_RCC_COMP12_IS_CLK_SLEEP_DISABLED()           ((RCC->APB4LPENR & (RCC_APB4LPENR_COMP12LPEN))  == 0U)\r
4884 #define __HAL_RCC_VREF_IS_CLK_SLEEP_DISABLED()             ((RCC->APB4LPENR & (RCC_APB4LPENR_VREFLPEN))    == 0U)\r
4885 #define __HAL_RCC_RTC_IS_CLK_SLEEP_DISABLED()              ((RCC->APB4LPENR & (RCC_APB4LPENR_RTCAPBLPEN))  == 0U)\r
4886 #define __HAL_RCC_SAI4_IS_CLK_SLEEP_DISABLED()             ((RCC->APB4LPENR & (RCC_APB4LPENR_SAI4LPEN))    == 0U)\r
4887 \r
4888 \r
4889 #if defined(DUAL_CORE)\r
4890 \r
4891 /** @brief  Enable or disable the RCC_C1 AHB3 peripheral clock during Low Power (Sleep) mode.\r
4892   * @note   Peripheral clock gating in SLEEP mode can be used to further reduce\r
4893   *         power consumption.\r
4894   * @note   After wakeup from SLEEP mode, the peripheral clock is enabled again.\r
4895   * @note   By default, all peripheral clocks are enabled during SLEEP mode.\r
4896   */\r
4897 #define __HAL_RCC_C1_MDMA_CLK_SLEEP_ENABLE()            (RCC_C1->AHB3LPENR |= (RCC_AHB3LPENR_MDMALPEN))\r
4898 #define __HAL_RCC_C1_DMA2D_CLK_SLEEP_ENABLE()           (RCC_C1->AHB3LPENR |= (RCC_AHB3LPENR_DMA2DLPEN))\r
4899 #define __HAL_RCC_C1_JPGDEC_CLK_SLEEP_ENABLE()          (RCC_C1->AHB3LPENR |= (RCC_AHB3LPENR_JPGDECLPEN))\r
4900 #define __HAL_RCC_C1_FLASH_CLK_SLEEP_ENABLE()           (RCC_C1->AHB3LPENR |= (RCC_AHB3LPENR_FLASHLPEN))\r
4901 #define __HAL_RCC_C1_FMC_CLK_SLEEP_ENABLE()             (RCC_C1->AHB3LPENR |= (RCC_AHB3LPENR_FMCLPEN))\r
4902 #define __HAL_RCC_C1_QSPI_CLK_SLEEP_ENABLE()            (RCC_C1->AHB3LPENR |= (RCC_AHB3LPENR_QSPILPEN))\r
4903 #define __HAL_RCC_C1_SDMMC1_CLK_SLEEP_ENABLE()          (RCC_C1->AHB3LPENR |= (RCC_AHB3LPENR_SDMMC1LPEN))\r
4904 #define __HAL_RCC_C1_DTCM1_CLK_SLEEP_ENABLE()           (RCC_C1->AHB3LPENR |= (RCC_AHB3LPENR_DTCM1LPEN))\r
4905 #define __HAL_RCC_C1_DTCM2_CLK_SLEEP_ENABLE()           (RCC_C1->AHB3LPENR |= (RCC_AHB3LPENR_DTCM2LPEN))\r
4906 #define __HAL_RCC_C1_ITCM_CLK_SLEEP_ENABLE()            (RCC_C1->AHB3LPENR |= (RCC_AHB3LPENR_ITCMLPEN))\r
4907 #define __HAL_RCC_C1_D1SRAM1_CLK_SLEEP_ENABLE()         (RCC_C1->AHB3LPENR |= (RCC_AHB3LPENR_AXISRAMLPEN))\r
4908 \r
4909 \r
4910 #define __HAL_RCC_C1_MDMA_CLK_SLEEP_DISABLE()            (RCC_C1->AHB3LPENR &= ~ (RCC_AHB3LPENR_MDMALPEN))\r
4911 #define __HAL_RCC_C1_DMA2D_CLK_SLEEP_DISABLE()           (RCC_C1->AHB3LPENR &= ~ (RCC_AHB3LPENR_DMA2DLPEN))\r
4912 #define __HAL_RCC_C1_JPGDEC_CLK_SLEEP_DISABLE()          (RCC_C1->AHB3LPENR &= ~ (RCC_AHB3LPENR_JPGDECLPEN))\r
4913 #define __HAL_RCC_C1_FLASH_CLK_SLEEP_DISABLE()           (RCC_C1->AHB3LPENR &= ~ (RCC_AHB3LPENR_FLASHLPEN))\r
4914 #define __HAL_RCC_C1_FMC_CLK_SLEEP_DISABLE()             (RCC_C1->AHB3LPENR &= ~ (RCC_AHB3LPENR_FMCLPEN))\r
4915 #define __HAL_RCC_C1_QSPI_CLK_SLEEP_DISABLE()            (RCC_C1->AHB3LPENR &= ~ (RCC_AHB3LPENR_QSPILPEN))\r
4916 #define __HAL_RCC_C1_SDMMC1_CLK_SLEEP_DISABLE()          (RCC_C1->AHB3LPENR &= ~ (RCC_AHB3LPENR_SDMMC1LPEN))\r
4917 #define __HAL_RCC_C1_DTCM1_CLK_SLEEP_DISABLE()           (RCC_C1->AHB3LPENR &= ~ (RCC_AHB3LPENR_DTCM1LPEN))\r
4918 #define __HAL_RCC_C1_DTCM2_CLK_SLEEP_DISABLE()           (RCC_C1->AHB3LPENR &= ~ (RCC_AHB3LPENR_DTCM2LPEN))\r
4919 #define __HAL_RCC_C1_ITCM_CLK_SLEEP_DISABLE()            (RCC_C1->AHB3LPENR &= ~ (RCC_AHB3LPENR_ITCMLPEN))\r
4920 #define __HAL_RCC_C1_D1SRAM1_CLK_SLEEP_DISABLE()         (RCC_C1->AHB3LPENR &= ~ (RCC_AHB3LPENR_AXISRAMLPEN))\r
4921 \r
4922 \r
4923 \r
4924 /** @brief  ENABLE or disable the AHB1 peripheral clock during Low Power (Sleep) mode.\r
4925   * @note   Peripheral clock gating in SLEEP mode can be used to further reduce\r
4926   *         power consumption.\r
4927   * @note   After wakeup from SLEEP mode, the peripheral clock is ENABLEd again.\r
4928   * @note   By default, all peripheral clocks are ENABLEd during SLEEP mode.\r
4929   */\r
4930 \r
4931 #define __HAL_RCC_C1_DMA1_CLK_SLEEP_ENABLE()             (RCC_C1->AHB1LPENR |= (RCC_AHB1LPENR_DMA1LPEN))\r
4932 #define __HAL_RCC_C1_DMA2_CLK_SLEEP_ENABLE()             (RCC_C1->AHB1LPENR |= (RCC_AHB1LPENR_DMA2LPEN))\r
4933 #define __HAL_RCC_C1_ADC12_CLK_SLEEP_ENABLE()            (RCC_C1->AHB1LPENR |= (RCC_AHB1LPENR_ADC12LPEN))\r
4934 #define __HAL_RCC_C1_ETH1MAC_CLK_SLEEP_ENABLE()          (RCC_C1->AHB1LPENR |= (RCC_AHB1LPENR_ETH1MACLPEN))\r
4935 #define __HAL_RCC_C1_ETH1TX_CLK_SLEEP_ENABLE()           (RCC_C1->AHB1LPENR |= (RCC_AHB1LPENR_ETH1TXLPEN))\r
4936 #define __HAL_RCC_C1_ETH1RX_CLK_SLEEP_ENABLE()           (RCC_C1->AHB1LPENR |= (RCC_AHB1LPENR_ETH1RXLPEN))\r
4937 #define __HAL_RCC_C1_USB1_OTG_HS_CLK_SLEEP_ENABLE()      (RCC_C1->AHB1LPENR |= (RCC_AHB1LPENR_USB1OTGHSLPEN))\r
4938 #define __HAL_RCC_C1_USB1_OTG_HS_ULPI_CLK_SLEEP_ENABLE() (RCC_C1->AHB1LPENR |= (RCC_AHB1LPENR_USB1OTGHSULPILPEN))\r
4939 #define __HAL_RCC_C1_USB2_OTG_FS_CLK_SLEEP_ENABLE()      (RCC_C1->AHB1LPENR |= (RCC_AHB1LPENR_USB2OTGHSLPEN))\r
4940 #define __HAL_RCC_C1_USB2_OTG_FS_ULPI_CLK_SLEEP_ENABLE() (RCC_C1->AHB1LPENR |= (RCC_AHB1LPENR_USB2OTGHSULPILPEN))\r
4941 \r
4942 #define __HAL_RCC_C1_DMA1_CLK_SLEEP_DISABLE()             (RCC_C1->AHB1LPENR &= ~ (RCC_AHB1LPENR_DMA1LPEN))\r
4943 #define __HAL_RCC_C1_DMA2_CLK_SLEEP_DISABLE()             (RCC_C1->AHB1LPENR &= ~ (RCC_AHB1LPENR_DMA2LPEN))\r
4944 #define __HAL_RCC_C1_ADC12_CLK_SLEEP_DISABLE()            (RCC_C1->AHB1LPENR &= ~ (RCC_AHB1LPENR_ADC12LPEN))\r
4945 #define __HAL_RCC_C1_ETH1MAC_CLK_SLEEP_DISABLE()          (RCC_C1->AHB1LPENR &= ~ (RCC_AHB1LPENR_ETH1MACLPEN))\r
4946 #define __HAL_RCC_C1_ETH1TX_CLK_SLEEP_DISABLE()           (RCC_C1->AHB1LPENR &= ~ (RCC_AHB1LPENR_ETH1TXLPEN))\r
4947 #define __HAL_RCC_C1_ETH1RX_CLK_SLEEP_DISABLE()           (RCC_C1->AHB1LPENR &= ~ (RCC_AHB1LPENR_ETH1RXLPEN))\r
4948 #define __HAL_RCC_C1_USB1_OTG_HS_CLK_SLEEP_DISABLE()      (RCC_C1->AHB1LPENR &= ~ (RCC_AHB1LPENR_USB1OTGHSLPEN))\r
4949 #define __HAL_RCC_C1_USB1_OTG_HS_ULPI_CLK_SLEEP_DISABLE() (RCC_C1->AHB1LPENR &= ~ (RCC_AHB1LPENR_USB1OTGHSULPILPEN))\r
4950 #define __HAL_RCC_C1_USB2_OTG_FS_CLK_SLEEP_DISABLE()      (RCC_C1->AHB1LPENR &= ~ (RCC_AHB1LPENR_USB2OTGHSLPEN))\r
4951 #define __HAL_RCC_C1_USB2_OTG_FS_ULPI_CLK_SLEEP_DISABLE() (RCC_C1->AHB1LPENR &= ~ (RCC_AHB1LPENR_USB2OTGHSULPILPEN))\r
4952 \r
4953 /** @brief  ENABLE or disable the AHB2 peripheral clock during Low Power (Sleep) mode.\r
4954   * @note   Peripheral clock gating in SLEEP mode can be used to further reduce\r
4955   *         power consumption.\r
4956   * @note   After wakeup from SLEEP mode, the peripheral clock is ENABLEd again.\r
4957   * @note   By default, all peripheral clocks are ENABLEd during SLEEP mode.\r
4958   */\r
4959 \r
4960 #define __HAL_RCC_C1_DCMI_CLK_SLEEP_ENABLE()             (RCC_C1->AHB2LPENR |= (RCC_AHB2LPENR_DCMILPEN))\r
4961 #define __HAL_RCC_C1_CRYP_CLK_SLEEP_ENABLE()             (RCC_C1->AHB2LPENR |= (RCC_AHB2LPENR_CRYPLPEN))\r
4962 #define __HAL_RCC_C1_HASH_CLK_SLEEP_ENABLE()             (RCC_C1->AHB2LPENR |= (RCC_AHB2LPENR_HASHLPEN))\r
4963 #define __HAL_RCC_C1_RNG_CLK_SLEEP_ENABLE()              (RCC_C1->AHB2LPENR |= (RCC_AHB2LPENR_RNGLPEN))\r
4964 #define __HAL_RCC_C1_SDMMC2_CLK_SLEEP_ENABLE()           (RCC_C1->AHB2LPENR |= (RCC_AHB2LPENR_SDMMC2LPEN))\r
4965 #define __HAL_RCC_C1_D2SRAM1_CLK_SLEEP_ENABLE()          (RCC_C1->AHB2LPENR |= (RCC_AHB2LPENR_D2SRAM1LPEN))\r
4966 #define __HAL_RCC_C1_D2SRAM2_CLK_SLEEP_ENABLE()          (RCC_C1->AHB2LPENR |= (RCC_AHB2LPENR_D2SRAM2LPEN))\r
4967 #define __HAL_RCC_C1_D2SRAM3_CLK_SLEEP_ENABLE()          (RCC_C1->AHB2LPENR |= (RCC_AHB2LPENR_D2SRAM3LPEN))\r
4968 \r
4969 #define __HAL_RCC_C1_DCMI_CLK_SLEEP_DISABLE()             (RCC_C1->AHB2LPENR &= ~ (RCC_AHB2LPENR_DCMILPEN))\r
4970 #define __HAL_RCC_C1_CRYP_CLK_SLEEP_DISABLE()             (RCC_C1->AHB2LPENR &= ~ (RCC_AHB2LPENR_CRYPLPEN))\r
4971 #define __HAL_RCC_C1_HASH_CLK_SLEEP_DISABLE()             (RCC_C1->AHB2LPENR &= ~ (RCC_AHB2LPENR_HASHLPEN))\r
4972 #define __HAL_RCC_C1_RNG_CLK_SLEEP_DISABLE()              (RCC_C1->AHB2LPENR &= ~ (RCC_AHB2LPENR_RNGLPEN))\r
4973 #define __HAL_RCC_C1_SDMMC2_CLK_SLEEP_DISABLE()           (RCC_C1->AHB2LPENR &= ~ (RCC_AHB2LPENR_SDMMC2LPEN))\r
4974 #define __HAL_RCC_C1_D2SRAM1_CLK_SLEEP_DISABLE()          (RCC_C1->AHB2LPENR &= ~ (RCC_AHB2LPENR_D2SRAM1LPEN))\r
4975 #define __HAL_RCC_C1_D2SRAM2_CLK_SLEEP_DISABLE()          (RCC_C1->AHB2LPENR &= ~ (RCC_AHB2LPENR_D2SRAM2LPEN))\r
4976 #define __HAL_RCC_C1_D2SRAM3_CLK_SLEEP_DISABLE()          (RCC_C1->AHB2LPENR &= ~ (RCC_AHB2LPENR_D2SRAM3LPEN))\r
4977 \r
4978 /** @brief  ENABLE or disable the AHB4 peripheral clock during Low Power (Sleep) mode.\r
4979   * @note   Peripheral clock gating in SLEEP mode can be used to further reduce\r
4980   *         power consumption.\r
4981   * @note   After wakeup from SLEEP mode, the peripheral clock is ENABLEd again.\r
4982   * @note   By default, all peripheral clocks are ENABLEd during SLEEP mode.\r
4983   */\r
4984 \r
4985 #define __HAL_RCC_C1_GPIOA_CLK_SLEEP_ENABLE()           (RCC_C1->AHB4LPENR) |= (RCC_AHB4LPENR_GPIOALPEN)\r
4986 #define __HAL_RCC_C1_GPIOB_CLK_SLEEP_ENABLE()           (RCC_C1->AHB4LPENR) |= (RCC_AHB4LPENR_GPIOBLPEN)\r
4987 #define __HAL_RCC_C1_GPIOC_CLK_SLEEP_ENABLE()           (RCC_C1->AHB4LPENR) |= (RCC_AHB4LPENR_GPIOCLPEN)\r
4988 #define __HAL_RCC_C1_GPIOD_CLK_SLEEP_ENABLE()           (RCC_C1->AHB4LPENR) |= (RCC_AHB4LPENR_GPIODLPEN)\r
4989 #define __HAL_RCC_C1_GPIOE_CLK_SLEEP_ENABLE()           (RCC_C1->AHB4LPENR) |= (RCC_AHB4LPENR_GPIOELPEN)\r
4990 #define __HAL_RCC_C1_GPIOF_CLK_SLEEP_ENABLE()           (RCC_C1->AHB4LPENR) |= (RCC_AHB4LPENR_GPIOFLPEN)\r
4991 #define __HAL_RCC_C1_GPIOG_CLK_SLEEP_ENABLE()           (RCC_C1->AHB4LPENR) |= (RCC_AHB4LPENR_GPIOGLPEN)\r
4992 #define __HAL_RCC_C1_GPIOH_CLK_SLEEP_ENABLE()           (RCC_C1->AHB4LPENR) |= (RCC_AHB4LPENR_GPIOHLPEN)\r
4993 #define __HAL_RCC_C1_GPIOI_CLK_SLEEP_ENABLE()           (RCC_C1->AHB4LPENR) |= (RCC_AHB4LPENR_GPIOILPEN)\r
4994 #define __HAL_RCC_C1_GPIOJ_CLK_SLEEP_ENABLE()           (RCC_C1->AHB4LPENR) |= (RCC_AHB4LPENR_GPIOJLPEN)\r
4995 #define __HAL_RCC_C1_GPIOK_CLK_SLEEP_ENABLE()           (RCC_C1->AHB4LPENR) |= (RCC_AHB4LPENR_GPIOKLPEN)\r
4996 #define __HAL_RCC_C1_CRC_CLK_SLEEP_ENABLE()             (RCC_C1->AHB4LPENR) |= (RCC_AHB4LPENR_CRCLPEN)\r
4997 #define __HAL_RCC_C1_BDMA_CLK_SLEEP_ENABLE()            (RCC_C1->AHB4LPENR) |= (RCC_AHB4LPENR_BDMALPEN)\r
4998 #define __HAL_RCC_C1_ADC3_CLK_SLEEP_ENABLE()            (RCC_C1->AHB4LPENR) |= (RCC_AHB4LPENR_ADC3LPEN)\r
4999 #define __HAL_RCC_C1_BKPRAM_CLK_SLEEP_ENABLE()          (RCC_C1->AHB4LPENR) |= (RCC_AHB4LPENR_BKPRAMLPEN)\r
5000 #define __HAL_RCC_C1_D3SRAM1_CLK_SLEEP_ENABLE()         (RCC_C1->AHB4LPENR  |= (RCC_AHB4LPENR_D3SRAM1LPEN))\r
5001 \r
5002 #define __HAL_RCC_C1_GPIOA_CLK_SLEEP_DISABLE()           (RCC_C1->AHB4LPENR) &= ~ (RCC_AHB4LPENR_GPIOALPEN)\r
5003 #define __HAL_RCC_C1_GPIOB_CLK_SLEEP_DISABLE()           (RCC_C1->AHB4LPENR) &= ~ (RCC_AHB4LPENR_GPIOBLPEN)\r
5004 #define __HAL_RCC_C1_GPIOC_CLK_SLEEP_DISABLE()           (RCC_C1->AHB4LPENR) &= ~ (RCC_AHB4LPENR_GPIOCLPEN)\r
5005 #define __HAL_RCC_C1_GPIOD_CLK_SLEEP_DISABLE()           (RCC_C1->AHB4LPENR) &= ~ (RCC_AHB4LPENR_GPIODLPEN)\r
5006 #define __HAL_RCC_C1_GPIOE_CLK_SLEEP_DISABLE()           (RCC_C1->AHB4LPENR) &= ~ (RCC_AHB4LPENR_GPIOELPEN)\r
5007 #define __HAL_RCC_C1_GPIOF_CLK_SLEEP_DISABLE()           (RCC_C1->AHB4LPENR) &= ~ (RCC_AHB4LPENR_GPIOFLPEN)\r
5008 #define __HAL_RCC_C1_GPIOG_CLK_SLEEP_DISABLE()           (RCC_C1->AHB4LPENR) &= ~ (RCC_AHB4LPENR_GPIOGLPEN)\r
5009 #define __HAL_RCC_C1_GPIOH_CLK_SLEEP_DISABLE()           (RCC_C1->AHB4LPENR) &= ~ (RCC_AHB4LPENR_GPIOHLPEN)\r
5010 #define __HAL_RCC_C1_GPIOI_CLK_SLEEP_DISABLE()           (RCC_C1->AHB4LPENR) &= ~ (RCC_AHB4LPENR_GPIOILPEN)\r
5011 #define __HAL_RCC_C1_GPIOJ_CLK_SLEEP_DISABLE()           (RCC_C1->AHB4LPENR) &= ~ (RCC_AHB4LPENR_GPIOJLPEN)\r
5012 #define __HAL_RCC_C1_GPIOK_CLK_SLEEP_DISABLE()           (RCC_C1->AHB4LPENR) &= ~ (RCC_AHB4LPENR_GPIOKLPEN)\r
5013 #define __HAL_RCC_C1_CRC_CLK_SLEEP_DISABLE()             (RCC_C1->AHB4LPENR) &= ~ (RCC_AHB4LPENR_CRCLPEN)\r
5014 #define __HAL_RCC_C1_BDMA_CLK_SLEEP_DISABLE()            (RCC_C1->AHB4LPENR) &= ~ (RCC_AHB4LPENR_BDMALPEN)\r
5015 #define __HAL_RCC_C1_ADC3_CLK_SLEEP_DISABLE()            (RCC_C1->AHB4LPENR) &= ~ (RCC_AHB4LPENR_ADC3LPEN)\r
5016 #define __HAL_RCC_C1_BKPRAM_CLK_SLEEP_DISABLE()          (RCC_C1->AHB4LPENR) &= ~ (RCC_AHB4LPENR_BKPRAMLPEN)\r
5017 #define __HAL_RCC_C1_D3SRAM1_CLK_SLEEP_DISABLE()         (RCC_C1->AHB4LPENR  &= ~ (RCC_AHB4LPENR_D3SRAM1LPEN))\r
5018 \r
5019 /** @brief  ENABLE or disable the APB3 peripheral clock during Low Power (Sleep) mode.\r
5020   * @note   Peripheral clock gating in SLEEP mode can be used to further reduce\r
5021   *         power consumption.\r
5022   * @note   After wakeup from SLEEP mode, the peripheral clock is ENABLEd again.\r
5023   * @note   By default, all peripheral clocks are ENABLEd during SLEEP mode.\r
5024   */\r
5025 \r
5026 #define __HAL_RCC_C1_LTDC_CLK_SLEEP_ENABLE()           (RCC_C1->APB3LPENR) |= (RCC_APB3LPENR_LTDCLPEN)\r
5027 #define __HAL_RCC_C1_DSI_CLK_SLEEP_ENABLE()            (RCC_C1->APB3LPENR) |= (RCC_APB3LPENR_DSILPEN)\r
5028 #define __HAL_RCC_C1_WWDG1_CLK_SLEEP_ENABLE()          (RCC_C1->APB3LPENR) |= (RCC_APB3LPENR_WWDG1LPEN)\r
5029 \r
5030 #define __HAL_RCC_C1_LTDC_CLK_SLEEP_DISABLE()           (RCC_C1->APB3LPENR) &= ~ (RCC_APB3LPENR_LTDCLPEN)\r
5031 #define __HAL_RCC_C1_DSI_CLK_SLEEP_DISABLE()            (RCC_C1->APB3LPENR) &= ~ (RCC_APB3LPENR_DSILPEN)\r
5032 #define __HAL_RCC_C1_WWDG1_CLK_SLEEP_DISABLE()          (RCC_C1->APB3LPENR) &= ~ (RCC_APB3LPENR_WWDG1LPEN)\r
5033 \r
5034 /** @brief  ENABLE or disable the APB1 peripheral clock during Low Power (Sleep) mode.\r
5035   * @note   Peripheral clock gating in SLEEP mode can be used to further reduce\r
5036   *         power consumption.\r
5037   * @note   After wakeup from SLEEP mode, the peripheral clock is ENABLEd again.\r
5038   * @note   By default, all peripheral clocks are ENABLEd during SLEEP mode.\r
5039   */\r
5040 \r
5041 #define __HAL_RCC_C1_TIM2_CLK_SLEEP_ENABLE()           (RCC_C1->APB1LLPENR) |= (RCC_APB1LLPENR_TIM2LPEN)\r
5042 #define __HAL_RCC_C1_TIM3_CLK_SLEEP_ENABLE()           (RCC_C1->APB1LLPENR) |= (RCC_APB1LLPENR_TIM3LPEN)\r
5043 #define __HAL_RCC_C1_TIM4_CLK_SLEEP_ENABLE()           (RCC_C1->APB1LLPENR) |= (RCC_APB1LLPENR_TIM4LPEN)\r
5044 #define __HAL_RCC_C1_TIM5_CLK_SLEEP_ENABLE()           (RCC_C1->APB1LLPENR) |= (RCC_APB1LLPENR_TIM5LPEN)\r
5045 #define __HAL_RCC_C1_TIM6_CLK_SLEEP_ENABLE()           (RCC_C1->APB1LLPENR) |= (RCC_APB1LLPENR_TIM6LPEN)\r
5046 #define __HAL_RCC_C1_TIM7_CLK_SLEEP_ENABLE()           (RCC_C1->APB1LLPENR) |= (RCC_APB1LLPENR_TIM7LPEN)\r
5047 #define __HAL_RCC_C1_TIM12_CLK_SLEEP_ENABLE()          (RCC_C1->APB1LLPENR) |= (RCC_APB1LLPENR_TIM12LPEN)\r
5048 #define __HAL_RCC_C1_TIM13_CLK_SLEEP_ENABLE()          (RCC_C1->APB1LLPENR) |= (RCC_APB1LLPENR_TIM13LPEN)\r
5049 #define __HAL_RCC_C1_TIM14_CLK_SLEEP_ENABLE()          (RCC_C1->APB1LLPENR) |= (RCC_APB1LLPENR_TIM14LPEN)\r
5050 #define __HAL_RCC_C1_LPTIM1_CLK_SLEEP_ENABLE()         (RCC_C1->APB1LLPENR) |= (RCC_APB1LLPENR_LPTIM1LPEN)\r
5051 #define __HAL_RCC_C1_WWDG2_CLK_SLEEP_ENABLE()          (RCC_C1->APB1LLPENR) |= (RCC_APB1LLPENR_WWDG2LPEN)\r
5052 #define __HAL_RCC_C1_SPI2_CLK_SLEEP_ENABLE()           (RCC_C1->APB1LLPENR) |= (RCC_APB1LLPENR_SPI2LPEN)\r
5053 #define __HAL_RCC_C1_SPI3_CLK_SLEEP_ENABLE()           (RCC_C1->APB1LLPENR) |= (RCC_APB1LLPENR_SPI3LPEN)\r
5054 #define __HAL_RCC_C1_SPDIFRX_CLK_SLEEP_ENABLE()        (RCC_C1->APB1LLPENR) |= (RCC_APB1LLPENR_SPDIFRXLPEN)\r
5055 #define __HAL_RCC_C1_USART2_CLK_SLEEP_ENABLE()         (RCC_C1->APB1LLPENR) |= (RCC_APB1LLPENR_USART2LPEN)\r
5056 #define __HAL_RCC_C1_USART3_CLK_SLEEP_ENABLE()         (RCC_C1->APB1LLPENR) |= (RCC_APB1LLPENR_USART3LPEN)\r
5057 #define __HAL_RCC_C1_UART4_CLK_SLEEP_ENABLE()          (RCC_C1->APB1LLPENR) |= (RCC_APB1LLPENR_UART4LPEN)\r
5058 #define __HAL_RCC_C1_UART5_CLK_SLEEP_ENABLE()          (RCC_C1->APB1LLPENR) |= (RCC_APB1LLPENR_UART5LPEN)\r
5059 #define __HAL_RCC_C1_I2C1_CLK_SLEEP_ENABLE()           (RCC_C1->APB1LLPENR) |= (RCC_APB1LLPENR_I2C1LPEN)\r
5060 #define __HAL_RCC_C1_I2C2_CLK_SLEEP_ENABLE()           (RCC_C1->APB1LLPENR) |= (RCC_APB1LLPENR_I2C2LPEN)\r
5061 #define __HAL_RCC_C1_I2C3_CLK_SLEEP_ENABLE()           (RCC_C1->APB1LLPENR) |= (RCC_APB1LLPENR_I2C3LPEN)\r
5062 #define __HAL_RCC_C1_CEC_CLK_SLEEP_ENABLE()            (RCC_C1->APB1LLPENR) |= (RCC_APB1LLPENR_CECLPEN)\r
5063 #define __HAL_RCC_C1_DAC12_CLK_SLEEP_ENABLE()          (RCC_C1->APB1LLPENR) |= (RCC_APB1LLPENR_DAC12LPEN)\r
5064 #define __HAL_RCC_C1_UART7_CLK_SLEEP_ENABLE()          (RCC_C1->APB1LLPENR) |= (RCC_APB1LLPENR_UART7LPEN)\r
5065 #define __HAL_RCC_C1_UART8_CLK_SLEEP_ENABLE()          (RCC_C1->APB1LLPENR) |= (RCC_APB1LLPENR_UART8LPEN)\r
5066 #define __HAL_RCC_C1_CRS_CLK_SLEEP_ENABLE()            (RCC_C1->APB1HLPENR) |= (RCC_APB1HLPENR_CRSLPEN)\r
5067 #define __HAL_RCC_C1_SWPMI_CLK_SLEEP_ENABLE()          (RCC_C1->APB1HLPENR) |= (RCC_APB1HLPENR_SWPMILPEN)\r
5068 #define __HAL_RCC_C1_OPAMP_CLK_SLEEP_ENABLE()          (RCC_C1->APB1HLPENR) |= (RCC_APB1HLPENR_OPAMPLPEN)\r
5069 #define __HAL_RCC_C1_MDIOS_CLK_SLEEP_ENABLE()          (RCC_C1->APB1HLPENR) |= (RCC_APB1HLPENR_MDIOSLPEN)\r
5070 #define __HAL_RCC_C1_FDCAN_CLK_SLEEP_ENABLE()          (RCC_C1->APB1HLPENR) |= (RCC_APB1HLPENR_FDCANLPEN)\r
5071 \r
5072 \r
5073 #define __HAL_RCC_C1_TIM2_CLK_SLEEP_DISABLE()           (RCC_C1->APB1LLPENR) &= ~ (RCC_APB1LLPENR_TIM2LPEN)\r
5074 #define __HAL_RCC_C1_TIM3_CLK_SLEEP_DISABLE()           (RCC_C1->APB1LLPENR) &= ~ (RCC_APB1LLPENR_TIM3LPEN)\r
5075 #define __HAL_RCC_C1_TIM4_CLK_SLEEP_DISABLE()           (RCC_C1->APB1LLPENR) &= ~ (RCC_APB1LLPENR_TIM4LPEN)\r
5076 #define __HAL_RCC_C1_TIM5_CLK_SLEEP_DISABLE()           (RCC_C1->APB1LLPENR) &= ~ (RCC_APB1LLPENR_TIM5LPEN)\r
5077 #define __HAL_RCC_C1_TIM6_CLK_SLEEP_DISABLE()           (RCC_C1->APB1LLPENR) &= ~ (RCC_APB1LLPENR_TIM6LPEN)\r
5078 #define __HAL_RCC_C1_TIM7_CLK_SLEEP_DISABLE()           (RCC_C1->APB1LLPENR) &= ~ (RCC_APB1LLPENR_TIM7LPEN)\r
5079 #define __HAL_RCC_C1_TIM12_CLK_SLEEP_DISABLE()          (RCC_C1->APB1LLPENR) &= ~ (RCC_APB1LLPENR_TIM12LPEN)\r
5080 #define __HAL_RCC_C1_TIM13_CLK_SLEEP_DISABLE()          (RCC_C1->APB1LLPENR) &= ~ (RCC_APB1LLPENR_TIM13LPEN)\r
5081 #define __HAL_RCC_C1_TIM14_CLK_SLEEP_DISABLE()          (RCC_C1->APB1LLPENR) &= ~ (RCC_APB1LLPENR_TIM14LPEN)\r
5082 #define __HAL_RCC_C1_LPTIM1_CLK_SLEEP_DISABLE()         (RCC_C1->APB1LLPENR) &= ~ (RCC_APB1LLPENR_LPTIM1LPEN)\r
5083 #define __HAL_RCC_C1_WWDG2_CLK_SLEEP_DISABLE()          (RCC_C1->APB1LLPENR) &= ~ (RCC_APB1LLPENR_WWDG2LPEN)\r
5084 #define __HAL_RCC_C1_SPI2_CLK_SLEEP_DISABLE()           (RCC_C1->APB1LLPENR) &= ~ (RCC_APB1LLPENR_SPI2LPEN)\r
5085 #define __HAL_RCC_C1_SPI3_CLK_SLEEP_DISABLE()           (RCC_C1->APB1LLPENR) &= ~ (RCC_APB1LLPENR_SPI3LPEN)\r
5086 #define __HAL_RCC_C1_SPDIFRX_CLK_SLEEP_DISABLE()        (RCC_C1->APB1LLPENR) &= ~ (RCC_APB1LLPENR_SPDIFRXLPEN)\r
5087 #define __HAL_RCC_C1_USART2_CLK_SLEEP_DISABLE()         (RCC_C1->APB1LLPENR) &= ~ (RCC_APB1LLPENR_USART2LPEN)\r
5088 #define __HAL_RCC_C1_USART3_CLK_SLEEP_DISABLE()         (RCC_C1->APB1LLPENR) &= ~ (RCC_APB1LLPENR_USART3LPEN)\r
5089 #define __HAL_RCC_C1_UART4_CLK_SLEEP_DISABLE()          (RCC_C1->APB1LLPENR) &= ~ (RCC_APB1LLPENR_UART4LPEN)\r
5090 #define __HAL_RCC_C1_UART5_CLK_SLEEP_DISABLE()          (RCC_C1->APB1LLPENR) &= ~ (RCC_APB1LLPENR_UART5LPEN)\r
5091 #define __HAL_RCC_C1_I2C1_CLK_SLEEP_DISABLE()           (RCC_C1->APB1LLPENR) &= ~ (RCC_APB1LLPENR_I2C1LPEN)\r
5092 #define __HAL_RCC_C1_I2C2_CLK_SLEEP_DISABLE()           (RCC_C1->APB1LLPENR) &= ~ (RCC_APB1LLPENR_I2C2LPEN)\r
5093 #define __HAL_RCC_C1_I2C3_CLK_SLEEP_DISABLE()           (RCC_C1->APB1LLPENR) &= ~ (RCC_APB1LLPENR_I2C3LPEN)\r
5094 #define __HAL_RCC_C1_CEC_CLK_SLEEP_DISABLE()            (RCC_C1->APB1LLPENR) &= ~ (RCC_APB1LLPENR_CECLPEN)\r
5095 #define __HAL_RCC_C1_DAC12_CLK_SLEEP_DISABLE()          (RCC_C1->APB1LLPENR) &= ~ (RCC_APB1LLPENR_DAC12LPEN)\r
5096 #define __HAL_RCC_C1_UART7_CLK_SLEEP_DISABLE()          (RCC_C1->APB1LLPENR) &= ~ (RCC_APB1LLPENR_UART7LPEN)\r
5097 #define __HAL_RCC_C1_UART8_CLK_SLEEP_DISABLE()          (RCC_C1->APB1LLPENR) &= ~ (RCC_APB1LLPENR_UART8LPEN)\r
5098 #define __HAL_RCC_C1_CRS_CLK_SLEEP_DISABLE()            (RCC_C1->APB1HLPENR) &= ~ (RCC_APB1HLPENR_CRSLPEN)\r
5099 #define __HAL_RCC_C1_SWPMI_CLK_SLEEP_DISABLE()          (RCC_C1->APB1HLPENR) &= ~ (RCC_APB1HLPENR_SWPMILPEN)\r
5100 #define __HAL_RCC_C1_OPAMP_CLK_SLEEP_DISABLE()          (RCC_C1->APB1HLPENR) &= ~ (RCC_APB1HLPENR_OPAMPLPEN)\r
5101 #define __HAL_RCC_C1_MDIOS_CLK_SLEEP_DISABLE()          (RCC_C1->APB1HLPENR) &= ~ (RCC_APB1HLPENR_MDIOSLPEN)\r
5102 #define __HAL_RCC_C1_FDCAN_CLK_SLEEP_DISABLE()          (RCC_C1->APB1HLPENR) &= ~ (RCC_APB1HLPENR_FDCANLPEN)\r
5103 \r
5104 /** @brief  ENABLE or disable the APB2 peripheral clock during Low Power (Sleep) mode.\r
5105   * @note   Peripheral clock gating in SLEEP mode can be used to further reduce\r
5106   *         power consumption.\r
5107   * @note   After wakeup from SLEEP mode, the peripheral clock is ENABLEd again.\r
5108   * @note   By default, all peripheral clocks are ENABLEd during SLEEP mode.\r
5109   */\r
5110 \r
5111 #define __HAL_RCC_C1_TIM1_CLK_SLEEP_ENABLE()           (RCC_C1->APB2LPENR) |= (RCC_APB2LPENR_TIM1LPEN)\r
5112 #define __HAL_RCC_C1_TIM8_CLK_SLEEP_ENABLE()           (RCC_C1->APB2LPENR) |= (RCC_APB2LPENR_TIM8LPEN)\r
5113 #define __HAL_RCC_C1_USART1_CLK_SLEEP_ENABLE()         (RCC_C1->APB2LPENR) |= (RCC_APB2LPENR_USART1LPEN)\r
5114 #define __HAL_RCC_C1_USART6_CLK_SLEEP_ENABLE()         (RCC_C1->APB2LPENR) |= (RCC_APB2LPENR_USART6LPEN)\r
5115 #define __HAL_RCC_C1_SPI1_CLK_SLEEP_ENABLE()           (RCC_C1->APB2LPENR) |= (RCC_APB2LPENR_SPI1LPEN)\r
5116 #define __HAL_RCC_C1_SPI4_CLK_SLEEP_ENABLE()           (RCC_C1->APB2LPENR) |= (RCC_APB2LPENR_SPI4LPEN)\r
5117 #define __HAL_RCC_C1_TIM15_CLK_SLEEP_ENABLE()          (RCC_C1->APB2LPENR) |= (RCC_APB2LPENR_TIM15LPEN)\r
5118 #define __HAL_RCC_C1_TIM16_CLK_SLEEP_ENABLE()          (RCC_C1->APB2LPENR) |= (RCC_APB2LPENR_TIM16LPEN)\r
5119 #define __HAL_RCC_C1_TIM17_CLK_SLEEP_ENABLE()          (RCC_C1->APB2LPENR) |= (RCC_APB2LPENR_TIM17LPEN)\r
5120 #define __HAL_RCC_C1_SPI5_CLK_SLEEP_ENABLE()           (RCC_C1->APB2LPENR) |= (RCC_APB2LPENR_SPI5LPEN)\r
5121 #define __HAL_RCC_C1_SAI1_CLK_SLEEP_ENABLE()           (RCC_C1->APB2LPENR) |= (RCC_APB2LPENR_SAI1LPEN)\r
5122 #define __HAL_RCC_C1_SAI2_CLK_SLEEP_ENABLE()           (RCC_C1->APB2LPENR) |= (RCC_APB2LPENR_SAI2LPEN)\r
5123 #define __HAL_RCC_C1_SAI3_CLK_SLEEP_ENABLE()           (RCC_C1->APB2LPENR) |= (RCC_APB2LPENR_SAI3LPEN)\r
5124 #define __HAL_RCC_C1_DFSDM1_CLK_SLEEP_ENABLE()         (RCC_C1->APB2LPENR) |= (RCC_APB2LPENR_DFSDM1LPEN)\r
5125 #define __HAL_RCC_C1_HRTIM1_CLK_SLEEP_ENABLE()         (RCC_C1->APB2LPENR) |= (RCC_APB2LPENR_HRTIMLPEN)\r
5126 \r
5127 #define __HAL_RCC_C1_TIM1_CLK_SLEEP_DISABLE()           (RCC_C1->APB2LPENR) &= ~ (RCC_APB2LPENR_TIM1LPEN)\r
5128 #define __HAL_RCC_C1_TIM8_CLK_SLEEP_DISABLE()           (RCC_C1->APB2LPENR) &= ~ (RCC_APB2LPENR_TIM8LPEN)\r
5129 #define __HAL_RCC_C1_USART1_CLK_SLEEP_DISABLE()         (RCC_C1->APB2LPENR) &= ~ (RCC_APB2LPENR_USART1LPEN)\r
5130 #define __HAL_RCC_C1_USART6_CLK_SLEEP_DISABLE()         (RCC_C1->APB2LPENR) &= ~ (RCC_APB2LPENR_USART6LPEN)\r
5131 #define __HAL_RCC_C1_SPI1_CLK_SLEEP_DISABLE()           (RCC_C1->APB2LPENR) &= ~ (RCC_APB2LPENR_SPI1LPEN)\r
5132 #define __HAL_RCC_C1_SPI4_CLK_SLEEP_DISABLE()           (RCC_C1->APB2LPENR) &= ~ (RCC_APB2LPENR_SPI4LPEN)\r
5133 #define __HAL_RCC_C1_TIM15_CLK_SLEEP_DISABLE()          (RCC_C1->APB2LPENR) &= ~ (RCC_APB2LPENR_TIM15LPEN)\r
5134 #define __HAL_RCC_C1_TIM16_CLK_SLEEP_DISABLE()          (RCC_C1->APB2LPENR) &= ~ (RCC_APB2LPENR_TIM16LPEN)\r
5135 #define __HAL_RCC_C1_TIM17_CLK_SLEEP_DISABLE()          (RCC_C1->APB2LPENR) &= ~ (RCC_APB2LPENR_TIM17LPEN)\r
5136 #define __HAL_RCC_C1_SPI5_CLK_SLEEP_DISABLE()           (RCC_C1->APB2LPENR) &= ~ (RCC_APB2LPENR_SPI5LPEN)\r
5137 #define __HAL_RCC_C1_SAI1_CLK_SLEEP_DISABLE()           (RCC_C1->APB2LPENR) &= ~ (RCC_APB2LPENR_SAI1LPEN)\r
5138 #define __HAL_RCC_C1_SAI2_CLK_SLEEP_DISABLE()           (RCC_C1->APB2LPENR) &= ~ (RCC_APB2LPENR_SAI2LPEN)\r
5139 #define __HAL_RCC_C1_SAI3_CLK_SLEEP_DISABLE()           (RCC_C1->APB2LPENR) &= ~ (RCC_APB2LPENR_SAI3LPEN)\r
5140 #define __HAL_RCC_C1_DFSDM1_CLK_SLEEP_DISABLE()         (RCC_C1->APB2LPENR) &= ~ (RCC_APB2LPENR_DFSDM1LPEN)\r
5141 #define __HAL_RCC_C1_HRTIM1_CLK_SLEEP_DISABLE()         (RCC_C1->APB2LPENR) &= ~ (RCC_APB2LPENR_HRTIMLPEN)\r
5142 \r
5143 /** @brief  ENABLE or disable the APB4 peripheral clock during Low Power (Sleep) mode.\r
5144   * @note   Peripheral clock gating in SLEEP mode can be used to further reduce\r
5145   *         power consumption.\r
5146   * @note   After wakeup from SLEEP mode, the peripheral clock is ENABLEd again.\r
5147   * @note   By default, all peripheral clocks are ENABLEd during SLEEP mode.\r
5148   */\r
5149 \r
5150 #define __HAL_RCC_C1_SYSCFG_CLK_SLEEP_ENABLE()           (RCC_C1->APB4LPENR) |= (RCC_APB4LPENR_SYSCFGLPEN)\r
5151 #define __HAL_RCC_C1_LPUART1_CLK_SLEEP_ENABLE()          (RCC_C1->APB4LPENR) |= (RCC_APB4LPENR_LPUART1LPEN)\r
5152 #define __HAL_RCC_C1_SPI6_CLK_SLEEP_ENABLE()             (RCC_C1->APB4LPENR) |= (RCC_APB4LPENR_SPI6LPEN)\r
5153 #define __HAL_RCC_C1_I2C4_CLK_SLEEP_ENABLE()             (RCC_C1->APB4LPENR) |= (RCC_APB4LPENR_I2C4LPEN)\r
5154 #define __HAL_RCC_C1_LPTIM2_CLK_SLEEP_ENABLE()           (RCC_C1->APB4LPENR) |= (RCC_APB4LPENR_LPTIM2LPEN)\r
5155 #define __HAL_RCC_C1_LPTIM3_CLK_SLEEP_ENABLE()           (RCC_C1->APB4LPENR) |= (RCC_APB4LPENR_LPTIM3LPEN)\r
5156 #define __HAL_RCC_C1_LPTIM4_CLK_SLEEP_ENABLE()           (RCC_C1->APB4LPENR) |= (RCC_APB4LPENR_LPTIM4LPEN)\r
5157 #define __HAL_RCC_C1_LPTIM5_CLK_SLEEP_ENABLE()           (RCC_C1->APB4LPENR) |= (RCC_APB4LPENR_LPTIM5LPEN)\r
5158 #define __HAL_RCC_C1_COMP12_CLK_SLEEP_ENABLE()           (RCC_C1->APB4LPENR) |= (RCC_APB4LPENR_COMP12LPEN)\r
5159 #define __HAL_RCC_C1_VREF_CLK_SLEEP_ENABLE()             (RCC_C1->APB4LPENR) |= (RCC_APB4LPENR_VREFLPEN)\r
5160 #define __HAL_RCC_C1_SAI4_CLK_SLEEP_ENABLE()             (RCC_C1->APB4LPENR) |= (RCC_APB4LPENR_SAI4LPEN)\r
5161 #define __HAL_RCC_C1_RTC_CLK_SLEEP_ENABLE()              (RCC_C1->APB4LPENR) |= (RCC_APB4LPENR_RTCAPBLPEN)\r
5162 \r
5163 \r
5164 #define __HAL_RCC_C1_SYSCFG_CLK_SLEEP_DISABLE()           (RCC_C1->APB4LPENR) &= ~ (RCC_APB4LPENR_SYSCFGLPEN)\r
5165 #define __HAL_RCC_C1_LPUART1_CLK_SLEEP_DISABLE()          (RCC_C1->APB4LPENR) &= ~ (RCC_APB4LPENR_LPUART1LPEN)\r
5166 #define __HAL_RCC_C1_SPI6_CLK_SLEEP_DISABLE()             (RCC_C1->APB4LPENR) &= ~ (RCC_APB4LPENR_SPI6LPEN)\r
5167 #define __HAL_RCC_C1_I2C4_CLK_SLEEP_DISABLE()             (RCC_C1->APB4LPENR) &= ~ (RCC_APB4LPENR_I2C4LPEN)\r
5168 #define __HAL_RCC_C1_LPTIM2_CLK_SLEEP_DISABLE()           (RCC_C1->APB4LPENR) &= ~ (RCC_APB4LPENR_LPTIM2LPEN)\r
5169 #define __HAL_RCC_C1_LPTIM3_CLK_SLEEP_DISABLE()           (RCC_C1->APB4LPENR) &= ~ (RCC_APB4LPENR_LPTIM3LPEN)\r
5170 #define __HAL_RCC_C1_LPTIM4_CLK_SLEEP_DISABLE()           (RCC_C1->APB4LPENR) &= ~ (RCC_APB4LPENR_LPTIM4LPEN)\r
5171 #define __HAL_RCC_C1_LPTIM5_CLK_SLEEP_DISABLE()           (RCC_C1->APB4LPENR) &= ~ (RCC_APB4LPENR_LPTIM5LPEN)\r
5172 #define __HAL_RCC_C1_COMP12_CLK_SLEEP_DISABLE()           (RCC_C1->APB4LPENR) &= ~ (RCC_APB4LPENR_COMP12LPEN)\r
5173 #define __HAL_RCC_C1_VREF_CLK_SLEEP_DISABLE()             (RCC_C1->APB4LPENR) &= ~ (RCC_APB4LPENR_VREFLPEN)\r
5174 #define __HAL_RCC_C1_SAI4_CLK_SLEEP_DISABLE()             (RCC_C1->APB4LPENR) &= ~ (RCC_APB4LPENR_SAI4LPEN)\r
5175 #define __HAL_RCC_C1_RTC_CLK_SLEEP_DISABLE()              (RCC_C1->APB4LPENR) &= ~ (RCC_APB4LPENR_RTCAPBLPEN)\r
5176 \r
5177 /** @brief  Enable or disable the RCC_C2 AHB3 peripheral clock during Low Power (Sleep) mode.\r
5178   * @note   Peripheral clock gating in SLEEP mode can be used to further reduce\r
5179   *         power consumption.\r
5180   * @note   After wakeup from SLEEP mode, the peripheral clock is enabled again.\r
5181   * @note   By default, all peripheral clocks are enabled during SLEEP mode.\r
5182   */\r
5183 \r
5184 \r
5185 #define __HAL_RCC_C2_MDMA_CLK_SLEEP_ENABLE()            (RCC_C2->AHB3LPENR |= (RCC_AHB3LPENR_MDMALPEN))\r
5186 #define __HAL_RCC_C2_DMA2D_CLK_SLEEP_ENABLE()           (RCC_C2->AHB3LPENR |= (RCC_AHB3LPENR_DMA2DLPEN))\r
5187 #define __HAL_RCC_C2_JPGDEC_CLK_SLEEP_ENABLE()          (RCC_C2->AHB3LPENR |= (RCC_AHB3LPENR_JPGDECLPEN))\r
5188 #define __HAL_RCC_C2_FLASH_CLK_SLEEP_ENABLE()           (RCC_C2->AHB3LPENR |= (RCC_AHB3LPENR_FLASHLPEN))\r
5189 #define __HAL_RCC_C2_FMC_CLK_SLEEP_ENABLE()             (RCC_C2->AHB3LPENR |= (RCC_AHB3LPENR_FMCLPEN))\r
5190 #define __HAL_RCC_C2_QSPI_CLK_SLEEP_ENABLE()            (RCC_C2->AHB3LPENR |= (RCC_AHB3LPENR_QSPILPEN))\r
5191 #define __HAL_RCC_C2_SDMMC1_CLK_SLEEP_ENABLE()          (RCC_C2->AHB3LPENR |= (RCC_AHB3LPENR_SDMMC1LPEN))\r
5192 #define __HAL_RCC_C2_DTCM1_CLK_SLEEP_ENABLE()           (RCC_C2->AHB3LPENR |= (RCC_AHB3LPENR_DTCM1LPEN))\r
5193 #define __HAL_RCC_C2_DTCM2_CLK_SLEEP_ENABLE()           (RCC_C2->AHB3LPENR |= (RCC_AHB3LPENR_DTCM2LPEN))\r
5194 #define __HAL_RCC_C2_ITCM_CLK_SLEEP_ENABLE()            (RCC_C2->AHB3LPENR |= (RCC_AHB3LPENR_ITCMLPEN))\r
5195 #define __HAL_RCC_C2_D1SRAM1_CLK_SLEEP_ENABLE()         (RCC_C2->AHB3LPENR |= (RCC_AHB3LPENR_AXISRAMLPEN))\r
5196 \r
5197 \r
5198 #define __HAL_RCC_C2_MDMA_CLK_SLEEP_DISABLE()            (RCC_C2->AHB3LPENR &= ~ (RCC_AHB3LPENR_MDMALPEN))\r
5199 #define __HAL_RCC_C2_DMA2D_CLK_SLEEP_DISABLE()           (RCC_C2->AHB3LPENR &= ~ (RCC_AHB3LPENR_DMA2DLPEN))\r
5200 #define __HAL_RCC_C2_JPGDEC_CLK_SLEEP_DISABLE()          (RCC_C2->AHB3LPENR &= ~ (RCC_AHB3LPENR_JPGDECLPEN))\r
5201 #define __HAL_RCC_C2_FLASH_CLK_SLEEP_DISABLE()           (RCC_C2->AHB3LPENR &= ~ (RCC_AHB3LPENR_FLASHLPEN))\r
5202 #define __HAL_RCC_C2_FMC_CLK_SLEEP_DISABLE()             (RCC_C2->AHB3LPENR &= ~ (RCC_AHB3LPENR_FMCLPEN))\r
5203 #define __HAL_RCC_C2_QSPI_CLK_SLEEP_DISABLE()            (RCC_C2->AHB3LPENR &= ~ (RCC_AHB3LPENR_QSPILPEN))\r
5204 #define __HAL_RCC_C2_SDMMC1_CLK_SLEEP_DISABLE()          (RCC_C2->AHB3LPENR &= ~ (RCC_AHB3LPENR_SDMMC1LPEN))\r
5205 #define __HAL_RCC_C2_DTCM1_CLK_SLEEP_DISABLE()           (RCC_C2->AHB3LPENR &= ~ (RCC_AHB3LPENR_DTCM1LPEN))\r
5206 #define __HAL_RCC_C2_DTCM2_CLK_SLEEP_DISABLE()           (RCC_C2->AHB3LPENR &= ~ (RCC_AHB3LPENR_DTCM2LPEN))\r
5207 #define __HAL_RCC_C2_ITCM_CLK_SLEEP_DISABLE()            (RCC_C2->AHB3LPENR &= ~ (RCC_AHB3LPENR_ITCMLPEN))\r
5208 #define __HAL_RCC_C2_D1SRAM1_CLK_SLEEP_DISABLE()         (RCC_C2->AHB3LPENR &= ~ (RCC_AHB3LPENR_AXISRAMLPEN))\r
5209 \r
5210 \r
5211 \r
5212 /** @brief  ENABLE or disable the AHB1 peripheral clock during Low Power (Sleep) mode.\r
5213   * @note   Peripheral clock gating in SLEEP mode can be used to further reduce\r
5214   *         power consumption.\r
5215   * @note   After wakeup from SLEEP mode, the peripheral clock is ENABLEd again.\r
5216   * @note   By default, all peripheral clocks are ENABLEd during SLEEP mode.\r
5217   */\r
5218 \r
5219 #define __HAL_RCC_C2_DMA1_CLK_SLEEP_ENABLE()             (RCC_C2->AHB1LPENR |= (RCC_AHB1LPENR_DMA1LPEN))\r
5220 #define __HAL_RCC_C2_DMA2_CLK_SLEEP_ENABLE()             (RCC_C2->AHB1LPENR |= (RCC_AHB1LPENR_DMA2LPEN))\r
5221 #define __HAL_RCC_C2_ADC12_CLK_SLEEP_ENABLE()            (RCC_C2->AHB1LPENR |= (RCC_AHB1LPENR_ADC12LPEN))\r
5222 #define __HAL_RCC_C2_ETH1MAC_CLK_SLEEP_ENABLE()          (RCC_C2->AHB1LPENR |= (RCC_AHB1LPENR_ETH1MACLPEN))\r
5223 #define __HAL_RCC_C2_ETH1TX_CLK_SLEEP_ENABLE()           (RCC_C2->AHB1LPENR |= (RCC_AHB1LPENR_ETH1TXLPEN))\r
5224 #define __HAL_RCC_C2_ETH1RX_CLK_SLEEP_ENABLE()           (RCC_C2->AHB1LPENR |= (RCC_AHB1LPENR_ETH1RXLPEN))\r
5225 #define __HAL_RCC_C2_USB1_OTG_HS_CLK_SLEEP_ENABLE()      (RCC_C2->AHB1LPENR |= (RCC_AHB1LPENR_USB1OTGHSLPEN))\r
5226 #define __HAL_RCC_C2_USB1_OTG_HS_ULPI_CLK_SLEEP_ENABLE() (RCC_C2->AHB1LPENR |= (RCC_AHB1LPENR_USB1OTGHSULPILPEN))\r
5227 #define __HAL_RCC_C2_USB2_OTG_FS_CLK_SLEEP_ENABLE()      (RCC_C2->AHB1LPENR |= (RCC_AHB1LPENR_USB2OTGHSLPEN))\r
5228 #define __HAL_RCC_C2_USB2_OTG_FS_ULPI_CLK_SLEEP_ENABLE() (RCC_C2->AHB1LPENR |= (RCC_AHB1LPENR_USB2OTGHSULPILPEN))\r
5229 \r
5230 #define __HAL_RCC_C2_DMA1_CLK_SLEEP_DISABLE()             (RCC_C2->AHB1LPENR &= ~ (RCC_AHB1LPENR_DMA1LPEN))\r
5231 #define __HAL_RCC_C2_DMA2_CLK_SLEEP_DISABLE()             (RCC_C2->AHB1LPENR &= ~ (RCC_AHB1LPENR_DMA2LPEN))\r
5232 #define __HAL_RCC_C2_ADC12_CLK_SLEEP_DISABLE()            (RCC_C2->AHB1LPENR &= ~ (RCC_AHB1LPENR_ADC12LPEN))\r
5233 #define __HAL_RCC_C2_ETH1MAC_CLK_SLEEP_DISABLE()          (RCC_C2->AHB1LPENR &= ~ (RCC_AHB1LPENR_ETH1MACLPEN))\r
5234 #define __HAL_RCC_C2_ETH1TX_CLK_SLEEP_DISABLE()           (RCC_C2->AHB1LPENR &= ~ (RCC_AHB1LPENR_ETH1TXLPEN))\r
5235 #define __HAL_RCC_C2_ETH1RX_CLK_SLEEP_DISABLE()           (RCC_C2->AHB1LPENR &= ~ (RCC_AHB1LPENR_ETH1RXLPEN))\r
5236 #define __HAL_RCC_C2_USB1_OTG_HS_CLK_SLEEP_DISABLE()      (RCC_C2->AHB1LPENR &= ~ (RCC_AHB1LPENR_USB1OTGHSLPEN))\r
5237 #define __HAL_RCC_C2_USB1_OTG_HS_ULPI_CLK_SLEEP_DISABLE() (RCC_C2->AHB1LPENR &= ~ (RCC_AHB1LPENR_USB1OTGHSULPILPEN))\r
5238 #define __HAL_RCC_C2_USB2_OTG_FS_CLK_SLEEP_DISABLE()      (RCC_C2->AHB1LPENR &= ~ (RCC_AHB1LPENR_USB2OTGHSLPEN))\r
5239 #define __HAL_RCC_C2_USB2_OTG_FS_ULPI_CLK_SLEEP_DISABLE() (RCC_C2->AHB1LPENR &= ~ (RCC_AHB1LPENR_USB2OTGHSULPILPEN))\r
5240 \r
5241 /** @brief  ENABLE or disable the AHB2 peripheral clock during Low Power (Sleep) mode.\r
5242   * @note   Peripheral clock gating in SLEEP mode can be used to further reduce\r
5243   *         power consumption.\r
5244   * @note   After wakeup from SLEEP mode, the peripheral clock is ENABLEd again.\r
5245   * @note   By default, all peripheral clocks are ENABLEd during SLEEP mode.\r
5246   */\r
5247 \r
5248 #define __HAL_RCC_C2_DCMI_CLK_SLEEP_ENABLE()             (RCC_C2->AHB2LPENR |= (RCC_AHB2LPENR_DCMILPEN))\r
5249 #define __HAL_RCC_C2_CRYP_CLK_SLEEP_ENABLE()             (RCC_C2->AHB2LPENR |= (RCC_AHB2LPENR_CRYPLPEN))\r
5250 #define __HAL_RCC_C2_HASH_CLK_SLEEP_ENABLE()             (RCC_C2->AHB2LPENR |= (RCC_AHB2LPENR_HASHLPEN))\r
5251 #define __HAL_RCC_C2_RNG_CLK_SLEEP_ENABLE()              (RCC_C2->AHB2LPENR |= (RCC_AHB2LPENR_RNGLPEN))\r
5252 #define __HAL_RCC_C2_SDMMC2_CLK_SLEEP_ENABLE()           (RCC_C2->AHB2LPENR |= (RCC_AHB2LPENR_SDMMC2LPEN))\r
5253 #define __HAL_RCC_C2_D2SRAM1_CLK_SLEEP_ENABLE()          (RCC_C2->AHB2LPENR |= (RCC_AHB2LPENR_D2SRAM1LPEN))\r
5254 #define __HAL_RCC_C2_D2SRAM2_CLK_SLEEP_ENABLE()          (RCC_C2->AHB2LPENR |= (RCC_AHB2LPENR_D2SRAM2LPEN))\r
5255 #define __HAL_RCC_C2_D2SRAM3_CLK_SLEEP_ENABLE()          (RCC_C2->AHB2LPENR |= (RCC_AHB2LPENR_D2SRAM3LPEN))\r
5256 \r
5257 #define __HAL_RCC_C2_DCMI_CLK_SLEEP_DISABLE()             (RCC_C2->AHB2LPENR &= ~ (RCC_AHB2LPENR_DCMILPEN))\r
5258 #define __HAL_RCC_C2_CRYP_CLK_SLEEP_DISABLE()             (RCC_C2->AHB2LPENR &= ~ (RCC_AHB2LPENR_CRYPLPEN))\r
5259 #define __HAL_RCC_C2_HASH_CLK_SLEEP_DISABLE()             (RCC_C2->AHB2LPENR &= ~ (RCC_AHB2LPENR_HASHLPEN))\r
5260 #define __HAL_RCC_C2_RNG_CLK_SLEEP_DISABLE()              (RCC_C2->AHB2LPENR &= ~ (RCC_AHB2LPENR_RNGLPEN))\r
5261 #define __HAL_RCC_C2_SDMMC2_CLK_SLEEP_DISABLE()           (RCC_C2->AHB2LPENR &= ~ (RCC_AHB2LPENR_SDMMC2LPEN))\r
5262 #define __HAL_RCC_C2_D2SRAM1_CLK_SLEEP_DISABLE()          (RCC_C2->AHB2LPENR &= ~ (RCC_AHB2LPENR_D2SRAM1LPEN))\r
5263 #define __HAL_RCC_C2_D2SRAM2_CLK_SLEEP_DISABLE()          (RCC_C2->AHB2LPENR &= ~ (RCC_AHB2LPENR_D2SRAM2LPEN))\r
5264 #define __HAL_RCC_C2_D2SRAM3_CLK_SLEEP_DISABLE()          (RCC_C2->AHB2LPENR &= ~ (RCC_AHB2LPENR_D2SRAM3LPEN))\r
5265 \r
5266 /** @brief  ENABLE or disable the AHB4 peripheral clock during Low Power (Sleep) mode.\r
5267   * @note   Peripheral clock gating in SLEEP mode can be used to further reduce\r
5268   *         power consumption.\r
5269   * @note   After wakeup from SLEEP mode, the peripheral clock is ENABLEd again.\r
5270   * @note   By default, all peripheral clocks are ENABLEd during SLEEP mode.\r
5271   */\r
5272 \r
5273 #define __HAL_RCC_C2_GPIOA_CLK_SLEEP_ENABLE()           (RCC_C2->AHB4LPENR) |= (RCC_AHB4LPENR_GPIOALPEN)\r
5274 #define __HAL_RCC_C2_GPIOB_CLK_SLEEP_ENABLE()           (RCC_C2->AHB4LPENR) |= (RCC_AHB4LPENR_GPIOBLPEN)\r
5275 #define __HAL_RCC_C2_GPIOC_CLK_SLEEP_ENABLE()           (RCC_C2->AHB4LPENR) |= (RCC_AHB4LPENR_GPIOCLPEN)\r
5276 #define __HAL_RCC_C2_GPIOD_CLK_SLEEP_ENABLE()           (RCC_C2->AHB4LPENR) |= (RCC_AHB4LPENR_GPIODLPEN)\r
5277 #define __HAL_RCC_C2_GPIOE_CLK_SLEEP_ENABLE()           (RCC_C2->AHB4LPENR) |= (RCC_AHB4LPENR_GPIOELPEN)\r
5278 #define __HAL_RCC_C2_GPIOF_CLK_SLEEP_ENABLE()           (RCC_C2->AHB4LPENR) |= (RCC_AHB4LPENR_GPIOFLPEN)\r
5279 #define __HAL_RCC_C2_GPIOG_CLK_SLEEP_ENABLE()           (RCC_C2->AHB4LPENR) |= (RCC_AHB4LPENR_GPIOGLPEN)\r
5280 #define __HAL_RCC_C2_GPIOH_CLK_SLEEP_ENABLE()           (RCC_C2->AHB4LPENR) |= (RCC_AHB4LPENR_GPIOHLPEN)\r
5281 #define __HAL_RCC_C2_GPIOI_CLK_SLEEP_ENABLE()           (RCC_C2->AHB4LPENR) |= (RCC_AHB4LPENR_GPIOILPEN)\r
5282 #define __HAL_RCC_C2_GPIOJ_CLK_SLEEP_ENABLE()           (RCC_C2->AHB4LPENR) |= (RCC_AHB4LPENR_GPIOJLPEN)\r
5283 #define __HAL_RCC_C2_GPIOK_CLK_SLEEP_ENABLE()           (RCC_C2->AHB4LPENR) |= (RCC_AHB4LPENR_GPIOKLPEN)\r
5284 #define __HAL_RCC_C2_CRC_CLK_SLEEP_ENABLE()             (RCC_C2->AHB4LPENR) |= (RCC_AHB4LPENR_CRCLPEN)\r
5285 #define __HAL_RCC_C2_BDMA_CLK_SLEEP_ENABLE()            (RCC_C2->AHB4LPENR) |= (RCC_AHB4LPENR_BDMALPEN)\r
5286 #define __HAL_RCC_C2_ADC3_CLK_SLEEP_ENABLE()            (RCC_C2->AHB4LPENR) |= (RCC_AHB4LPENR_ADC3LPEN)\r
5287 #define __HAL_RCC_C2_BKPRAM_CLK_SLEEP_ENABLE()          (RCC_C2->AHB4LPENR) |= (RCC_AHB4LPENR_BKPRAMLPEN)\r
5288 #define __HAL_RCC_C2_D3SRAM1_CLK_SLEEP_ENABLE()         (RCC_C2->AHB4LPENR  |= (RCC_AHB4LPENR_D3SRAM1LPEN))\r
5289 \r
5290 #define __HAL_RCC_C2_GPIOA_CLK_SLEEP_DISABLE()           (RCC_C2->AHB4LPENR) &= ~ (RCC_AHB4LPENR_GPIOALPEN)\r
5291 #define __HAL_RCC_C2_GPIOB_CLK_SLEEP_DISABLE()           (RCC_C2->AHB4LPENR) &= ~ (RCC_AHB4LPENR_GPIOBLPEN)\r
5292 #define __HAL_RCC_C2_GPIOC_CLK_SLEEP_DISABLE()           (RCC_C2->AHB4LPENR) &= ~ (RCC_AHB4LPENR_GPIOCLPEN)\r
5293 #define __HAL_RCC_C2_GPIOD_CLK_SLEEP_DISABLE()           (RCC_C2->AHB4LPENR) &= ~ (RCC_AHB4LPENR_GPIODLPEN)\r
5294 #define __HAL_RCC_C2_GPIOE_CLK_SLEEP_DISABLE()           (RCC_C2->AHB4LPENR) &= ~ (RCC_AHB4LPENR_GPIOELPEN)\r
5295 #define __HAL_RCC_C2_GPIOF_CLK_SLEEP_DISABLE()           (RCC_C2->AHB4LPENR) &= ~ (RCC_AHB4LPENR_GPIOFLPEN)\r
5296 #define __HAL_RCC_C2_GPIOG_CLK_SLEEP_DISABLE()           (RCC_C2->AHB4LPENR) &= ~ (RCC_AHB4LPENR_GPIOGLPEN)\r
5297 #define __HAL_RCC_C2_GPIOH_CLK_SLEEP_DISABLE()           (RCC_C2->AHB4LPENR) &= ~ (RCC_AHB4LPENR_GPIOHLPEN)\r
5298 #define __HAL_RCC_C2_GPIOI_CLK_SLEEP_DISABLE()           (RCC_C2->AHB4LPENR) &= ~ (RCC_AHB4LPENR_GPIOILPEN)\r
5299 #define __HAL_RCC_C2_GPIOJ_CLK_SLEEP_DISABLE()           (RCC_C2->AHB4LPENR) &= ~ (RCC_AHB4LPENR_GPIOJLPEN)\r
5300 #define __HAL_RCC_C2_GPIOK_CLK_SLEEP_DISABLE()           (RCC_C2->AHB4LPENR) &= ~ (RCC_AHB4LPENR_GPIOKLPEN)\r
5301 #define __HAL_RCC_C2_CRC_CLK_SLEEP_DISABLE()             (RCC_C2->AHB4LPENR) &= ~ (RCC_AHB4LPENR_CRCLPEN)\r
5302 #define __HAL_RCC_C2_BDMA_CLK_SLEEP_DISABLE()            (RCC_C2->AHB4LPENR) &= ~ (RCC_AHB4LPENR_BDMALPEN)\r
5303 #define __HAL_RCC_C2_ADC3_CLK_SLEEP_DISABLE()            (RCC_C2->AHB4LPENR) &= ~ (RCC_AHB4LPENR_ADC3LPEN)\r
5304 #define __HAL_RCC_C2_BKPRAM_CLK_SLEEP_DISABLE()          (RCC_C2->AHB4LPENR) &= ~ (RCC_AHB4LPENR_BKPRAMLPEN)\r
5305 #define __HAL_RCC_C2_D3SRAM1_CLK_SLEEP_DISABLE()         (RCC_C2->AHB4LPENR  &= ~ (RCC_AHB4LPENR_D3SRAM1LPEN))\r
5306 \r
5307 /** @brief  ENABLE or disable the APB3 peripheral clock during Low Power (Sleep) mode.\r
5308   * @note   Peripheral clock gating in SLEEP mode can be used to further reduce\r
5309   *         power consumption.\r
5310   * @note   After wakeup from SLEEP mode, the peripheral clock is ENABLEd again.\r
5311   * @note   By default, all peripheral clocks are ENABLEd during SLEEP mode.\r
5312   */\r
5313 \r
5314 #define __HAL_RCC_C2_LTDC_CLK_SLEEP_ENABLE()           (RCC_C2->APB3LPENR) |= (RCC_APB3LPENR_LTDCLPEN)\r
5315 #define __HAL_RCC_C2_DSI_CLK_SLEEP_ENABLE()            (RCC_C2->APB3LPENR) |= (RCC_APB3LPENR_DSILPEN)\r
5316 #define __HAL_RCC_C2_WWDG1_CLK_SLEEP_ENABLE()          (RCC_C2->APB3LPENR) |= (RCC_APB3LPENR_WWDG1LPEN)\r
5317 \r
5318 #define __HAL_RCC_C2_LTDC_CLK_SLEEP_DISABLE()           (RCC_C2->APB3LPENR) &= ~ (RCC_APB3LPENR_LTDCLPEN)\r
5319 #define __HAL_RCC_C2_DSI_CLK_SLEEP_DISABLE()            (RCC_C2->APB3LPENR) &= ~ (RCC_APB3LPENR_DSILPEN)\r
5320 #define __HAL_RCC_C2_WWDG1_CLK_SLEEP_DISABLE()          (RCC_C2->APB3LPENR) &= ~ (RCC_APB3LPENR_WWDG1LPEN)\r
5321 \r
5322 /** @brief  ENABLE or disable the APB1 peripheral clock during Low Power (Sleep) mode.\r
5323   * @note   Peripheral clock gating in SLEEP mode can be used to further reduce\r
5324   *         power consumption.\r
5325   * @note   After wakeup from SLEEP mode, the peripheral clock is ENABLEd again.\r
5326   * @note   By default, all peripheral clocks are ENABLEd during SLEEP mode.\r
5327   */\r
5328 \r
5329 #define __HAL_RCC_C2_TIM2_CLK_SLEEP_ENABLE()           (RCC_C2->APB1LLPENR) |= (RCC_APB1LLPENR_TIM2LPEN)\r
5330 #define __HAL_RCC_C2_TIM3_CLK_SLEEP_ENABLE()           (RCC_C2->APB1LLPENR) |= (RCC_APB1LLPENR_TIM3LPEN)\r
5331 #define __HAL_RCC_C2_TIM4_CLK_SLEEP_ENABLE()           (RCC_C2->APB1LLPENR) |= (RCC_APB1LLPENR_TIM4LPEN)\r
5332 #define __HAL_RCC_C2_TIM5_CLK_SLEEP_ENABLE()           (RCC_C2->APB1LLPENR) |= (RCC_APB1LLPENR_TIM5LPEN)\r
5333 #define __HAL_RCC_C2_TIM6_CLK_SLEEP_ENABLE()           (RCC_C2->APB1LLPENR) |= (RCC_APB1LLPENR_TIM6LPEN)\r
5334 #define __HAL_RCC_C2_TIM7_CLK_SLEEP_ENABLE()           (RCC_C2->APB1LLPENR) |= (RCC_APB1LLPENR_TIM7LPEN)\r
5335 #define __HAL_RCC_C2_TIM12_CLK_SLEEP_ENABLE()          (RCC_C2->APB1LLPENR) |= (RCC_APB1LLPENR_TIM12LPEN)\r
5336 #define __HAL_RCC_C2_TIM13_CLK_SLEEP_ENABLE()          (RCC_C2->APB1LLPENR) |= (RCC_APB1LLPENR_TIM13LPEN)\r
5337 #define __HAL_RCC_C2_TIM14_CLK_SLEEP_ENABLE()          (RCC_C2->APB1LLPENR) |= (RCC_APB1LLPENR_TIM14LPEN)\r
5338 #define __HAL_RCC_C2_LPTIM1_CLK_SLEEP_ENABLE()         (RCC_C2->APB1LLPENR) |= (RCC_APB1LLPENR_LPTIM1LPEN)\r
5339 #define __HAL_RCC_C2_WWDG2_CLK_SLEEP_ENABLE()          (RCC_C2->APB1LLPENR) |= (RCC_APB1LLPENR_WWDG2LPEN)\r
5340 #define __HAL_RCC_C2_SPI2_CLK_SLEEP_ENABLE()           (RCC_C2->APB1LLPENR) |= (RCC_APB1LLPENR_SPI2LPEN)\r
5341 #define __HAL_RCC_C2_SPI3_CLK_SLEEP_ENABLE()           (RCC_C2->APB1LLPENR) |= (RCC_APB1LLPENR_SPI3LPEN)\r
5342 #define __HAL_RCC_C2_SPDIFRX_CLK_SLEEP_ENABLE()        (RCC_C2->APB1LLPENR) |= (RCC_APB1LLPENR_SPDIFRXLPEN)\r
5343 #define __HAL_RCC_C2_USART2_CLK_SLEEP_ENABLE()         (RCC_C2->APB1LLPENR) |= (RCC_APB1LLPENR_USART2LPEN)\r
5344 #define __HAL_RCC_C2_USART3_CLK_SLEEP_ENABLE()         (RCC_C2->APB1LLPENR) |= (RCC_APB1LLPENR_USART3LPEN)\r
5345 #define __HAL_RCC_C2_UART4_CLK_SLEEP_ENABLE()          (RCC_C2->APB1LLPENR) |= (RCC_APB1LLPENR_UART4LPEN)\r
5346 #define __HAL_RCC_C2_UART5_CLK_SLEEP_ENABLE()          (RCC_C2->APB1LLPENR) |= (RCC_APB1LLPENR_UART5LPEN)\r
5347 #define __HAL_RCC_C2_I2C1_CLK_SLEEP_ENABLE()           (RCC_C2->APB1LLPENR) |= (RCC_APB1LLPENR_I2C1LPEN)\r
5348 #define __HAL_RCC_C2_I2C2_CLK_SLEEP_ENABLE()           (RCC_C2->APB1LLPENR) |= (RCC_APB1LLPENR_I2C2LPEN)\r
5349 #define __HAL_RCC_C2_I2C3_CLK_SLEEP_ENABLE()           (RCC_C2->APB1LLPENR) |= (RCC_APB1LLPENR_I2C3LPEN)\r
5350 #define __HAL_RCC_C2_CEC_CLK_SLEEP_ENABLE()            (RCC_C2->APB1LLPENR) |= (RCC_APB1LLPENR_CECLPEN)\r
5351 #define __HAL_RCC_C2_DAC12_CLK_SLEEP_ENABLE()          (RCC_C2->APB1LLPENR) |= (RCC_APB1LLPENR_DAC12LPEN)\r
5352 #define __HAL_RCC_C2_UART7_CLK_SLEEP_ENABLE()          (RCC_C2->APB1LLPENR) |= (RCC_APB1LLPENR_UART7LPEN)\r
5353 #define __HAL_RCC_C2_UART8_CLK_SLEEP_ENABLE()          (RCC_C2->APB1LLPENR) |= (RCC_APB1LLPENR_UART8LPEN)\r
5354 #define __HAL_RCC_C2_CRS_CLK_SLEEP_ENABLE()            (RCC_C2->APB1HLPENR) |= (RCC_APB1HLPENR_CRSLPEN)\r
5355 #define __HAL_RCC_C2_SWPMI_CLK_SLEEP_ENABLE()          (RCC_C2->APB1HLPENR) |= (RCC_APB1HLPENR_SWPMILPEN)\r
5356 #define __HAL_RCC_C2_OPAMP_CLK_SLEEP_ENABLE()          (RCC_C2->APB1HLPENR) |= (RCC_APB1HLPENR_OPAMPLPEN)\r
5357 #define __HAL_RCC_C2_MDIOS_CLK_SLEEP_ENABLE()          (RCC_C2->APB1HLPENR) |= (RCC_APB1HLPENR_MDIOSLPEN)\r
5358 #define __HAL_RCC_C2_FDCAN_CLK_SLEEP_ENABLE()          (RCC_C2->APB1HLPENR) |= (RCC_APB1HLPENR_FDCANLPEN)\r
5359 \r
5360 \r
5361 #define __HAL_RCC_C2_TIM2_CLK_SLEEP_DISABLE()           (RCC_C2->APB1LLPENR) &= ~ (RCC_APB1LLPENR_TIM2LPEN)\r
5362 #define __HAL_RCC_C2_TIM3_CLK_SLEEP_DISABLE()           (RCC_C2->APB1LLPENR) &= ~ (RCC_APB1LLPENR_TIM3LPEN)\r
5363 #define __HAL_RCC_C2_TIM4_CLK_SLEEP_DISABLE()           (RCC_C2->APB1LLPENR) &= ~ (RCC_APB1LLPENR_TIM4LPEN)\r
5364 #define __HAL_RCC_C2_TIM5_CLK_SLEEP_DISABLE()           (RCC_C2->APB1LLPENR) &= ~ (RCC_APB1LLPENR_TIM5LPEN)\r
5365 #define __HAL_RCC_C2_TIM6_CLK_SLEEP_DISABLE()           (RCC_C2->APB1LLPENR) &= ~ (RCC_APB1LLPENR_TIM6LPEN)\r
5366 #define __HAL_RCC_C2_TIM7_CLK_SLEEP_DISABLE()           (RCC_C2->APB1LLPENR) &= ~ (RCC_APB1LLPENR_TIM7LPEN)\r
5367 #define __HAL_RCC_C2_TIM12_CLK_SLEEP_DISABLE()          (RCC_C2->APB1LLPENR) &= ~ (RCC_APB1LLPENR_TIM12LPEN)\r
5368 #define __HAL_RCC_C2_TIM13_CLK_SLEEP_DISABLE()          (RCC_C2->APB1LLPENR) &= ~ (RCC_APB1LLPENR_TIM13LPEN)\r
5369 #define __HAL_RCC_C2_TIM14_CLK_SLEEP_DISABLE()          (RCC_C2->APB1LLPENR) &= ~ (RCC_APB1LLPENR_TIM14LPEN)\r
5370 #define __HAL_RCC_C2_LPTIM1_CLK_SLEEP_DISABLE()         (RCC_C2->APB1LLPENR) &= ~ (RCC_APB1LLPENR_LPTIM1LPEN)\r
5371 #define __HAL_RCC_C2_WWDG2_CLK_SLEEP_DISABLE()          (RCC_C2->APB1LLPENR) &= ~ (RCC_APB1LLPENR_WWDG2LPEN)\r
5372 #define __HAL_RCC_C2_SPI2_CLK_SLEEP_DISABLE()           (RCC_C2->APB1LLPENR) &= ~ (RCC_APB1LLPENR_SPI2LPEN)\r
5373 #define __HAL_RCC_C2_SPI3_CLK_SLEEP_DISABLE()           (RCC_C2->APB1LLPENR) &= ~ (RCC_APB1LLPENR_SPI3LPEN)\r
5374 #define __HAL_RCC_C2_SPDIFRX_CLK_SLEEP_DISABLE()        (RCC_C2->APB1LLPENR) &= ~ (RCC_APB1LLPENR_SPDIFRXLPEN)\r
5375 #define __HAL_RCC_C2_USART2_CLK_SLEEP_DISABLE()         (RCC_C2->APB1LLPENR) &= ~ (RCC_APB1LLPENR_USART2LPEN)\r
5376 #define __HAL_RCC_C2_USART3_CLK_SLEEP_DISABLE()         (RCC_C2->APB1LLPENR) &= ~ (RCC_APB1LLPENR_USART3LPEN)\r
5377 #define __HAL_RCC_C2_UART4_CLK_SLEEP_DISABLE()          (RCC_C2->APB1LLPENR) &= ~ (RCC_APB1LLPENR_UART4LPEN)\r
5378 #define __HAL_RCC_C2_UART5_CLK_SLEEP_DISABLE()          (RCC_C2->APB1LLPENR) &= ~ (RCC_APB1LLPENR_UART5LPEN)\r
5379 #define __HAL_RCC_C2_I2C1_CLK_SLEEP_DISABLE()           (RCC_C2->APB1LLPENR) &= ~ (RCC_APB1LLPENR_I2C1LPEN)\r
5380 #define __HAL_RCC_C2_I2C2_CLK_SLEEP_DISABLE()           (RCC_C2->APB1LLPENR) &= ~ (RCC_APB1LLPENR_I2C2LPEN)\r
5381 #define __HAL_RCC_C2_I2C3_CLK_SLEEP_DISABLE()           (RCC_C2->APB1LLPENR) &= ~ (RCC_APB1LLPENR_I2C3LPEN)\r
5382 #define __HAL_RCC_C2_CEC_CLK_SLEEP_DISABLE()            (RCC_C2->APB1LLPENR) &= ~ (RCC_APB1LLPENR_CECLPEN)\r
5383 #define __HAL_RCC_C2_DAC12_CLK_SLEEP_DISABLE()          (RCC_C2->APB1LLPENR) &= ~ (RCC_APB1LLPENR_DAC12LPEN)\r
5384 #define __HAL_RCC_C2_UART7_CLK_SLEEP_DISABLE()          (RCC_C2->APB1LLPENR) &= ~ (RCC_APB1LLPENR_UART7LPEN)\r
5385 #define __HAL_RCC_C2_UART8_CLK_SLEEP_DISABLE()          (RCC_C2->APB1LLPENR) &= ~ (RCC_APB1LLPENR_UART8LPEN)\r
5386 #define __HAL_RCC_C2_CRS_CLK_SLEEP_DISABLE()            (RCC_C2->APB1HLPENR) &= ~ (RCC_APB1HLPENR_CRSLPEN)\r
5387 #define __HAL_RCC_C2_SWPMI_CLK_SLEEP_DISABLE()          (RCC_C2->APB1HLPENR) &= ~ (RCC_APB1HLPENR_SWPMILPEN)\r
5388 #define __HAL_RCC_C2_OPAMP_CLK_SLEEP_DISABLE()          (RCC_C2->APB1HLPENR) &= ~ (RCC_APB1HLPENR_OPAMPLPEN)\r
5389 #define __HAL_RCC_C2_MDIOS_CLK_SLEEP_DISABLE()          (RCC_C2->APB1HLPENR) &= ~ (RCC_APB1HLPENR_MDIOSLPEN)\r
5390 #define __HAL_RCC_C2_FDCAN_CLK_SLEEP_DISABLE()          (RCC_C2->APB1HLPENR) &= ~ (RCC_APB1HLPENR_FDCANLPEN)\r
5391 \r
5392 /** @brief  ENABLE or disable the APB2 peripheral clock during Low Power (Sleep) mode.\r
5393   * @note   Peripheral clock gating in SLEEP mode can be used to further reduce\r
5394   *         power consumption.\r
5395   * @note   After wakeup from SLEEP mode, the peripheral clock is ENABLEd again.\r
5396   * @note   By default, all peripheral clocks are ENABLEd during SLEEP mode.\r
5397   */\r
5398 \r
5399 #define __HAL_RCC_C2_TIM1_CLK_SLEEP_ENABLE()           (RCC_C2->APB2LPENR) |= (RCC_APB2LPENR_TIM1LPEN)\r
5400 #define __HAL_RCC_C2_TIM8_CLK_SLEEP_ENABLE()           (RCC_C2->APB2LPENR) |= (RCC_APB2LPENR_TIM8LPEN)\r
5401 #define __HAL_RCC_C2_USART1_CLK_SLEEP_ENABLE()         (RCC_C2->APB2LPENR) |= (RCC_APB2LPENR_USART1LPEN)\r
5402 #define __HAL_RCC_C2_USART6_CLK_SLEEP_ENABLE()         (RCC_C2->APB2LPENR) |= (RCC_APB2LPENR_USART6LPEN)\r
5403 #define __HAL_RCC_C2_SPI1_CLK_SLEEP_ENABLE()           (RCC_C2->APB2LPENR) |= (RCC_APB2LPENR_SPI1LPEN)\r
5404 #define __HAL_RCC_C2_SPI4_CLK_SLEEP_ENABLE()           (RCC_C2->APB2LPENR) |= (RCC_APB2LPENR_SPI4LPEN)\r
5405 #define __HAL_RCC_C2_TIM15_CLK_SLEEP_ENABLE()          (RCC_C2->APB2LPENR) |= (RCC_APB2LPENR_TIM15LPEN)\r
5406 #define __HAL_RCC_C2_TIM16_CLK_SLEEP_ENABLE()          (RCC_C2->APB2LPENR) |= (RCC_APB2LPENR_TIM16LPEN)\r
5407 #define __HAL_RCC_C2_TIM17_CLK_SLEEP_ENABLE()          (RCC_C2->APB2LPENR) |= (RCC_APB2LPENR_TIM17LPEN)\r
5408 #define __HAL_RCC_C2_SPI5_CLK_SLEEP_ENABLE()           (RCC_C2->APB2LPENR) |= (RCC_APB2LPENR_SPI5LPEN)\r
5409 #define __HAL_RCC_C2_SAI1_CLK_SLEEP_ENABLE()           (RCC_C2->APB2LPENR) |= (RCC_APB2LPENR_SAI1LPEN)\r
5410 #define __HAL_RCC_C2_SAI2_CLK_SLEEP_ENABLE()           (RCC_C2->APB2LPENR) |= (RCC_APB2LPENR_SAI2LPEN)\r
5411 #define __HAL_RCC_C2_SAI3_CLK_SLEEP_ENABLE()           (RCC_C2->APB2LPENR) |= (RCC_APB2LPENR_SAI3LPEN)\r
5412 #define __HAL_RCC_C2_DFSDM1_CLK_SLEEP_ENABLE()         (RCC_C2->APB2LPENR) |= (RCC_APB2LPENR_DFSDM1LPEN)\r
5413 #define __HAL_RCC_C2_HRTIM1_CLK_SLEEP_ENABLE()         (RCC_C2->APB2LPENR) |= (RCC_APB2LPENR_HRTIMLPEN)\r
5414 \r
5415 #define __HAL_RCC_C2_TIM1_CLK_SLEEP_DISABLE()           (RCC_C2->APB2LPENR) &= ~ (RCC_APB2LPENR_TIM1LPEN)\r
5416 #define __HAL_RCC_C2_TIM8_CLK_SLEEP_DISABLE()           (RCC_C2->APB2LPENR) &= ~ (RCC_APB2LPENR_TIM8LPEN)\r
5417 #define __HAL_RCC_C2_USART1_CLK_SLEEP_DISABLE()         (RCC_C2->APB2LPENR) &= ~ (RCC_APB2LPENR_USART1LPEN)\r
5418 #define __HAL_RCC_C2_USART6_CLK_SLEEP_DISABLE()         (RCC_C2->APB2LPENR) &= ~ (RCC_APB2LPENR_USART6LPEN)\r
5419 #define __HAL_RCC_C2_SPI1_CLK_SLEEP_DISABLE()           (RCC_C2->APB2LPENR) &= ~ (RCC_APB2LPENR_SPI1LPEN)\r
5420 #define __HAL_RCC_C2_SPI4_CLK_SLEEP_DISABLE()           (RCC_C2->APB2LPENR) &= ~ (RCC_APB2LPENR_SPI4LPEN)\r
5421 #define __HAL_RCC_C2_TIM15_CLK_SLEEP_DISABLE()          (RCC_C2->APB2LPENR) &= ~ (RCC_APB2LPENR_TIM15LPEN)\r
5422 #define __HAL_RCC_C2_TIM16_CLK_SLEEP_DISABLE()          (RCC_C2->APB2LPENR) &= ~ (RCC_APB2LPENR_TIM16LPEN)\r
5423 #define __HAL_RCC_C2_TIM17_CLK_SLEEP_DISABLE()          (RCC_C2->APB2LPENR) &= ~ (RCC_APB2LPENR_TIM17LPEN)\r
5424 #define __HAL_RCC_C2_SPI5_CLK_SLEEP_DISABLE()           (RCC_C2->APB2LPENR) &= ~ (RCC_APB2LPENR_SPI5LPEN)\r
5425 #define __HAL_RCC_C2_SAI1_CLK_SLEEP_DISABLE()           (RCC_C2->APB2LPENR) &= ~ (RCC_APB2LPENR_SAI1LPEN)\r
5426 #define __HAL_RCC_C2_SAI2_CLK_SLEEP_DISABLE()           (RCC_C2->APB2LPENR) &= ~ (RCC_APB2LPENR_SAI2LPEN)\r
5427 #define __HAL_RCC_C2_SAI3_CLK_SLEEP_DISABLE()           (RCC_C2->APB2LPENR) &= ~ (RCC_APB2LPENR_SAI3LPEN)\r
5428 #define __HAL_RCC_C2_DFSDM1_CLK_SLEEP_DISABLE()         (RCC_C2->APB2LPENR) &= ~ (RCC_APB2LPENR_DFSDM1LPEN)\r
5429 #define __HAL_RCC_C2_HRTIM1_CLK_SLEEP_DISABLE()         (RCC_C2->APB2LPENR) &= ~ (RCC_APB2LPENR_HRTIMLPEN)\r
5430 \r
5431 /** @brief  ENABLE or disable the APB4 peripheral clock during Low Power (Sleep) mode.\r
5432   * @note   Peripheral clock gating in SLEEP mode can be used to further reduce\r
5433   *         power consumption.\r
5434   * @note   After wakeup from SLEEP mode, the peripheral clock is ENABLEd again.\r
5435   * @note   By default, all peripheral clocks are ENABLEd during SLEEP mode.\r
5436   */\r
5437 \r
5438 #define __HAL_RCC_C2_SYSCFG_CLK_SLEEP_ENABLE()           (RCC_C2->APB4LPENR) |= (RCC_APB4LPENR_SYSCFGLPEN)\r
5439 #define __HAL_RCC_C2_LPUART1_CLK_SLEEP_ENABLE()          (RCC_C2->APB4LPENR) |= (RCC_APB4LPENR_LPUART1LPEN)\r
5440 #define __HAL_RCC_C2_SPI6_CLK_SLEEP_ENABLE()             (RCC_C2->APB4LPENR) |= (RCC_APB4LPENR_SPI6LPEN)\r
5441 #define __HAL_RCC_C2_I2C4_CLK_SLEEP_ENABLE()             (RCC_C2->APB4LPENR) |= (RCC_APB4LPENR_I2C4LPEN)\r
5442 #define __HAL_RCC_C2_LPTIM2_CLK_SLEEP_ENABLE()           (RCC_C2->APB4LPENR) |= (RCC_APB4LPENR_LPTIM2LPEN)\r
5443 #define __HAL_RCC_C2_LPTIM3_CLK_SLEEP_ENABLE()           (RCC_C2->APB4LPENR) |= (RCC_APB4LPENR_LPTIM3LPEN)\r
5444 #define __HAL_RCC_C2_LPTIM4_CLK_SLEEP_ENABLE()           (RCC_C2->APB4LPENR) |= (RCC_APB4LPENR_LPTIM4LPEN)\r
5445 #define __HAL_RCC_C2_LPTIM5_CLK_SLEEP_ENABLE()           (RCC_C2->APB4LPENR) |= (RCC_APB4LPENR_LPTIM5LPEN)\r
5446 #define __HAL_RCC_C2_COMP12_CLK_SLEEP_ENABLE()           (RCC_C2->APB4LPENR) |= (RCC_APB4LPENR_COMP12LPEN)\r
5447 #define __HAL_RCC_C2_VREF_CLK_SLEEP_ENABLE()             (RCC_C2->APB4LPENR) |= (RCC_APB4LPENR_VREFLPEN)\r
5448 #define __HAL_RCC_C2_SAI4_CLK_SLEEP_ENABLE()             (RCC_C2->APB4LPENR) |= (RCC_APB4LPENR_SAI4LPEN)\r
5449 #define __HAL_RCC_C2_RTC_CLK_SLEEP_ENABLE()              (RCC_C2->APB4LPENR) |= (RCC_APB4LPENR_RTCAPBLPEN)\r
5450 \r
5451 #define __HAL_RCC_C2_SYSCFG_CLK_SLEEP_DISABLE()           (RCC_C2->APB4LPENR) &= ~ (RCC_APB4LPENR_SYSCFGLPEN)\r
5452 #define __HAL_RCC_C2_LPUART1_CLK_SLEEP_DISABLE()          (RCC_C2->APB4LPENR) &= ~ (RCC_APB4LPENR_LPUART1LPEN)\r
5453 #define __HAL_RCC_C2_SPI6_CLK_SLEEP_DISABLE()             (RCC_C2->APB4LPENR) &= ~ (RCC_APB4LPENR_SPI6LPEN)\r
5454 #define __HAL_RCC_C2_I2C4_CLK_SLEEP_DISABLE()             (RCC_C2->APB4LPENR) &= ~ (RCC_APB4LPENR_I2C4LPEN)\r
5455 #define __HAL_RCC_C2_LPTIM2_CLK_SLEEP_DISABLE()           (RCC_C2->APB4LPENR) &= ~ (RCC_APB4LPENR_LPTIM2LPEN)\r
5456 #define __HAL_RCC_C2_LPTIM3_CLK_SLEEP_DISABLE()           (RCC_C2->APB4LPENR) &= ~ (RCC_APB4LPENR_LPTIM3LPEN)\r
5457 #define __HAL_RCC_C2_LPTIM4_CLK_SLEEP_DISABLE()           (RCC_C2->APB4LPENR) &= ~ (RCC_APB4LPENR_LPTIM4LPEN)\r
5458 #define __HAL_RCC_C2_LPTIM5_CLK_SLEEP_DISABLE()           (RCC_C2->APB4LPENR) &= ~ (RCC_APB4LPENR_LPTIM5LPEN)\r
5459 #define __HAL_RCC_C2_COMP12_CLK_SLEEP_DISABLE()           (RCC_C2->APB4LPENR) &= ~ (RCC_APB4LPENR_COMP12LPEN)\r
5460 #define __HAL_RCC_C2_VREF_CLK_SLEEP_DISABLE()             (RCC_C2->APB4LPENR) &= ~ (RCC_APB4LPENR_VREFLPEN)\r
5461 #define __HAL_RCC_C2_SAI4_CLK_SLEEP_DISABLE()             (RCC_C2->APB4LPENR) &= ~ (RCC_APB4LPENR_SAI4LPEN)\r
5462 #define __HAL_RCC_C2_RTC_CLK_SLEEP_DISABLE()              (RCC_C2->APB4LPENR) &= ~ (RCC_APB4LPENR_RTCAPBLPEN)\r
5463 \r
5464 #endif /*DUAL_CORE*/\r
5465 \r
5466 #if defined(DUAL_CORE)\r
5467 /** @brief  Enable or disable peripheral bus clock  when D3 domain is in DRUN\r
5468   * @note   After reset (default config), peripheral clock is disabled when both CPUs are in CSTOP\r
5469   */\r
5470 #else\r
5471 /** @brief  Enable or disable peripheral bus clock  when D3 domain is in DRUN\r
5472   * @note   After reset (default config), peripheral clock is disabled when CPU is in CSTOP\r
5473   */\r
5474 #endif /*DUAL_CORE*/\r
5475 \r
5476 #define __HAL_RCC_BDMA_CLKAM_ENABLE()             (RCC->D3AMR) |= (RCC_D3AMR_BDMAAMEN)\r
5477 #define __HAL_RCC_LPUART1_CLKAM_ENABLE()          (RCC->D3AMR) |= (RCC_D3AMR_LPUART1AMEN)\r
5478 #define __HAL_RCC_SPI6_CLKAM_ENABLE()             (RCC->D3AMR) |= (RCC_D3AMR_SPI6AMEN)\r
5479 #define __HAL_RCC_I2C4_CLKAM_ENABLE()             (RCC->D3AMR) |= (RCC_D3AMR_I2C4AMEN)\r
5480 #define __HAL_RCC_LPTIM2_CLKAM_ENABLE()           (RCC->D3AMR) |= (RCC_D3AMR_LPTIM2AMEN)\r
5481 #define __HAL_RCC_LPTIM3_CLKAM_ENABLE()           (RCC->D3AMR) |= (RCC_D3AMR_LPTIM3AMEN)\r
5482 #define __HAL_RCC_LPTIM4_CLKAM_ENABLE()           (RCC->D3AMR) |= (RCC_D3AMR_LPTIM4AMEN)\r
5483 #define __HAL_RCC_LPTIM5_CLKAM_ENABLE()           (RCC->D3AMR) |= (RCC_D3AMR_LPTIM5AMEN)\r
5484 #define __HAL_RCC_COMP12_CLKAM_ENABLE()           (RCC->D3AMR) |= (RCC_D3AMR_COMP12AMEN)\r
5485 #define __HAL_RCC_VREF_CLKAM_ENABLE()             (RCC->D3AMR) |= (RCC_D3AMR_VREFAMEN)\r
5486 #define __HAL_RCC_RTC_CLKAM_ENABLE()              (RCC->D3AMR) |= (RCC_D3AMR_RTCAMEN)\r
5487 #define __HAL_RCC_CRC_CLKAM_ENABLE()              (RCC->D3AMR) |= (RCC_D3AMR_CRCAMEN)\r
5488 #define __HAL_RCC_SAI4_CLKAM_ENABLE()             (RCC->D3AMR) |= (RCC_D3AMR_SAI4AMEN)\r
5489 #define __HAL_RCC_ADC3_CLKAM_ENABLE()             (RCC->D3AMR) |= (RCC_D3AMR_ADC3AMEN)\r
5490 \r
5491 #define __HAL_RCC_BKPRAM_CLKAM_ENABLE()           (RCC->D3AMR) |= (RCC_D3AMR_BKPRAMAMEN)\r
5492 #define __HAL_RCC_D3SRAM1_CLKAM_ENABLE()          (RCC->D3AMR) |= (RCC_D3AMR_SRAM4AMEN)\r
5493 \r
5494 #define __HAL_RCC_BDMA_CLKAM_DISABLE()             (RCC->D3AMR) &= ~ (RCC_D3AMR_BDMAAMEN)\r
5495 #define __HAL_RCC_LPUART1_CLKAM_DISABLE()          (RCC->D3AMR) &= ~ (RCC_D3AMR_LPUART1AMEN)\r
5496 #define __HAL_RCC_SPI6_CLKAM_DISABLE()             (RCC->D3AMR) &= ~ (RCC_D3AMR_SPI6AMEN)\r
5497 #define __HAL_RCC_I2C4_CLKAM_DISABLE()             (RCC->D3AMR) &= ~ (RCC_D3AMR_I2C4AMEN)\r
5498 #define __HAL_RCC_LPTIM2_CLKAM_DISABLE()           (RCC->D3AMR) &= ~ (RCC_D3AMR_LPTIM2AMEN)\r
5499 #define __HAL_RCC_LPTIM3_CLKAM_DISABLE()           (RCC->D3AMR) &= ~ (RCC_D3AMR_LPTIM3AMEN)\r
5500 #define __HAL_RCC_LPTIM4_CLKAM_DISABLE()           (RCC->D3AMR) &= ~ (RCC_D3AMR_LPTIM4AMEN)\r
5501 #define __HAL_RCC_LPTIM5_CLKAM_DISABLE()           (RCC->D3AMR) &= ~ (RCC_D3AMR_LPTIM5AMEN)\r
5502 #define __HAL_RCC_COMP12_CLKAM_DISABLE()           (RCC->D3AMR) &= ~ (RCC_D3AMR_COMP12AMEN)\r
5503 #define __HAL_RCC_VREF_CLKAM_DISABLE()             (RCC->D3AMR) &= ~ (RCC_D3AMR_VREFAMEN)\r
5504 #define __HAL_RCC_RTC_CLKAM_DISABLE()              (RCC->D3AMR) &= ~(RCC_D3AMR_RTCAMEN)\r
5505 #define __HAL_RCC_CRC_CLKAM_DISABLE()              (RCC->D3AMR) &= ~(RCC_D3AMR_CRCAMEN)\r
5506 #define __HAL_RCC_SAI4_CLKAM_DISABLE()             (RCC->D3AMR) &= ~(RCC_D3AMR_SAI4AMEN)\r
5507 #define __HAL_RCC_ADC3_CLKAM_DISABLE()             (RCC->D3AMR) &= ~(RCC_D3AMR_ADC3AMEN)\r
5508 \r
5509 #define __HAL_RCC_BKPRAM_CLKAM_DISABLE()           (RCC->D3AMR) &= ~ (RCC_D3AMR_BKPRAMAMEN)\r
5510 #define __HAL_RCC_D3SRAM1_CLKAM_DISABLE()          (RCC->D3AMR)&= ~ (RCC_D3AMR_SRAM4AMEN)\r
5511 \r
5512 \r
5513 /** @brief  Macro to enable or disable the Internal High Speed oscillator (HSI).\r
5514   * @note     After enabling the HSI, the application software should wait on\r
5515   *           HSIRDY flag to be set indicating that HSI clock is stable and can\r
5516   *           be used to clock the PLL and/or system clock.\r
5517   * @note     HSI can not be stopped if it is used directly or through the PLL\r
5518   *           as system clock. In this case, you have to select another source\r
5519   *           of the system clock then stop the HSI.\r
5520   * @note     The HSI is stopped by hardware when entering STOP and STANDBY modes.\r
5521   * @param    __STATE__ specifies the new state of the HSI.\r
5522   *           This parameter can be one of the following values:\r
5523   *            @arg RCC_HSI_OFF turn OFF the HSI oscillator\r
5524   *            @arg RCC_HSI_ON turn ON the HSI oscillator\r
5525   *            @arg RCC_HSI_DIV1 turn ON the HSI oscillator and divide it by 1 (default after reset)\r
5526   *            @arg RCC_HSI_DIV2 turn ON the HSI oscillator and divide it by 2\r
5527   *            @arg RCC_HSI_DIV4 turn ON the HSI oscillator and divide it by 4\r
5528   *            @arg RCC_HSI_DIV8 turn ON the HSI oscillator and divide it by 8\r
5529   * @note   When the HSI is stopped, HSIRDY flag goes low after 6 HSI oscillator\r
5530   *         clock cycles.\r
5531   */\r
5532 #define __HAL_RCC_HSI_CONFIG(__STATE__) \\r
5533                   MODIFY_REG(RCC->CR, RCC_CR_HSION | RCC_CR_HSIDIV , (uint32_t)(__STATE__))\r
5534 \r
5535 \r
5536 /** @brief  Macro to get the HSI divider.\r
5537   * @retval The HSI divider. The returned value can be one\r
5538   *         of the following:\r
5539   *            - RCC_CR_HSIDIV_1  HSI oscillator divided by 1 (default after reset)\r
5540   *            - RCC_CR_HSIDIV_2  HSI oscillator divided by 2\r
5541   *            - RCC_CR_HSIDIV_4  HSI oscillator divided by 4\r
5542   *            - RCC_CR_HSIDIV_8  HSI oscillator divided by 8\r
5543   */\r
5544 #define __HAL_RCC_GET_HSI_DIVIDER() ((uint32_t)(READ_BIT(RCC->CR, RCC_CR_HSIDIV)))\r
5545 \r
5546 /** @brief  Macros to enable or disable the Internal High Speed oscillator (HSI).\r
5547   * @note   The HSI is stopped by hardware when entering STOP and STANDBY modes.\r
5548   *         It is used (enabled by hardware) as system clock source after start-up\r
5549   *         from Reset, wakeup from STOP and STANDBY mode, or in case of failure\r
5550   *         of the HSE used directly or indirectly as system clock (if the Clock\r
5551   *         Security System CSS is enabled).\r
5552   * @note   HSI can not be stopped if it is used as system clock source. In this case,\r
5553   *         you have to select another source of the system clock then stop the HSI.\r
5554   * @note   After enabling the HSI, the application software should wait on HSIRDY\r
5555   *         flag to be set indicating that HSI clock is stable and can be used as\r
5556   *         system clock source.\r
5557   *         This parameter can be: ENABLE or DISABLE.\r
5558   * @note   When the HSI is stopped, HSIRDY flag goes low after 6 HSI oscillator\r
5559   *         clock cycles.\r
5560   */\r
5561 #define __HAL_RCC_HSI_ENABLE()  SET_BIT(RCC->CR, RCC_CR_HSION)\r
5562 #define __HAL_RCC_HSI_DISABLE() CLEAR_BIT(RCC->CR, RCC_CR_HSION)\r
5563 \r
5564 \r
5565 /** @brief  Macro to adjust the Internal High Speed oscillator (HSI) calibration value.\r
5566   * @note   The calibration is used to compensate for the variations in voltage\r
5567   *         and temperature that influence the frequency of the internal HSI RC.\r
5568   * @param  __HSICalibrationValue__: specifies the calibration trimming value.\r
5569   *         This parameter must be a number between 0 and 0x7F (3F for Rev Y device).\r
5570   */\r
5571 #define __HAL_RCC_HSI_CALIBRATIONVALUE_ADJUST(__HSICalibrationValue__)                                                                   \\r
5572            do {                                                                                                                          \\r
5573               if(HAL_GetREVID() <= REV_ID_Y)                                                                                             \\r
5574              {                                                                                                                           \\r
5575                MODIFY_REG(RCC->HSICFGR, HAL_RCC_REV_Y_HSITRIM_Msk, (uint32_t)(__HSICalibrationValue__) << HAL_RCC_REV_Y_HSITRIM_Pos);\\r
5576              }                                                                                                                           \\r
5577              else                                                                                                                        \\r
5578              {                                                                                                                           \\r
5579                MODIFY_REG(RCC->HSICFGR, RCC_HSICFGR_HSITRIM, (uint32_t)(__HSICalibrationValue__) << RCC_HSICFGR_HSITRIM_Pos);            \\r
5580              }                                                                                                                           \\r
5581            } while(0)\r
5582 \r
5583 /**\r
5584   * @brief    Macros to enable or disable the force of the Internal High Speed oscillator (HSI)\r
5585   *           in STOP mode to be quickly available as kernel clock for some peripherals.\r
5586   * @note     Keeping the HSI ON in STOP mode allows to avoid slowing down the communication\r
5587   *           speed because of the HSI start-up time.\r
5588   * @note     The enable of this function has not effect on the HSION bit.\r
5589   *           This parameter can be: ENABLE or DISABLE.\r
5590   * @retval None\r
5591   */\r
5592 #define __HAL_RCC_HSISTOP_ENABLE()     SET_BIT(RCC->CR, RCC_CR_HSIKERON)\r
5593 #define __HAL_RCC_HSISTOP_DISABLE()    CLEAR_BIT(RCC->CR, RCC_CR_HSIKERON)\r
5594 \r
5595 \r
5596 /**\r
5597   * @brief  Macro to enable or disable the Internal High Speed oscillator for USB (HSI48).\r
5598   * @note   After enabling the HSI48, the application software should wait on\r
5599   *         HSI48RDY flag to be set indicating that HSI48 clock is stable and can\r
5600   *         be used to clock the USB.\r
5601   * @note   The HSI48 is stopped by hardware when entering STOP and STANDBY modes.\r
5602   */\r
5603 #define __HAL_RCC_HSI48_ENABLE()    SET_BIT(RCC->CR, RCC_CR_HSI48ON);\r
5604 \r
5605 #define __HAL_RCC_HSI48_DISABLE()   CLEAR_BIT(RCC->CR, RCC_CR_HSI48ON);\r
5606 \r
5607 /**\r
5608   * @brief  Macros to enable or disable the Internal  oscillator (CSI).\r
5609   * @note     The CSI is stopped by hardware when entering STOP and STANDBY modes.\r
5610   *           It is used (enabled by hardware) as system clock source after\r
5611   *           start-up from Reset, wakeup from STOP and STANDBY mode, or in case\r
5612   *           of failure of the HSE used directly or indirectly as system clock\r
5613   *           (if the Clock Security System CSS is enabled).\r
5614   * @note     CSI can not be stopped if it is used as system clock source.\r
5615   *           In this case, you have to select another source of the system\r
5616   *           clock then stop the CSI.\r
5617   * @note     After enabling the CSI, the application software should wait on\r
5618   *           CSIRDY flag to be set indicating that CSI clock is stable and can\r
5619   *           be used as system clock source.\r
5620   * @note     When the CSI is stopped, CSIRDY flag goes low after 6 CSI oscillator\r
5621   *           clock cycles.\r
5622   */\r
5623 #define __HAL_RCC_CSI_ENABLE()  SET_BIT(RCC->CR, RCC_CR_CSION)\r
5624 #define __HAL_RCC_CSI_DISABLE() CLEAR_BIT(RCC->CR, RCC_CR_CSION)\r
5625 \r
5626 /** @brief  Macro Adjusts the Internal  oscillator (CSI) calibration value.\r
5627   * @note   The calibration is used to compensate for the variations in voltage\r
5628   *         and temperature that influence the frequency of the internal CSI RC.\r
5629   * @param  __CSICalibrationValue__: specifies the calibration trimming value.\r
5630   *         This parameter must be a number between 0 and 0x1F.\r
5631   */\r
5632 #define __HAL_RCC_CSI_CALIBRATIONVALUE_ADJUST(__CSICalibrationValue__)                                                                   \\r
5633            do {                                                                                                                          \\r
5634              if(HAL_GetREVID() <= REV_ID_Y)                                                                                              \\r
5635              {                                                                                                                           \\r
5636                MODIFY_REG(RCC->HSICFGR, HAL_RCC_REV_Y_CSITRIM_Msk, (uint32_t)(__CSICalibrationValue__) << HAL_RCC_REV_Y_CSITRIM_Pos);    \\r
5637              }                                                                                                                           \\r
5638              else                                                                                                                        \\r
5639              {                                                                                                                           \\r
5640                MODIFY_REG(RCC->CSICFGR, RCC_CSICFGR_CSITRIM, (uint32_t)(__CSICalibrationValue__) << RCC_CSICFGR_CSITRIM_Pos);            \\r
5641              }                                                                                                                           \\r
5642            } while(0)\r
5643 \r
5644 /**\r
5645   * @brief    Macros to enable or disable the force of the Low-power Internal oscillator (CSI)\r
5646   *           in STOP mode to be quickly available as kernel clock for USARTs and I2Cs.\r
5647   * @note     Keeping the CSI ON in STOP mode allows to avoid slowing down the communication\r
5648   *           speed because of the CSI start-up time.\r
5649   * @note     The enable of this function has not effect on the CSION bit.\r
5650   *           This parameter can be: ENABLE or DISABLE.\r
5651   * @retval None\r
5652   */\r
5653 #define __HAL_RCC_CSISTOP_ENABLE()     SET_BIT(RCC->CR, RCC_CR_CSIKERON)\r
5654 #define __HAL_RCC_CSISTOP_DISABLE()    CLEAR_BIT(RCC->CR, RCC_CR_CSIKERON)\r
5655 \r
5656 \r
5657 /** @brief  Macros to enable or disable the Internal Low Speed oscillator (LSI).\r
5658   * @note   After enabling the LSI, the application software should wait on\r
5659   *         LSIRDY flag to be set indicating that LSI clock is stable and can\r
5660   *         be used to clock the IWDG and/or the RTC.\r
5661   * @note   LSI can not be disabled if the IWDG is running.\r
5662   * @note   When the LSI is stopped, LSIRDY flag goes low after 6 LSI oscillator\r
5663   *         clock cycles.\r
5664   */\r
5665 #define __HAL_RCC_LSI_ENABLE()         SET_BIT(RCC->CSR, RCC_CSR_LSION)\r
5666 #define __HAL_RCC_LSI_DISABLE()        CLEAR_BIT(RCC->CSR, RCC_CSR_LSION)\r
5667 \r
5668 /**\r
5669   * @brief  Macro to configure the External High Speed oscillator (__HSE__).\r
5670   * @note   After enabling the HSE (RCC_HSE_ON or RCC_HSE_Bypass), the application\r
5671   *         software should wait on HSERDY flag to be set indicating that HSE clock\r
5672   *         is stable and can be used to clock the PLL and/or system clock.\r
5673   * @note   HSE state can not be changed if it is used directly or through the\r
5674   *         PLL as system clock. In this case, you have to select another source\r
5675   *         of the system clock then change the HSE state (ex. disable it).\r
5676   * @note   The HSE is stopped by hardware when entering STOP and STANDBY modes.\r
5677   * @note   This function reset the CSSON bit, so if the clock security system(CSS)\r
5678   *         was previously enabled you have to enable it again after calling this\r
5679   *         function.\r
5680   * @param  __STATE__: specifies the new state of the HSE.\r
5681   *         This parameter can be one of the following values:\r
5682   *            @arg RCC_HSE_OFF: turn OFF the HSE oscillator, HSERDY flag goes low after\r
5683   *                              6 HSE oscillator clock cycles.\r
5684   *            @arg RCC_HSE_ON: turn ON the HSE oscillator.\r
5685   *            @arg RCC_HSE_BYPASS: HSE oscillator bypassed with external clock.\r
5686   */\r
5687 #define __HAL_RCC_HSE_CONFIG(__STATE__)                         \\r
5688                     do {                                        \\r
5689                       if ((__STATE__) == RCC_HSE_ON)            \\r
5690                       {                                         \\r
5691                         SET_BIT(RCC->CR, RCC_CR_HSEON);         \\r
5692                       }                                         \\r
5693                       else if ((__STATE__) == RCC_HSE_OFF)      \\r
5694                       {                                         \\r
5695                         CLEAR_BIT(RCC->CR, RCC_CR_HSEON);       \\r
5696                         CLEAR_BIT(RCC->CR, RCC_CR_HSEBYP);      \\r
5697                       }                                         \\r
5698                       else if ((__STATE__) == RCC_HSE_BYPASS)   \\r
5699                       {                                         \\r
5700                         SET_BIT(RCC->CR, RCC_CR_HSEBYP);        \\r
5701                         SET_BIT(RCC->CR, RCC_CR_HSEON);         \\r
5702                       }                                         \\r
5703                       else                                      \\r
5704                       {                                         \\r
5705                         CLEAR_BIT(RCC->CR, RCC_CR_HSEON);       \\r
5706                         CLEAR_BIT(RCC->CR, RCC_CR_HSEBYP);      \\r
5707                       }                                         \\r
5708                     } while(0)\r
5709 \r
5710 /** @defgroup RCC_LSE_Configuration LSE Configuration\r
5711   * @{\r
5712   */\r
5713 \r
5714 /**\r
5715   * @brief  Macro to configure the External Low Speed oscillator (LSE).\r
5716   * @note   Transition LSE Bypass to LSE On and LSE On to LSE Bypass are not supported by this macro.\r
5717   *         User should request a transition to LSE Off first and then LSE On or LSE Bypass.\r
5718   * @note   As the LSE is in the Backup domain and write access is denied to\r
5719   *         this domain after reset, you have to enable write access using\r
5720   *         HAL_PWR_EnableBkUpAccess() function before to configure the LSE\r
5721   *         (to be done once after reset).\r
5722   * @note   After enabling the LSE (RCC_LSE_ON or RCC_LSE_BYPASS), the application\r
5723   *         software should wait on LSERDY flag to be set indicating that LSE clock\r
5724   *         is stable and can be used to clock the RTC.\r
5725   * @param  __STATE__: specifies the new state of the LSE.\r
5726   *         This parameter can be one of the following values:\r
5727   *            @arg RCC_LSE_OFF: turn OFF the LSE oscillator, LSERDY flag goes low after\r
5728   *                              6 LSE oscillator clock cycles.\r
5729   *            @arg RCC_LSE_ON: turn ON the LSE oscillator.\r
5730   *            @arg RCC_LSE_BYPASS: LSE oscillator bypassed with external clock.\r
5731   */\r
5732 #define __HAL_RCC_LSE_CONFIG(__STATE__) \\r
5733                     do {                                       \\r
5734                       if((__STATE__) == RCC_LSE_ON)            \\r
5735                       {                                        \\r
5736                         SET_BIT(RCC->BDCR, RCC_BDCR_LSEON);    \\r
5737                       }                                        \\r
5738                       else if((__STATE__) == RCC_LSE_OFF)      \\r
5739                       {                                        \\r
5740                         CLEAR_BIT(RCC->BDCR, RCC_BDCR_LSEON);  \\r
5741                         CLEAR_BIT(RCC->BDCR, RCC_BDCR_LSEBYP); \\r
5742                       }                                        \\r
5743                       else if((__STATE__) == RCC_LSE_BYPASS)   \\r
5744                       {                                        \\r
5745                         SET_BIT(RCC->BDCR, RCC_BDCR_LSEBYP);   \\r
5746                         SET_BIT(RCC->BDCR, RCC_BDCR_LSEON);    \\r
5747                       }                                        \\r
5748                       else                                     \\r
5749                       {                                        \\r
5750                         CLEAR_BIT(RCC->BDCR, RCC_BDCR_LSEON);  \\r
5751                         CLEAR_BIT(RCC->BDCR, RCC_BDCR_LSEBYP); \\r
5752                       }                                        \\r
5753                     } while(0)\r
5754 /**\r
5755   * @}\r
5756   */\r
5757 \r
5758 /** @brief  Macros to enable or disable the the RTC clock.\r
5759   * @note   These macros must be used only after the RTC clock source was selected.\r
5760   */\r
5761 #define __HAL_RCC_RTC_ENABLE()         SET_BIT(RCC->BDCR, RCC_BDCR_RTCEN)\r
5762 #define __HAL_RCC_RTC_DISABLE()        CLEAR_BIT(RCC->BDCR, RCC_BDCR_RTCEN)\r
5763 \r
5764 /** @brief  Macros to configure the RTC clock (RTCCLK).\r
5765   * @note   As the RTC clock configuration bits are in the Backup domain and write\r
5766   *         access is denied to this domain after reset, you have to enable write\r
5767   *         access using the Power Backup Access macro before to configure\r
5768   *         the RTC clock source (to be done once after reset).\r
5769   * @note   Once the RTC clock is configured it can't be changed unless the\r
5770   *         Backup domain is reset using __HAL_RCC_BackupReset_RELEASE() macro, or by\r
5771   *         a Power On Reset (POR).\r
5772   * @param  __RTCCLKSource__: specifies the RTC clock source.\r
5773   *         This parameter can be one of the following values:\r
5774   *            @arg RCC_RTCCLKSOURCE_LSE: LSE selected as RTC clock.\r
5775   *            @arg RCC_RTCCLKSOURCE_LSI: LSI selected as RTC clock.\r
5776   *            @arg RCC_RTCCLKSOURCE_HSE_DIVx: HSE clock divided by x selected\r
5777   *                                            as RTC clock, where x:[2,31]\r
5778   * @note   If the LSE or LSI is used as RTC clock source, the RTC continues to\r
5779   *         work in STOP and STANDBY modes, and can be used as wakeup source.\r
5780   *         However, when the HSE clock is used as RTC clock source, the RTC\r
5781   *         cannot be used in STOP and STANDBY modes.\r
5782   * @note   The maximum input clock frequency for RTC is 1MHz (when using HSE as\r
5783   *         RTC clock source).\r
5784   */\r
5785 #define __HAL_RCC_RTC_CLKPRESCALER(__RTCCLKSource__) (((__RTCCLKSource__) & RCC_BDCR_RTCSEL) == RCC_BDCR_RTCSEL) ?    \\r
5786                                                  MODIFY_REG(RCC->CFGR, RCC_CFGR_RTCPRE, (((__RTCCLKSource__) & 0xFFFFCFFU) >> 4)) : CLEAR_BIT(RCC->CFGR, RCC_CFGR_RTCPRE)\r
5787 \r
5788 #define __HAL_RCC_RTC_CONFIG(__RTCCLKSource__) do { __HAL_RCC_RTC_CLKPRESCALER(__RTCCLKSource__);    \\r
5789                                                     RCC->BDCR |= ((__RTCCLKSource__) & 0x00000FFFU);  \\r
5790                                                    } while (0)\r
5791 \r
5792 #define  __HAL_RCC_GET_RTC_SOURCE() ((uint32_t)(READ_BIT(RCC->BDCR, RCC_BDCR_RTCSEL)))\r
5793 \r
5794 \r
5795 /** @brief  Macros to force or release the Backup domain reset.\r
5796   * @note   This function resets the RTC peripheral (including the backup registers)\r
5797   *         and the RTC clock source selection in RCC_CSR register.\r
5798   * @note   The BKPSRAM is not affected by this reset.\r
5799   */\r
5800 #define __HAL_RCC_BACKUPRESET_FORCE()   SET_BIT(RCC->BDCR, RCC_BDCR_BDRST)\r
5801 #define __HAL_RCC_BACKUPRESET_RELEASE() CLEAR_BIT(RCC->BDCR, RCC_BDCR_BDRST)\r
5802 \r
5803 /** @brief  Macros to enable or disable the main PLL.\r
5804   * @note   After enabling the main PLL, the application software should wait on\r
5805   *         PLLRDY flag to be set indicating that PLL clock is stable and can\r
5806   *         be used as system clock source.\r
5807   * @note   The main PLL can not be disabled if it is used as system clock source\r
5808   * @note   The main PLL is disabled by hardware when entering STOP and STANDBY modes.\r
5809   */\r
5810 #define __HAL_RCC_PLL_ENABLE()         SET_BIT(RCC->CR, RCC_CR_PLL1ON)\r
5811 #define __HAL_RCC_PLL_DISABLE()        CLEAR_BIT(RCC->CR, RCC_CR_PLL1ON)\r
5812 \r
5813 /**\r
5814   * @brief  Enables or disables each clock output (PLL_P_CLK, PLL_Q_CLK, PLL_R_CLK)\r
5815   * @note   Enabling/disabling  those Clocks can be done only when the PLL is disabled.\r
5816   *         This is mainly used to save Power.\r
5817   *        (The ck_pll_p of the System PLL cannot be stopped if used as System Clock).\r
5818   * @param  __RCC_PLL1ClockOut__: specifies the PLL clock to be outputted\r
5819   *          This parameter can be one of the following values:\r
5820   *            @arg RCC_PLL1_DIVP: This clock is used to generate system clock (up to 400MHZ)\r
5821   *            @arg RCC_PLL1_DIVQ: This clock is used to generate peripherals clock (up to 400MHZ)\r
5822   *            @arg RCC_PLL1_DIVR: This clock is used to generate peripherals clock (up to 400MHZ)\r
5823   * @retval None\r
5824   */\r
5825 #define __HAL_RCC_PLLCLKOUT_ENABLE(__RCC_PLL1ClockOut__)   SET_BIT(RCC->PLLCFGR, (__RCC_PLL1ClockOut__))\r
5826 \r
5827 #define __HAL_RCC_PLLCLKOUT_DISABLE(__RCC_PLL1ClockOut__)  CLEAR_BIT(RCC->PLLCFGR, (__RCC_PLL1ClockOut__))\r
5828 \r
5829 \r
5830 /**\r
5831   * @brief  Enables or disables Fractional Part Of The Multiplication Factor of PLL1 VCO\r
5832   * @note   Enabling/disabling  Fractional Part can be any time  without the need to stop the PLL1\r
5833   * @retval None\r
5834   */\r
5835 #define __HAL_RCC_PLLFRACN_ENABLE()   SET_BIT(RCC->PLLCFGR, RCC_PLLCFGR_PLL1FRACEN)\r
5836 \r
5837 #define __HAL_RCC_PLLFRACN_DISABLE()  CLEAR_BIT(RCC->PLLCFGR, RCC_PLLCFGR_PLL1FRACEN)\r
5838 \r
5839 \r
5840 /**\r
5841   * @brief  Macro to configures the main PLL clock source, multiplication and division factors.\r
5842   * @note   This function must be used only when the main PLL is disabled.\r
5843   *\r
5844   * @param  __RCC_PLLSOURCE__: specifies the PLL entry clock source.\r
5845   *          This parameter can be one of the following values:\r
5846   *            @arg RCC_PLLSOURCE_CSI: CSI oscillator clock selected as PLL clock entry\r
5847   *            @arg RCC_PLLSOURCE_HSI: HSI oscillator clock selected as PLL clock entry\r
5848   *            @arg RCC_PLLSOURCE_HSE: HSE oscillator clock selected as PLL clock entry\r
5849   * @note   This clock source (__RCC_PLLSource__) is common for the main PLL1 (main PLL) and PLL2 & PLL3 .\r
5850   *\r
5851   * @param  __PLLM1__: specifies the division factor for PLL VCO input clock\r
5852   *          This parameter must be a number between 1 and 63.\r
5853   * @note   You have to set the PLLM parameter correctly to ensure that the VCO input\r
5854   *         frequency ranges from 1 to 16 MHz.\r
5855   *\r
5856   * @param  __PLLN1__: specifies the multiplication factor for PLL VCO output clock\r
5857   *          This parameter must be a number between 4 and 512.\r
5858   * @note   You have to set the PLLN parameter correctly to ensure that the VCO\r
5859   *         output frequency is between 150 and 420 MHz (when in medium VCO range) or\r
5860   *         between 192 and 836 MHZ (when in wide VCO range)\r
5861   *\r
5862   * @param  __PLLP1__: specifies the division factor for system  clock.\r
5863   *          This parameter must be a number between 2 and 128 (where odd numbers not allowed)\r
5864   *\r
5865   * @param  __PLLQ1__: specifies the division factor for peripheral kernel clocks\r
5866   *          This parameter must be a number between 1 and 128\r
5867   *\r
5868   * @param  __PLLR1__: specifies the division factor for peripheral kernel clocks\r
5869   *          This parameter must be a number between 1 and 128\r
5870   *\r
5871   * @retval None\r
5872   */\r
5873 \r
5874 \r
5875 #define __HAL_RCC_PLL_CONFIG(__RCC_PLLSOURCE__, __PLLM1__, __PLLN1__, __PLLP1__, __PLLQ1__,__PLLR1__ ) \\r
5876                   do{ MODIFY_REG(RCC->PLLCKSELR, (RCC_PLLCKSELR_PLLSRC | RCC_PLLCKSELR_DIVM1) , ((__RCC_PLLSOURCE__) | ( (__PLLM1__) <<4U)));  \\r
5877                       WRITE_REG (RCC->PLL1DIVR , ( (((__PLLN1__) - 1U )& RCC_PLL1DIVR_N1) | ((((__PLLP1__) -1U ) << 9U) & RCC_PLL1DIVR_P1) | \\r
5878                                 ((((__PLLQ1__) -1U) << 16U)& RCC_PLL1DIVR_Q1) | ((((__PLLR1__) - 1U) << 24U)& RCC_PLL1DIVR_R1))); \\r
5879                     } while(0)\r
5880 \r
5881 \r
5882 /** @brief  Macro to configure the PLLs clock source.\r
5883   * @note   This function must be used only when all PLLs are disabled.\r
5884   * @param  __PLLSOURCE__: specifies the PLLs entry clock source.\r
5885   *         This parameter can be one of the following values:\r
5886   *            @arg RCC_PLLSOURCE_CSI: CSI oscillator clock selected as PLL clock entry\r
5887   *            @arg RCC_PLLSOURCE_HSI: HSI oscillator clock selected as PLL clock entry\r
5888   *            @arg RCC_PLLSOURCE_HSE: HSE oscillator clock selected as PLL clock entry\r
5889   *\r
5890   */\r
5891 #define __HAL_RCC_PLL_PLLSOURCE_CONFIG(__PLLSOURCE__) MODIFY_REG(RCC->PLLCKSELR, RCC_PLLCKSELR_PLLSRC, (__PLLSOURCE__))\r
5892 \r
5893 \r
5894 /**\r
5895   * @brief  Macro to configures the main PLL clock Fractional Part Of The Multiplication Factor\r
5896   *\r
5897   * @note   These bits can be written at any time, allowing dynamic fine-tuning of the PLL1 VCO\r
5898   *\r
5899   * @param  __RCC_PLL1FRACN__: specifies Fractional Part Of The Multiplication Factor for PLL1 VCO\r
5900   *                            It should be a value between 0 and 8191\r
5901   * @note   Warning: The software has to set correctly these bits to insure that the VCO\r
5902   *                  output frequency is between its valid frequency range, which is:\r
5903   *                   192 to 836 MHz if PLL1VCOSEL = 0\r
5904   *                   150 to 420 MHz if PLL1VCOSEL = 1.\r
5905   *\r
5906   *\r
5907   * @retval None\r
5908   */\r
5909  #define  __HAL_RCC_PLLFRACN_CONFIG(__RCC_PLL1FRACN__) MODIFY_REG(RCC->PLL1FRACR, RCC_PLL1FRACR_FRACN1, (uint32_t)(__RCC_PLL1FRACN__) << RCC_PLL1FRACR_FRACN1_Pos)\r
5910 \r
5911 \r
5912 /** @brief  Macro to select  the PLL1  reference frequency range.\r
5913   * @param  __RCC_PLL1VCIRange__: specifies the PLL1 input frequency range\r
5914   *         This parameter can be one of the following values:\r
5915   *            @arg RCC_PLL1VCIRANGE_0: Range frequency is between 1 and 2 MHz\r
5916   *            @arg RCC_PLL1VCIRANGE_1: Range frequency is between 2 and 4 MHz\r
5917   *            @arg RCC_PLL1VCIRANGE_2: Range frequency is between 4 and 8 MHz\r
5918   *            @arg RCC_PLL1VCIRANGE_3: Range frequency is between 8 and 16 MHz\r
5919   * @retval None\r
5920   */\r
5921 #define __HAL_RCC_PLL_VCIRANGE(__RCC_PLL1VCIRange__) \\r
5922                   MODIFY_REG(RCC->PLLCFGR, RCC_PLLCFGR_PLL1RGE, (__RCC_PLL1VCIRange__))\r
5923 \r
5924 \r
5925 /** @brief  Macro to select  the PLL1  reference frequency range.\r
5926   * @param  __RCC_PLL1VCORange__: specifies the PLL1 input frequency range\r
5927   *         This parameter can be one of the following values:\r
5928   *            @arg RCC_PLL1VCOWIDE: Range frequency is between 192 and 836 MHz\r
5929   *            @arg RCC_PLL1VCOMEDIUM: Range frequency is between 150 and 420 MHz\r
5930   * @retval None\r
5931   */\r
5932 #define __HAL_RCC_PLL_VCORANGE(__RCC_PLL1VCORange__) \\r
5933                   MODIFY_REG(RCC->PLLCFGR, RCC_PLLCFGR_PLL1VCOSEL, (__RCC_PLL1VCORange__))\r
5934 \r
5935 \r
5936 \r
5937 /** @brief  Macro to get the clock source used as system clock.\r
5938   * @retval The clock source used as system clock. The returned value can be one\r
5939   *         of the following:\r
5940   *              - RCC_CFGR_SWS_CSI: CSI used as system clock.\r
5941   *              - RCC_CFGR_SWS_HSI: HSI used as system clock.\r
5942   *              - RCC_CFGR_SWS_HSE: HSE used as system clock.\r
5943   *              - RCC_CFGR_SWS_PLL: PLL used as system clock.\r
5944   */\r
5945 #define __HAL_RCC_GET_SYSCLK_SOURCE() ((uint32_t)(RCC->CFGR & RCC_CFGR_SWS))\r
5946 \r
5947 \r
5948 /**\r
5949   * @brief Macro to configure the system clock source.\r
5950   * @param __RCC_SYSCLKSOURCE__: specifies the system clock source.\r
5951   * This parameter can be one of the following values:\r
5952   *              - RCC_SYSCLKSOURCE_HSI: HSI oscillator is used as system clock source.\r
5953   *              - RCC_SYSCLKSOURCE_CSI: CSI oscillator is used as system clock source.\r
5954   *              - RCC_SYSCLKSOURCE_HSE: HSE oscillator is used as system clock source.\r
5955   *              - RCC_SYSCLKSOURCE_PLLCLK: PLL output is used as system clock source.\r
5956   */\r
5957 #define __HAL_RCC_SYSCLK_CONFIG(__RCC_SYSCLKSOURCE__) MODIFY_REG(RCC->CFGR, RCC_CFGR_SW, (__RCC_SYSCLKSOURCE__))\r
5958 \r
5959 /** @brief  Macro to get the oscillator used as PLL clock source.\r
5960   * @retval The oscillator used as PLL clock source. The returned value can be one\r
5961   *         of the following:\r
5962   *              - RCC_PLLSOURCE_NONE: No oscillator is used as PLL clock source.\r
5963   *              - RCC_PLLSOURCE_CSI: CSI oscillator is used as PLL clock source.\r
5964   *              - RCC_PLLSOURCE_HSI: HSI oscillator is used as PLL clock source.\r
5965   *              - RCC_PLLSOURCE_HSE: HSE oscillator is used as PLL clock source.\r
5966   */\r
5967 #define __HAL_RCC_GET_PLL_OSCSOURCE() ((uint32_t)(RCC->PLLCKSELR & RCC_PLLCKSELR_PLLSRC))\r
5968 \r
5969 /** @defgroup RCCEx_MCOx_Clock_Config RCC Extended MCOx Clock Config\r
5970   * @{\r
5971   */\r
5972 \r
5973 /** @brief  Macro to configure the MCO1 clock.\r
5974   * @param  __MCOCLKSOURCE__ specifies the MCO clock source.\r
5975   *          This parameter can be one of the following values:\r
5976   *            @arg RCC_MCO1SOURCE_HSI: HSI clock selected as MCO1 source\r
5977   *            @arg RCC_MCO1SOURCE_LSE: LSE clock selected as MCO1 source\r
5978   *            @arg RCC_MCO1SOURCE_HSE: HSE clock selected as MCO1 source\r
5979   *            @arg RCC_MCO1SOURCE_PLL1QCLK:  PLL1Q clock selected as MCO1 source\r
5980   *            @arg RCC_MCO1SOURCE_HSI48: HSI48 (48MHZ) selected as MCO1 source\r
5981   * @param  __MCODIV__ specifies the MCO clock prescaler.\r
5982   *          This parameter can be one of the following values:\r
5983   *            @arg RCC_MCODIV_1 up to RCC_MCODIV_15  : divider applied to MCO1 clock\r
5984   */\r
5985 #define __HAL_RCC_MCO1_CONFIG(__MCOCLKSOURCE__, __MCODIV__) \\r
5986                  MODIFY_REG(RCC->CFGR, (RCC_CFGR_MCO1 | RCC_CFGR_MCO1PRE), ((__MCOCLKSOURCE__) | (__MCODIV__)))\r
5987 \r
5988 /** @brief  Macro to configure the MCO2 clock.\r
5989   * @param  __MCOCLKSOURCE__ specifies the MCO clock source.\r
5990   *          This parameter can be one of the following values:\r
5991   *            @arg RCC_MCO2SOURCE_SYSCLK: System clock (SYSCLK) selected as MCO2 source\r
5992   *            @arg RCC_MCO2SOURCE_PLL2PCLK: PLL2P clock selected as MCO2 source\r
5993   *            @arg RCC_MCO2SOURCE_HSE: HSE clock selected as MCO2 source\r
5994   *            @arg RCC_MCO2SOURCE_PLLCLK:  PLL1P clock selected as MCO2 source\r
5995   *            @arg RCC_MCO2SOURCE_CSICLK:  CSI clock selected as MCO2 source\r
5996   *            @arg RCC_MCO2SOURCE_LSICLK:  LSI clock selected as MCO2 source\r
5997   * @param  __MCODIV__ specifies the MCO clock prescaler.\r
5998   *          This parameter can be one of the following values:\r
5999   *            @arg RCC_MCODIV_1 up to RCC_MCODIV_15  : divider applied to MCO2 clock\r
6000   */\r
6001 #define __HAL_RCC_MCO2_CONFIG(__MCOCLKSOURCE__, __MCODIV__) \\r
6002     MODIFY_REG(RCC->CFGR, (RCC_CFGR_MCO2 | RCC_CFGR_MCO2PRE), ((__MCOCLKSOURCE__) | ((__MCODIV__) << 7)));\r
6003 \r
6004 /**\r
6005   * @}\r
6006   */\r
6007 \r
6008 /**\r
6009   * @brief  Macro to configure the External Low Speed oscillator (LSE) drive capability.\r
6010   * @note   As the LSE is in the Backup domain and write access is denied to\r
6011   *         this domain after reset, you have to enable write access using\r
6012   *         HAL_PWR_EnableBkUpAccess() function before to configure the LSE\r
6013   *         (to be done once after reset).\r
6014   * @note   On STM32H7 Rev.B and above devices this can't be updated while LSE is ON.\r
6015   * @param  __LSEDRIVE__: specifies the new state of the LSE drive capability.\r
6016   *          This parameter can be one of the following values:\r
6017   *            @arg RCC_LSEDRIVE_LOW: LSE oscillator low drive capability.\r
6018   *            @arg RCC_LSEDRIVE_MEDIUMLOW: LSE oscillator medium low drive capability.\r
6019   *            @arg RCC_LSEDRIVE_MEDIUMHIGH: LSE oscillator medium high drive capability.\r
6020   *            @arg RCC_LSEDRIVE_HIGH: LSE oscillator high drive capability.\r
6021   * @retval None\r
6022   */\r
6023 #define __HAL_RCC_LSEDRIVE_CONFIG(__LSEDRIVE__) \\r
6024            do{                                                                                                                                \\r
6025              if((HAL_GetREVID() <= REV_ID_Y) && (((__LSEDRIVE__) == RCC_LSEDRIVE_MEDIUMLOW) || ((__LSEDRIVE__) == RCC_LSEDRIVE_MEDIUMHIGH)))  \\r
6026              {                                                                                                                                \\r
6027               MODIFY_REG(RCC->BDCR, RCC_BDCR_LSEDRV, (~(uint32_t)(__LSEDRIVE__)) & RCC_BDCR_LSEDRV_Msk);                                      \\r
6028              }                                                                                                                                \\r
6029              else                                                                                                                             \\r
6030              {                                                                                                                                \\r
6031                MODIFY_REG(RCC->BDCR, RCC_BDCR_LSEDRV, (uint32_t)(__LSEDRIVE__));                                                              \\r
6032              }                                                                                                                                \\r
6033            } while(0)\r
6034 /**\r
6035   * @brief  Macro to configure the wake up from stop clock.\r
6036   * @param  __RCC_STOPWUCLK__: specifies the clock source used after wake up from stop\r
6037   *         This parameter can be one of the following values:\r
6038   *            @arg RCC_STOP_WAKEUPCLOCK_CSI: CSI selected as system clock source\r
6039   *            @arg RCC_STOP_WAKEUPCLOCK_HSI: HSI selected as system clock source\r
6040   * @retval None\r
6041   */\r
6042 #define __HAL_RCC_WAKEUPSTOP_CLK_CONFIG(__RCC_STOPWUCLK__) \\r
6043                   MODIFY_REG(RCC->CFGR, RCC_CFGR_STOPWUCK, (__RCC_STOPWUCLK__))\r
6044 \r
6045 /**\r
6046   * @brief  Macro to configure the Kernel wake up from stop clock.\r
6047   * @param  __RCC_STOPKERWUCLK__: specifies the Kernel clock source used after wake up from stop\r
6048   *         This parameter can be one of the following values:\r
6049   *            @arg RCC_STOP_KERWAKEUPCLOCK_CSI: CSI selected as Kernel clock source\r
6050   *            @arg RCC_STOP_KERWAKEUPCLOCK_HSI: HSI selected as Kernel clock source\r
6051   * @retval None\r
6052   */\r
6053 #define __HAL_RCC_KERWAKEUPSTOP_CLK_CONFIG(__RCC_STOPKERWUCLK__) \\r
6054                   MODIFY_REG(RCC->CFGR, RCC_CFGR_STOPKERWUCK, (__RCC_STOPKERWUCLK__))\r
6055 \r
6056 /** @defgroup RCC_Flags_Interrupts_Management Flags Interrupts Management\r
6057   * @brief macros to manage the specified RCC Flags and interrupts.\r
6058   * @{\r
6059   */\r
6060 /** @brief  Enable RCC interrupt.\r
6061   * @param  __INTERRUPT__: specifies the RCC interrupt sources to be enabled.\r
6062   *         This parameter can be any combination of the following values:\r
6063   *            @arg RCC_IT_LSIRDY: LSI ready interrupt\r
6064   *            @arg RCC_IT_LSERDY: LSE ready interrupt\r
6065   *            @arg RCC_IT_CSIRDY: HSI ready interrupt\r
6066   *            @arg RCC_IT_HSIRDY: HSI ready interrupt\r
6067   *            @arg RCC_IT_HSERDY: HSE ready interrupt\r
6068   *            @arg RCC_IT_HSI48RDY: HSI48 ready interrupt\r
6069   *            @arg RCC_IT_PLLRDY: main PLL ready interrupt\r
6070   *            @arg RCC_IT_PLL2RDY: PLL2 ready interrupt\r
6071   *            @arg RCC_IT_PLL3RDY: PLL3 ready interrupt\r
6072   *            @arg RCC_IT_LSECSS: Clock security system interrupt\r
6073   */\r
6074 #define __HAL_RCC_ENABLE_IT(__INTERRUPT__) SET_BIT(RCC->CIER, (__INTERRUPT__))\r
6075 \r
6076 /** @brief Disable RCC interrupt\r
6077   * @param  __INTERRUPT__: specifies the RCC interrupt sources to be disabled.\r
6078   *         This parameter can be any combination of the following values:\r
6079   *            @arg RCC_IT_LSIRDY: LSI ready interrupt\r
6080   *            @arg RCC_IT_LSERDY: LSE ready interrupt\r
6081   *            @arg RCC_IT_CSIRDY: HSI ready interrupt\r
6082   *            @arg RCC_IT_HSIRDY: HSI ready interrupt\r
6083   *            @arg RCC_IT_HSERDY: HSE ready interrupt\r
6084   *            @arg RCC_IT_HSI48RDY: HSI48 ready interrupt\r
6085   *            @arg RCC_IT_PLLRDY: main PLL ready interrupt\r
6086   *            @arg RCC_IT_PLL2RDY: PLL2 ready interrupt\r
6087   *            @arg RCC_IT_PLL3RDY: PLL3 ready interrupt\r
6088   *            @arg RCC_IT_LSECSS: Clock security system interrupt\r
6089   */\r
6090 #define __HAL_RCC_DISABLE_IT(__INTERRUPT__) CLEAR_BIT(RCC->CIER, (__INTERRUPT__))\r
6091 \r
6092 /** @brief  Clear the RCC's interrupt pending bits\r
6093   * @param  __INTERRUPT__: specifies the interrupt pending bit to clear.\r
6094   *         This parameter can be any combination of the following values:\r
6095   *            @arg RCC_IT_LSIRDY: LSI ready interrupt\r
6096   *            @arg RCC_IT_LSERDY: LSE ready interrupt\r
6097   *            @arg RCC_IT_CSIRDY: CSI ready interrupt\r
6098   *            @arg RCC_IT_HSIRDY: HSI ready interrupt\r
6099   *            @arg RCC_IT_HSERDY: HSE ready interrupt\r
6100   *            @arg RCC_IT_HSI48RDY: HSI48 ready interrupt\r
6101   *            @arg RCC_IT_PLLRDY: main PLL ready interrupt\r
6102   *            @arg RCC_IT_PLL2RDY: PLL2 ready interrupt\r
6103   *            @arg RCC_IT_PLL3RDY: PLL3 ready interrupt\r
6104   *            @arg RCC_IT_HSECSS: HSE Clock Security interrupt\r
6105   *            @arg RCC_IT_LSECSS: Clock security system interrupt\r
6106   */\r
6107 #define __HAL_RCC_CLEAR_IT(__INTERRUPT__) (RCC->CICR = (__INTERRUPT__))\r
6108 \r
6109 /** @brief  Check the RCC's interrupt has occurred or not.\r
6110   * @param  __INTERRUPT__: specifies the RCC interrupt source to check.\r
6111   *         This parameter can be any combination of the following values:\r
6112   *            @arg RCC_IT_LSIRDY: LSI ready interrupt\r
6113   *            @arg RCC_IT_LSERDY: LSE ready interrupt\r
6114   *            @arg RCC_IT_CSIRDY: CSI ready interrupt\r
6115   *            @arg RCC_IT_HSIRDY: HSI ready interrupt\r
6116   *            @arg RCC_IT_HSERDY: HSE ready interrupt\r
6117   *            @arg RCC_IT_HSI48RDY: HSI48 ready interrupt\r
6118   *            @arg RCC_IT_PLLRDY: main PLL ready interrupt\r
6119   *            @arg RCC_IT_PLL2RDY: PLL2 ready interrupt\r
6120   *            @arg RCC_IT_PLL3RDY: PLL3 ready interrupt\r
6121   *            @arg RCC_IT_HSECSS: HSE Clock Security interrupt\r
6122   *            @arg RCC_IT_LSECSS: Clock security system interrupt\r
6123   * @retval The new state of __INTERRUPT__ (TRUE or FALSE).\r
6124   */\r
6125 #define __HAL_RCC_GET_IT(__INTERRUPT__) ((RCC->CIFR & (__INTERRUPT__)) == (__INTERRUPT__))\r
6126 \r
6127 /** @brief Set RMVF bit to clear the reset flags.\r
6128   */\r
6129 #define __HAL_RCC_CLEAR_RESET_FLAGS() (RCC->RSR |= RCC_RSR_RMVF)\r
6130 \r
6131 #if defined(DUAL_CORE)\r
6132 #define __HAL_RCC_C1_CLEAR_RESET_FLAGS() (RCC_C1->RSR |= RCC_RSR_RMVF)\r
6133 \r
6134 #define __HAL_RCC_C2_CLEAR_RESET_FLAGS() (RCC_C2->RSR |= RCC_RSR_RMVF)\r
6135 #endif /*DUAL_CORE*/\r
6136 \r
6137 #if defined(DUAL_CORE)\r
6138 /** @brief  Check RCC flag is set or not.\r
6139   * @param  __FLAG__: specifies the flag to check.\r
6140   *         This parameter can be one of the following values:\r
6141   *            @arg RCC_FLAG_HSIRDY: HSI oscillator clock ready\r
6142   *            @arg RCC_FLAG_HSIDIV: HSI divider flag\r
6143   *            @arg RCC_FLAG_CSIRDY: CSI oscillator clock ready\r
6144   *            @arg RCC_FLAG_HSI48RDY: HSI48 oscillator clock ready\r
6145   *            @arg RCC_FLAG_HSERDY:  HSE oscillator clock ready\r
6146   *            @arg RCC_FLAG_D1CKRDY:  Domain1 clock ready\r
6147   *            @arg RCC_FLAG_D2CKRDY:  Domain2 clock ready\r
6148   *            @arg RCC_FLAG_PLLRDY:  PLL1 clock ready\r
6149   *            @arg RCC_FLAG_PLL2RDY: PLL2 clock ready\r
6150   *            @arg RCC_FLAG_PLL3RDY: PLL3 clock ready\r
6151   *            @arg RCC_FLAG_LSERDY: LSE oscillator clock ready\r
6152   *            @arg RCC_FLAG_LSIRDY: LSI oscillator clock ready\r
6153   *            @arg RCC_FLAG_C1RST:  CPU reset flag\r
6154   *            @arg RCC_FLAG_C2RST:  CPU2 reset flag\r
6155   *            @arg RCC_FLAG_D1RST:  D1 domain power switch reset flag\r
6156   *            @arg RCC_FLAG_D2RST:  D2 domain power switch reset flag\r
6157   *            @arg RCC_FLAG_BORRST: BOR reset flag\r
6158   *            @arg RCC_FLAG_PINRST: Pin reset\r
6159   *            @arg RCC_FLAG_PORRST: POR/PDR  reset\r
6160   *            @arg RCC_FLAG_SFTR1ST: System reset from CPU reset flag\r
6161   *            @arg RCC_FLAG_SFTR2ST: System reset from CPU2 reset flag\r
6162   *            @arg RCC_FLAG_BORRST:   D2 domain power switch reset flag\r
6163   *            @arg RCC_FLAG_IWDG1RST: CPU Independent Watchdog reset\r
6164   *            @arg RCC_FLAG_IWDG2RST: CPU2 Independent Watchdog reset\r
6165   *            @arg RCC_FLAG_WWDG2RST: Window Watchdog2 reset\r
6166   *            @arg RCC_FLAG_WWDG1RST: Window Watchdog1 reset\r
6167   *            @arg RCC_FLAG_LPWR1RST: Reset due to illegal D1 DSTANDBY or CPU CSTOP flag\r
6168   *            @arg RCC_FLAG_LPWR2RST: Reset due to illegal D2 DSTANDBY or CPU2 CSTOP flag\r
6169   * @retval The new state of __FLAG__ (TRUE or FALSE).\r
6170   */\r
6171 #define RCC_FLAG_MASK  ((uint8_t)0x1F)\r
6172 #define __HAL_RCC_GET_FLAG(__FLAG__) (((((((__FLAG__) >> 5U) == 1U)? RCC->CR :((((__FLAG__) >> 5U) == 2U) ? RCC->BDCR : \\r
6173 ((((__FLAG__) >> 5U) == 3U)? RCC->CSR : ((((__FLAG__) >> 5U) == 4U)? RCC->RSR :RCC->CIFR))))  & (1U << ((__FLAG__) & RCC_FLAG_MASK)))!= 0U)? 1U : 0U)\r
6174 \r
6175 #define __HAL_RCC_C1_GET_FLAG(__FLAG__) (((((((__FLAG__) >> 5U) == 1U)? RCC->CR :((((__FLAG__) >> 5U) == 2U) ? RCC->BDCR : \\r
6176 ((((__FLAG__) >> 5U) == 3U)? RCC->CSR : ((((__FLAG__) >> 5U) == 4U)? RCC_C1->RSR :RCC->CIFR))))  & (1U << ((__FLAG__) & RCC_FLAG_MASK)))!= 0U)? 1U : 0U)\r
6177 \r
6178 #define __HAL_RCC_C2_GET_FLAG(__FLAG__) (((((((__FLAG__) >> 5U) == 1U)? RCC->CR :((((__FLAG__) >> 5U) == 2U) ? RCC->BDCR : \\r
6179 ((((__FLAG__) >> 5U) == 3U)? RCC->CSR : ((((__FLAG__) >> 5U) == 4U)? RCC_C2->RSR :RCC->CIFR))))  & (1U << ((__FLAG__) & RCC_FLAG_MASK)))!= 0U)? 1U : 0U)\r
6180 \r
6181 #else\r
6182 \r
6183 /** @brief  Check RCC flag is set or not.\r
6184   * @param  __FLAG__: specifies the flag to check.\r
6185   *         This parameter can be one of the following values:\r
6186   *            @arg RCC_FLAG_HSIRDY: HSI oscillator clock ready\r
6187   *            @arg RCC_FLAG_HSIDIV: HSI divider flag\r
6188   *            @arg RCC_FLAG_CSIRDY: CSI oscillator clock ready\r
6189   *            @arg RCC_FLAG_HSI48RDY: HSI48 oscillator clock ready\r
6190   *            @arg RCC_FLAG_HSERDY:  HSE oscillator clock ready\r
6191   *            @arg RCC_FLAG_D1CKRDY:  Domain1 clock ready\r
6192   *            @arg RCC_FLAG_D2CKRDY:  Domain2 clock ready\r
6193   *            @arg RCC_FLAG_PLLRDY:  PLL1 clock ready\r
6194   *            @arg RCC_FLAG_PLL2RDY: PLL2 clock ready\r
6195   *            @arg RCC_FLAG_PLL3RDY: PLL3 clock ready\r
6196   *            @arg RCC_FLAG_LSERDY: LSE oscillator clock ready\r
6197   *            @arg RCC_FLAG_LSIRDY: LSI oscillator clock ready\r
6198   *            @arg RCC_FLAG_CPURST: CPU reset flag\r
6199   *            @arg RCC_FLAG_D1RST:  D1 domain power switch reset flag\r
6200   *            @arg RCC_FLAG_D2RST:  D2 domain power switch reset flag\r
6201   *            @arg RCC_FLAG_BORRST: BOR reset flag\r
6202   *            @arg RCC_FLAG_PINRST: Pin reset\r
6203   *            @arg RCC_FLAG_PORRST: POR/PDR  reset\r
6204   *            @arg RCC_FLAG_SFTRST: System reset from CPU reset flag\r
6205   *            @arg RCC_FLAG_BORRST:   D2 domain power switch reset flag\r
6206   *            @arg RCC_FLAG_IWDG1RST: CPU Independent Watchdog reset\r
6207   *            @arg RCC_FLAG_WWDG1RST: Window Watchdog1 reset\r
6208   *            @arg RCC_FLAG_LPWR1RST: Reset due to illegal D1 DSTANDBY or CPU CSTOP flag\r
6209   *            @arg RCC_FLAG_LPWR2RST: Reset due to illegal D2 DSTANDBY flag\r
6210   * @retval The new state of __FLAG__ (TRUE or FALSE).\r
6211   */\r
6212 #define RCC_FLAG_MASK  ((uint8_t)0x1F)\r
6213 #define __HAL_RCC_GET_FLAG(__FLAG__) (((((((__FLAG__) >> 5U) == 1U)? RCC->CR :((((__FLAG__) >> 5U) == 2U) ? RCC->BDCR : \\r
6214 ((((__FLAG__) >> 5U) == 3U)? RCC->CSR : ((((__FLAG__) >> 5U) == 4U)? RCC->RSR :RCC->CIFR))))  & (1UL << ((__FLAG__) & RCC_FLAG_MASK)))!= 0U)? 1U : 0U)\r
6215 \r
6216 #endif /*DUAL_CORE*/\r
6217 \r
6218 /**\r
6219   * @}\r
6220   */\r
6221 \r
6222 #define RCC_GET_PLL_OSCSOURCE() ((RCC->PLLCKSELR & RCC_PLLCKSELR_PLLSRC) >> RCC_PLLCKSELR_PLLSRC_Pos)\r
6223 \r
6224 /**\r
6225   * @}\r
6226   */\r
6227 \r
6228 /* Include RCC HAL Extension module */\r
6229 #include "stm32h7xx_hal_rcc_ex.h"\r
6230 \r
6231 /* Exported functions --------------------------------------------------------*/\r
6232  /** @addtogroup RCC_Exported_Functions\r
6233   * @{\r
6234   */\r
6235 \r
6236 /** @addtogroup RCC_Exported_Functions_Group1\r
6237   * @{\r
6238   */\r
6239 /* Initialization and de-initialization functions  ******************************/\r
6240 HAL_StatusTypeDef HAL_RCC_DeInit(void);\r
6241 HAL_StatusTypeDef HAL_RCC_OscConfig(RCC_OscInitTypeDef *RCC_OscInitStruct);\r
6242 HAL_StatusTypeDef HAL_RCC_ClockConfig(RCC_ClkInitTypeDef *RCC_ClkInitStruct, uint32_t FLatency);\r
6243 \r
6244 /**\r
6245   * @}\r
6246   */\r
6247 \r
6248 /** @addtogroup RCC_Exported_Functions_Group2\r
6249   * @{\r
6250   */\r
6251 /* Peripheral Control functions  ************************************************/\r
6252 void     HAL_RCC_MCOConfig(uint32_t RCC_MCOx, uint32_t RCC_MCOSource, uint32_t RCC_MCODiv);\r
6253 void     HAL_RCC_EnableCSS(void);\r
6254 void     HAL_RCC_DisableCSS(void);\r
6255 uint32_t HAL_RCC_GetSysClockFreq(void);\r
6256 uint32_t HAL_RCC_GetHCLKFreq(void);\r
6257 uint32_t HAL_RCC_GetPCLK1Freq(void);\r
6258 uint32_t HAL_RCC_GetPCLK2Freq(void);\r
6259 void     HAL_RCC_GetOscConfig(RCC_OscInitTypeDef *RCC_OscInitStruct);\r
6260 void     HAL_RCC_GetClockConfig(RCC_ClkInitTypeDef *RCC_ClkInitStruct, uint32_t *pFLatency);\r
6261 /* CSS NMI IRQ handler */\r
6262 void     HAL_RCC_NMI_IRQHandler(void);\r
6263 /* User Callbacks in non blocking mode (IT mode) */\r
6264 void     HAL_RCC_CCSCallback(void);\r
6265 \r
6266 /**\r
6267   * @}\r
6268   */\r
6269 \r
6270 /**\r
6271   * @}\r
6272   */\r
6273 \r
6274 /* Private types -------------------------------------------------------------*/\r
6275 /* Private variables ---------------------------------------------------------*/\r
6276 /* Private constants ---------------------------------------------------------*/\r
6277 /** @defgroup RCC_Private_Constants RCC Private Constants\r
6278   * @{\r
6279   */\r
6280 \r
6281 #define HSE_TIMEOUT_VALUE          HSE_STARTUP_TIMEOUT\r
6282 #define HSI_TIMEOUT_VALUE          (2U)    /* 2 ms */\r
6283 #define HSI48_TIMEOUT_VALUE        (2U)    /* 2 ms */\r
6284 #define CSI_TIMEOUT_VALUE          (2U)    /* 2 ms */\r
6285 #define LSI_TIMEOUT_VALUE          (2U)    /* 2 ms */\r
6286 #define PLL_TIMEOUT_VALUE          (2U)    /* 2 ms */\r
6287 #define CLOCKSWITCH_TIMEOUT_VALUE  (5000U) /* 5 s  */\r
6288 #define RCC_DBP_TIMEOUT_VALUE      (100U)\r
6289 #define RCC_LSE_TIMEOUT_VALUE      LSE_STARTUP_TIMEOUT\r
6290 \r
6291 /**\r
6292   * @}\r
6293   */\r
6294 \r
6295 /* Private macros ------------------------------------------------------------*/\r
6296 /** @addtogroup RCC_Private_Macros RCC Private Macros\r
6297   * @{\r
6298   */\r
6299 \r
6300 /** @defgroup RCC_IS_RCC_Definitions RCC Private macros to check input parameters\r
6301   * @{\r
6302   */\r
6303 \r
6304 #define HAL_RCC_REV_Y_HSITRIM_Pos  (12U)\r
6305 #define HAL_RCC_REV_Y_HSITRIM_Msk  (0x3F000U)\r
6306 #define HAL_RCC_REV_Y_CSITRIM_Pos  (26U)\r
6307 #define HAL_RCC_REV_Y_CSITRIM_Msk  (0x7C000000U)\r
6308 \r
6309 #define IS_RCC_OSCILLATORTYPE(OSCILLATOR) (((OSCILLATOR) == RCC_OSCILLATORTYPE_NONE)                           || \\r
6310                                            (((OSCILLATOR) & RCC_OSCILLATORTYPE_HSE) == RCC_OSCILLATORTYPE_HSE) || \\r
6311                                            (((OSCILLATOR) & RCC_OSCILLATORTYPE_HSI) == RCC_OSCILLATORTYPE_HSI) || \\r
6312                                            (((OSCILLATOR) & RCC_OSCILLATORTYPE_CSI) == RCC_OSCILLATORTYPE_CSI) || \\r
6313                                            (((OSCILLATOR) & RCC_OSCILLATORTYPE_LSI) == RCC_OSCILLATORTYPE_LSI) || \\r
6314                                            (((OSCILLATOR) & RCC_OSCILLATORTYPE_LSE) == RCC_OSCILLATORTYPE_LSE) || \\r
6315                                            (((OSCILLATOR) & RCC_OSCILLATORTYPE_HSI48) == RCC_OSCILLATORTYPE_HSI48))\r
6316 \r
6317 #define IS_RCC_HSE(HSE) (((HSE) == RCC_HSE_OFF) || ((HSE) == RCC_HSE_ON) || \\r
6318                          ((HSE) == RCC_HSE_BYPASS))\r
6319 \r
6320 #define IS_RCC_LSE(LSE) (((LSE) == RCC_LSE_OFF) || ((LSE) == RCC_LSE_ON) || \\r
6321                          ((LSE) == RCC_LSE_BYPASS))\r
6322 \r
6323 #define IS_RCC_HSI(HSI) (((HSI) == RCC_HSI_OFF) || ((HSI) == RCC_HSI_ON)    || \\r
6324                          ((HSI) == RCC_HSI_DIV1) || ((HSI) == RCC_HSI_DIV2) || \\r
6325                          ((HSI) == RCC_HSI_DIV4) || ((HSI) == RCC_HSI_DIV8))\r
6326 \r
6327 #define IS_RCC_HSI48(HSI48) (((HSI48) == RCC_HSI48_OFF) || ((HSI48) == RCC_HSI48_ON))\r
6328 \r
6329 #define IS_RCC_LSI(LSI) (((LSI) == RCC_LSI_OFF) || ((LSI) == RCC_LSI_ON))\r
6330 \r
6331 #define IS_RCC_CSI(CSI) (((CSI) == RCC_CSI_OFF) || ((CSI) == RCC_CSI_ON))\r
6332 \r
6333 #define IS_RCC_PLL(PLL) (((PLL) == RCC_PLL_NONE) ||((PLL) == RCC_PLL_OFF) || \\r
6334                          ((PLL) == RCC_PLL_ON))\r
6335 \r
6336 #define IS_RCC_PLLSOURCE(SOURCE) (((SOURCE) == RCC_PLLSOURCE_CSI)  || \\r
6337                                   ((SOURCE) == RCC_PLLSOURCE_HSI)  || \\r
6338                                   ((SOURCE) == RCC_PLLSOURCE_NONE) || \\r
6339                                   ((SOURCE) == RCC_PLLSOURCE_HSE))\r
6340 #define IS_RCC_PLLM_VALUE(VALUE) ((1U <= (VALUE)) && ((VALUE) <= 63U))\r
6341 #define IS_RCC_PLLN_VALUE(VALUE) ((4U <= (VALUE)) && ((VALUE) <= 512U))\r
6342 #define IS_RCC_PLLP_VALUE(VALUE) ((1U <= (VALUE)) && ((VALUE) <= 128U))\r
6343 #define IS_RCC_PLLQ_VALUE(VALUE) ((1U <= (VALUE)) && ((VALUE) <= 128U))\r
6344 #define IS_RCC_PLLR_VALUE(VALUE) ((1U <= (VALUE)) && ((VALUE) <= 128U))\r
6345 \r
6346 #define IS_RCC_PLLCLOCKOUT_VALUE(VALUE) (((VALUE) == RCC_PLL1_DIVP) || \\r
6347                                          ((VALUE) == RCC_PLL1_DIVQ) || \\r
6348                                          ((VALUE) == RCC_PLL1_DIVR))\r
6349 \r
6350 #define IS_RCC_CLOCKTYPE(CLK) ((1U <= (CLK)) && ((CLK) <= 0x3FU))\r
6351 \r
6352 #define IS_RCC_SYSCLKSOURCE(SOURCE) (((SOURCE) == RCC_SYSCLKSOURCE_CSI) || \\r
6353                                      ((SOURCE) == RCC_SYSCLKSOURCE_HSI) || \\r
6354                                      ((SOURCE) == RCC_SYSCLKSOURCE_HSE) || \\r
6355                                      ((SOURCE) == RCC_SYSCLKSOURCE_PLLCLK))\r
6356 \r
6357 #define IS_RCC_SYSCLK(SYSCLK) (((SYSCLK) == RCC_SYSCLK_DIV1)   || ((SYSCLK) == RCC_SYSCLK_DIV2)   || \\r
6358                                ((SYSCLK) == RCC_SYSCLK_DIV4)   || ((SYSCLK) == RCC_SYSCLK_DIV8)   || \\r
6359                                ((SYSCLK) == RCC_SYSCLK_DIV16)  || ((SYSCLK) == RCC_SYSCLK_DIV64)  || \\r
6360                                ((SYSCLK) == RCC_SYSCLK_DIV128) || ((SYSCLK) == RCC_SYSCLK_DIV256) || \\r
6361                                ((SYSCLK) == RCC_SYSCLK_DIV512))\r
6362 \r
6363 \r
6364 #define IS_RCC_HCLK(HCLK) (((HCLK) == RCC_HCLK_DIV1)   || ((HCLK) == RCC_HCLK_DIV2)   || \\r
6365                            ((HCLK) == RCC_HCLK_DIV4)   || ((HCLK) == RCC_HCLK_DIV8)   || \\r
6366                            ((HCLK) == RCC_HCLK_DIV16)  || ((HCLK) == RCC_HCLK_DIV64)  || \\r
6367                            ((HCLK) == RCC_HCLK_DIV128) || ((HCLK) == RCC_HCLK_DIV256) || \\r
6368                            ((HCLK) == RCC_HCLK_DIV512))\r
6369 \r
6370 #define IS_RCC_D1PCLK1(D1PCLK1) (((D1PCLK1) == RCC_APB3_DIV1) || ((D1PCLK1) == RCC_APB3_DIV2) || \\r
6371                                  ((D1PCLK1) == RCC_APB3_DIV4) || ((D1PCLK1) == RCC_APB3_DIV8) || \\r
6372                                  ((D1PCLK1) == RCC_APB3_DIV16))\r
6373 \r
6374 #define IS_RCC_PCLK1(PCLK1) (((PCLK1) == RCC_APB1_DIV1) || ((PCLK1) == RCC_APB1_DIV2) || \\r
6375                              ((PCLK1) == RCC_APB1_DIV4) || ((PCLK1) == RCC_APB1_DIV8) || \\r
6376                             ((PCLK1) == RCC_APB1_DIV16))\r
6377 \r
6378 #define IS_RCC_PCLK2(PCLK2) (((PCLK2) == RCC_APB2_DIV1) || ((PCLK2) == RCC_APB2_DIV2) || \\r
6379                              ((PCLK2) == RCC_APB2_DIV4) || ((PCLK2) == RCC_APB2_DIV8) || \\r
6380                              ((PCLK2) == RCC_APB2_DIV16))\r
6381 \r
6382 #define IS_RCC_D3PCLK1(D3PCLK1) (((D3PCLK1) == RCC_APB4_DIV1) || ((D3PCLK1) == RCC_APB4_DIV2) || \\r
6383                                  ((D3PCLK1) == RCC_APB4_DIV4) || ((D3PCLK1) == RCC_APB4_DIV8) || \\r
6384                                  ((D3PCLK1) == RCC_APB4_DIV16))\r
6385 \r
6386 #define IS_RCC_RTCCLKSOURCE(SOURCE) (((SOURCE) == RCC_RTCCLKSOURCE_LSE)       || ((SOURCE) == RCC_RTCCLKSOURCE_LSI)       || \\r
6387                                      ((SOURCE) == RCC_RTCCLKSOURCE_HSE_DIV2)  || ((SOURCE) == RCC_RTCCLKSOURCE_HSE_DIV3)  || \\r
6388                                      ((SOURCE) == RCC_RTCCLKSOURCE_HSE_DIV4)  || ((SOURCE) == RCC_RTCCLKSOURCE_HSE_DIV5)  || \\r
6389                                      ((SOURCE) == RCC_RTCCLKSOURCE_HSE_DIV6)  || ((SOURCE) == RCC_RTCCLKSOURCE_HSE_DIV7)  || \\r
6390                                      ((SOURCE) == RCC_RTCCLKSOURCE_HSE_DIV8)  || ((SOURCE) == RCC_RTCCLKSOURCE_HSE_DIV9)  || \\r
6391                                      ((SOURCE) == RCC_RTCCLKSOURCE_HSE_DIV10) || ((SOURCE) == RCC_RTCCLKSOURCE_HSE_DIV11) || \\r
6392                                      ((SOURCE) == RCC_RTCCLKSOURCE_HSE_DIV12) || ((SOURCE) == RCC_RTCCLKSOURCE_HSE_DIV13) || \\r
6393                                      ((SOURCE) == RCC_RTCCLKSOURCE_HSE_DIV14) || ((SOURCE) == RCC_RTCCLKSOURCE_HSE_DIV15) || \\r
6394                                      ((SOURCE) == RCC_RTCCLKSOURCE_HSE_DIV16) || ((SOURCE) == RCC_RTCCLKSOURCE_HSE_DIV17) || \\r
6395                                      ((SOURCE) == RCC_RTCCLKSOURCE_HSE_DIV18) || ((SOURCE) == RCC_RTCCLKSOURCE_HSE_DIV19) || \\r
6396                                      ((SOURCE) == RCC_RTCCLKSOURCE_HSE_DIV20) || ((SOURCE) == RCC_RTCCLKSOURCE_HSE_DIV21) || \\r
6397                                      ((SOURCE) == RCC_RTCCLKSOURCE_HSE_DIV22) || ((SOURCE) == RCC_RTCCLKSOURCE_HSE_DIV23) || \\r
6398                                      ((SOURCE) == RCC_RTCCLKSOURCE_HSE_DIV24) || ((SOURCE) == RCC_RTCCLKSOURCE_HSE_DIV25) || \\r
6399                                      ((SOURCE) == RCC_RTCCLKSOURCE_HSE_DIV26) || ((SOURCE) == RCC_RTCCLKSOURCE_HSE_DIV27) || \\r
6400                                      ((SOURCE) == RCC_RTCCLKSOURCE_HSE_DIV28) || ((SOURCE) == RCC_RTCCLKSOURCE_HSE_DIV29) || \\r
6401                                      ((SOURCE) == RCC_RTCCLKSOURCE_HSE_DIV30) || ((SOURCE) == RCC_RTCCLKSOURCE_HSE_DIV31) || \\r
6402                                      ((SOURCE) == RCC_RTCCLKSOURCE_HSE_DIV32) || ((SOURCE) == RCC_RTCCLKSOURCE_HSE_DIV33) || \\r
6403                                      ((SOURCE) == RCC_RTCCLKSOURCE_HSE_DIV34) || ((SOURCE) == RCC_RTCCLKSOURCE_HSE_DIV35) || \\r
6404                                      ((SOURCE) == RCC_RTCCLKSOURCE_HSE_DIV36) || ((SOURCE) == RCC_RTCCLKSOURCE_HSE_DIV37) || \\r
6405                                      ((SOURCE) == RCC_RTCCLKSOURCE_HSE_DIV38) || ((SOURCE) == RCC_RTCCLKSOURCE_HSE_DIV39) || \\r
6406                                      ((SOURCE) == RCC_RTCCLKSOURCE_HSE_DIV40) || ((SOURCE) == RCC_RTCCLKSOURCE_HSE_DIV41) || \\r
6407                                      ((SOURCE) == RCC_RTCCLKSOURCE_HSE_DIV42) || ((SOURCE) == RCC_RTCCLKSOURCE_HSE_DIV43) || \\r
6408                                      ((SOURCE) == RCC_RTCCLKSOURCE_HSE_DIV44) || ((SOURCE) == RCC_RTCCLKSOURCE_HSE_DIV45) || \\r
6409                                      ((SOURCE) == RCC_RTCCLKSOURCE_HSE_DIV46) || ((SOURCE) == RCC_RTCCLKSOURCE_HSE_DIV47) || \\r
6410                                      ((SOURCE) == RCC_RTCCLKSOURCE_HSE_DIV48) || ((SOURCE) == RCC_RTCCLKSOURCE_HSE_DIV49) || \\r
6411                                      ((SOURCE) == RCC_RTCCLKSOURCE_HSE_DIV50) || ((SOURCE) == RCC_RTCCLKSOURCE_HSE_DIV51) || \\r
6412                                      ((SOURCE) == RCC_RTCCLKSOURCE_HSE_DIV52) || ((SOURCE) == RCC_RTCCLKSOURCE_HSE_DIV53) || \\r
6413                                      ((SOURCE) == RCC_RTCCLKSOURCE_HSE_DIV54) || ((SOURCE) == RCC_RTCCLKSOURCE_HSE_DIV55) || \\r
6414                                      ((SOURCE) == RCC_RTCCLKSOURCE_HSE_DIV56) || ((SOURCE) == RCC_RTCCLKSOURCE_HSE_DIV57) || \\r
6415                                      ((SOURCE) == RCC_RTCCLKSOURCE_HSE_DIV58) || ((SOURCE) == RCC_RTCCLKSOURCE_HSE_DIV59) || \\r
6416                                      ((SOURCE) == RCC_RTCCLKSOURCE_HSE_DIV60) || ((SOURCE) == RCC_RTCCLKSOURCE_HSE_DIV61) || \\r
6417                                      ((SOURCE) == RCC_RTCCLKSOURCE_HSE_DIV62) || ((SOURCE) == RCC_RTCCLKSOURCE_HSE_DIV63))\r
6418 \r
6419 #define IS_RCC_MCO(MCOx) (((MCOx) == RCC_MCO1) || ((MCOx) == RCC_MCO2))\r
6420 \r
6421 #define IS_RCC_MCO1SOURCE(SOURCE) (((SOURCE) == RCC_MCO1SOURCE_HSI) || ((SOURCE) == RCC_MCO1SOURCE_LSE)       || \\r
6422                                    ((SOURCE) == RCC_MCO1SOURCE_HSE) || ((SOURCE) == RCC_MCO1SOURCE_PLL1QCLK)  || \\r
6423                                    ((SOURCE) == RCC_MCO1SOURCE_HSI48))\r
6424 \r
6425 #define IS_RCC_MCO2SOURCE(SOURCE) (((SOURCE) == RCC_MCO2SOURCE_SYSCLK)    || ((SOURCE) == RCC_MCO2SOURCE_PLL2PCLK) || \\r
6426                                    ((SOURCE) == RCC_MCO2SOURCE_HSE)       || ((SOURCE) == RCC_MCO2SOURCE_PLLCLK)   || \\r
6427                                    ((SOURCE) == RCC_MCO2SOURCE_CSICLK)    || ((SOURCE) == RCC_MCO2SOURCE_LSICLK))\r
6428 \r
6429 #define IS_RCC_MCODIV(DIV) (((DIV) == RCC_MCODIV_1)  || ((DIV) == RCC_MCODIV_2)   || \\r
6430                             ((DIV) == RCC_MCODIV_3)  || ((DIV) == RCC_MCODIV_4)   || \\r
6431                             ((DIV) == RCC_MCODIV_5)  || ((DIV) == RCC_MCODIV_6)   || \\r
6432                             ((DIV) == RCC_MCODIV_7)  || ((DIV) == RCC_MCODIV_8)   || \\r
6433                             ((DIV) == RCC_MCODIV_9)  || ((DIV) == RCC_MCODIV_10)  || \\r
6434                             ((DIV) == RCC_MCODIV_11) || ((DIV) == RCC_MCODIV_12)  || \\r
6435                             ((DIV) == RCC_MCODIV_13) || ((DIV) == RCC_MCODIV_14)  || \\r
6436                             ((DIV) == RCC_MCODIV_15))\r
6437 \r
6438 #if defined(DUAL_CORE)\r
6439 #define IS_RCC_FLAG(FLAG) (((FLAG) == RCC_FLAG_HSIRDY)    || ((FLAG) == RCC_FLAG_CSIRDY)  || \\r
6440                            ((FLAG) == RCC_FLAG_HSI48RDY)  || ((FLAG) == RCC_FLAG_HSERDY)  || \\r
6441                            ((FLAG) == RCC_FLAG_D1CKRDY)   || ((FLAG) == RCC_FLAG_D2CKRDY) || \\r
6442                            ((FLAG) == RCC_FLAG_PLLRDY)    || ((FLAG) == RCC_FLAG_PLL2RDY) || \\r
6443                            ((FLAG) == RCC_FLAG_PLL3RDY)   || ((FLAG) == RCC_FLAG_LSERDY)  || \\r
6444                            ((FLAG) == RCC_FLAG_LSIRDY)    || \\r
6445                            ((FLAG) == RCC_FLAG_C1RST)     || ((FLAG) == RCC_FLAG_C2RST)   || \\r
6446                            ((FLAG) == RCC_FLAG_SFTR2ST)   || ((FLAG) == RCC_FLAG_WWDG2RST)|| \\r
6447                            ((FLAG) == RCC_FLAG_IWDG2RST)  || ((FLAG) == RCC_FLAG_D1RST)   || \\r
6448                            ((FLAG) == RCC_FLAG_D2RST)     || ((FLAG) == RCC_FLAG_BORRST)  || \\r
6449                            ((FLAG) == RCC_FLAG_PINRST)    || ((FLAG) == RCC_FLAG_PORRST)  || \\r
6450                            ((FLAG) == RCC_FLAG_SFTR1ST)   || ((FLAG) == RCC_FLAG_IWDG1RST)|| \\r
6451                            ((FLAG) == RCC_FLAG_WWDG1RST)  || ((FLAG) == RCC_FLAG_LPWR1RST)|| \\r
6452                            ((FLAG) == RCC_FLAG_LPWR2RST)  || ((FLAG) == RCC_FLAG_HSIDIV))\r
6453 \r
6454 #else\r
6455 \r
6456 #define IS_RCC_FLAG(FLAG) (((FLAG) == RCC_FLAG_HSIRDY)    || ((FLAG) == RCC_FLAG_CSIRDY)  || \\r
6457                            ((FLAG) == RCC_FLAG_HSI48RDY)  || ((FLAG) == RCC_FLAG_HSERDY)  || \\r
6458                            ((FLAG) == RCC_FLAG_D1CKRDY)   || ((FLAG) == RCC_FLAG_D2CKRDY) || \\r
6459                            ((FLAG) == RCC_FLAG_PLLRDY)    || ((FLAG) == RCC_FLAG_PLL2RDY) || \\r
6460                            ((FLAG) == RCC_FLAG_PLL3RDY)   || ((FLAG) == RCC_FLAG_LSERDY)  || \\r
6461                            ((FLAG) == RCC_FLAG_LSIRDY)    || \\r
6462                            ((FLAG) == RCC_FLAG_CPURST)    || ((FLAG) == RCC_FLAG_D1RST)   || \\r
6463                            ((FLAG) == RCC_FLAG_D2RST)     || ((FLAG) == RCC_FLAG_BORRST)  || \\r
6464                            ((FLAG) == RCC_FLAG_PINRST)    || ((FLAG) == RCC_FLAG_PORRST)  || \\r
6465                            ((FLAG) == RCC_FLAG_SFTRST)    || ((FLAG) == RCC_FLAG_IWDG1RST)|| \\r
6466                            ((FLAG) == RCC_FLAG_WWDG1RST)  || ((FLAG) == RCC_FLAG_LPWR1RST)|| \\r
6467                            ((FLAG) == RCC_FLAG_LPWR2RST)  || ((FLAG) == RCC_FLAG_HSIDIV ))\r
6468 \r
6469 #endif /*DUAL_CORE*/\r
6470 \r
6471 #define IS_RCC_HSICALIBRATION_VALUE(VALUE) ((VALUE) <= 0x7FU)\r
6472 #define IS_RCC_CSICALIBRATION_VALUE(VALUE) ((VALUE) <= 0x1FU)\r
6473 \r
6474 #define IS_RCC_STOP_WAKEUPCLOCK(SOURCE) (((SOURCE) == RCC_STOP_WAKEUPCLOCK_CSI) || \\r
6475                                          ((SOURCE) == RCC_STOP_WAKEUPCLOCK_HSI))\r
6476 \r
6477 #define IS_RCC_STOP_KERWAKEUPCLOCK(SOURCE) (((SOURCE) == RCC_STOP_KERWAKEUPCLOCK_CSI) || \\r
6478                                           ((SOURCE) == RCC_STOP_KERWAKEUPCLOCK_HSI))\r
6479 /**\r
6480   * @}\r
6481   */\r
6482 \r
6483 /**\r
6484   * @}\r
6485   */\r
6486 \r
6487 /**\r
6488   * @}\r
6489   */\r
6490 \r
6491 /**\r
6492   * @}\r
6493   */\r
6494 #ifdef __cplusplus\r
6495 }\r
6496 #endif\r
6497 \r
6498 #endif /* STM32H7xx_HAL_RCC_H */\r
6499 \r
6500 /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/\r