RTEMS 6.1-rc5
Loading...
Searching...
No Matches
stm32h7xx_ll_rcc.h
Go to the documentation of this file.
1
18/* Define to prevent recursive inclusion -------------------------------------*/
19#ifndef STM32H7xx_LL_RCC_H
20#define STM32H7xx_LL_RCC_H
21
22#ifdef __cplusplus
23extern "C" {
24#endif
25
26/* Includes ------------------------------------------------------------------*/
27#include "stm32h7xx.h"
28#include <math.h>
29
34#if defined(RCC)
35
41/* Private types -------------------------------------------------------------*/
42/* Private variables ---------------------------------------------------------*/
47extern const uint8_t LL_RCC_PrescTable[16];
48
52/* Private constants ---------------------------------------------------------*/
53/* Private macros ------------------------------------------------------------*/
58#if !defined(UNUSED)
59#define UNUSED(x) ((void)(x))
60#endif
61
62/* 32 24 16 8 0
63 --------------------------------------------------------
64 | Mask | ClkSource | Bit | Register |
65 | | Config | Position | Offset |
66 --------------------------------------------------------*/
67
68#if defined(RCC_VER_2_0)
69/* Clock source register offset Vs CDCCIPR register */
70#define CDCCIP 0x0UL
71#define CDCCIP1 0x4UL
72#define CDCCIP2 0x8UL
73#define SRDCCIP 0xCUL
74#else
75/* Clock source register offset Vs D1CCIPR register */
76#define D1CCIP 0x0UL
77#define D2CCIP1 0x4UL
78#define D2CCIP2 0x8UL
79#define D3CCIP 0xCUL
80#endif /* RCC_VER_2_0 */
81
82#define LL_RCC_REG_SHIFT 0U
83#define LL_RCC_POS_SHIFT 8U
84#define LL_RCC_CONFIG_SHIFT 16U
85#define LL_RCC_MASK_SHIFT 24U
86
87#define LL_CLKSOURCE_SHIFT(__CLKSOURCE__) (((__CLKSOURCE__) >> LL_RCC_POS_SHIFT ) & 0x1FUL)
88
89#define LL_CLKSOURCE_MASK(__CLKSOURCE__) ((((__CLKSOURCE__) >> LL_RCC_MASK_SHIFT ) & 0xFFUL) << LL_CLKSOURCE_SHIFT(__CLKSOURCE__))
90
91#define LL_CLKSOURCE_CONFIG(__CLKSOURCE__) ((((__CLKSOURCE__) >> LL_RCC_CONFIG_SHIFT) & 0xFFUL) << LL_CLKSOURCE_SHIFT(__CLKSOURCE__))
92
93#define LL_CLKSOURCE_REG(__CLKSOURCE__) (((__CLKSOURCE__) >> LL_RCC_REG_SHIFT ) & 0xFFUL)
94
95#define LL_CLKSOURCE(__REG__, __MSK__, __POS__, __CLK__) ((uint32_t)((((__MSK__) >> (__POS__)) << LL_RCC_MASK_SHIFT) | \
96 (( __POS__ ) << LL_RCC_POS_SHIFT) | \
97 (( __REG__ ) << LL_RCC_REG_SHIFT) | \
98 (((__CLK__) >> (__POS__)) << LL_RCC_CONFIG_SHIFT)))
102/* Exported types ------------------------------------------------------------*/
103#if defined(USE_FULL_LL_DRIVER) || defined(__rtems__)
117typedef struct
118{
119 uint32_t SYSCLK_Frequency;
120 uint32_t CPUCLK_Frequency;
121 uint32_t HCLK_Frequency;
122 uint32_t PCLK1_Frequency;
123 uint32_t PCLK2_Frequency;
124 uint32_t PCLK3_Frequency;
125 uint32_t PCLK4_Frequency;
126} LL_RCC_ClocksTypeDef;
127
135typedef struct
136{
137 uint32_t PLL_P_Frequency;
138 uint32_t PLL_Q_Frequency;
139 uint32_t PLL_R_Frequency;
140} LL_PLL_ClocksTypeDef;
141
146#endif /* USE_FULL_LL_DRIVER */
147
148/* Exported constants --------------------------------------------------------*/
161#if !defined (HSE_VALUE)
162#if defined(RCC_VER_X) || defined(RCC_VER_3_0)
163#define HSE_VALUE 25000000U
164#else
165#define HSE_VALUE 24000000U
166#endif /* RCC_VER_X || RCC_VER_3_0 */
167#endif /* HSE_VALUE */
168
169#if !defined (HSI_VALUE)
170#define HSI_VALUE 64000000U
171#endif /* HSI_VALUE */
172
173#if !defined (CSI_VALUE)
174#define CSI_VALUE 4000000U
175#endif /* CSI_VALUE */
176
177#if !defined (LSE_VALUE)
178#define LSE_VALUE 32768U
179#endif /* LSE_VALUE */
180
181#if !defined (LSI_VALUE)
182#define LSI_VALUE 32000U
183#endif /* LSI_VALUE */
184
185#if !defined (EXTERNAL_CLOCK_VALUE)
186#define EXTERNAL_CLOCK_VALUE 12288000U
187#endif /* EXTERNAL_CLOCK_VALUE */
188
189#if !defined (HSI48_VALUE)
190#define HSI48_VALUE 48000000U
191#endif /* HSI48_VALUE */
192
201#define LL_RCC_HSI_DIV1 RCC_CR_HSIDIV_1
202#define LL_RCC_HSI_DIV2 RCC_CR_HSIDIV_2
203#define LL_RCC_HSI_DIV4 RCC_CR_HSIDIV_4
204#define LL_RCC_HSI_DIV8 RCC_CR_HSIDIV_8
213#define LL_RCC_LSEDRIVE_LOW (uint32_t)(0x00000000U)
214#define LL_RCC_LSEDRIVE_MEDIUMLOW (uint32_t)(RCC_BDCR_LSEDRV_0)
215#define LL_RCC_LSEDRIVE_MEDIUMHIGH (uint32_t)(RCC_BDCR_LSEDRV_1)
216#define LL_RCC_LSEDRIVE_HIGH (uint32_t)(RCC_BDCR_LSEDRV)
225#define LL_RCC_SYS_CLKSOURCE_HSI RCC_CFGR_SW_HSI
226#define LL_RCC_SYS_CLKSOURCE_CSI RCC_CFGR_SW_CSI
227#define LL_RCC_SYS_CLKSOURCE_HSE RCC_CFGR_SW_HSE
228#define LL_RCC_SYS_CLKSOURCE_PLL1 RCC_CFGR_SW_PLL1
237#define LL_RCC_SYS_CLKSOURCE_STATUS_HSI RCC_CFGR_SWS_HSI
238#define LL_RCC_SYS_CLKSOURCE_STATUS_CSI RCC_CFGR_SWS_CSI
239#define LL_RCC_SYS_CLKSOURCE_STATUS_HSE RCC_CFGR_SWS_HSE
240#define LL_RCC_SYS_CLKSOURCE_STATUS_PLL1 RCC_CFGR_SWS_PLL1
249#define LL_RCC_SYSWAKEUP_CLKSOURCE_HSI (uint32_t)(0x00000000U)
250#define LL_RCC_SYSWAKEUP_CLKSOURCE_CSI (uint32_t)(RCC_CFGR_STOPWUCK)
259#define LL_RCC_KERWAKEUP_CLKSOURCE_HSI (uint32_t)(0x00000000U)
260#define LL_RCC_KERWAKEUP_CLKSOURCE_CSI (uint32_t)(RCC_CFGR_STOPKERWUCK)
269#if defined(RCC_D1CFGR_D1CPRE_DIV1)
270#define LL_RCC_SYSCLK_DIV_1 RCC_D1CFGR_D1CPRE_DIV1
271#define LL_RCC_SYSCLK_DIV_2 RCC_D1CFGR_D1CPRE_DIV2
272#define LL_RCC_SYSCLK_DIV_4 RCC_D1CFGR_D1CPRE_DIV4
273#define LL_RCC_SYSCLK_DIV_8 RCC_D1CFGR_D1CPRE_DIV8
274#define LL_RCC_SYSCLK_DIV_16 RCC_D1CFGR_D1CPRE_DIV16
275#define LL_RCC_SYSCLK_DIV_64 RCC_D1CFGR_D1CPRE_DIV64
276#define LL_RCC_SYSCLK_DIV_128 RCC_D1CFGR_D1CPRE_DIV128
277#define LL_RCC_SYSCLK_DIV_256 RCC_D1CFGR_D1CPRE_DIV256
278#define LL_RCC_SYSCLK_DIV_512 RCC_D1CFGR_D1CPRE_DIV512
279#else
280#define LL_RCC_SYSCLK_DIV_1 RCC_CDCFGR1_CDCPRE_DIV1
281#define LL_RCC_SYSCLK_DIV_2 RCC_CDCFGR1_CDCPRE_DIV2
282#define LL_RCC_SYSCLK_DIV_4 RCC_CDCFGR1_CDCPRE_DIV4
283#define LL_RCC_SYSCLK_DIV_8 RCC_CDCFGR1_CDCPRE_DIV8
284#define LL_RCC_SYSCLK_DIV_16 RCC_CDCFGR1_CDCPRE_DIV16
285#define LL_RCC_SYSCLK_DIV_64 RCC_CDCFGR1_CDCPRE_DIV64
286#define LL_RCC_SYSCLK_DIV_128 RCC_CDCFGR1_CDCPRE_DIV128
287#define LL_RCC_SYSCLK_DIV_256 RCC_CDCFGR1_CDCPRE_DIV256
288#define LL_RCC_SYSCLK_DIV_512 RCC_CDCFGR1_CDCPRE_DIV512
289#endif /* RCC_D1CFGR_D1CPRE_DIV1 */
298#if defined(RCC_D1CFGR_HPRE_DIV1)
299#define LL_RCC_AHB_DIV_1 RCC_D1CFGR_HPRE_DIV1
300#define LL_RCC_AHB_DIV_2 RCC_D1CFGR_HPRE_DIV2
301#define LL_RCC_AHB_DIV_4 RCC_D1CFGR_HPRE_DIV4
302#define LL_RCC_AHB_DIV_8 RCC_D1CFGR_HPRE_DIV8
303#define LL_RCC_AHB_DIV_16 RCC_D1CFGR_HPRE_DIV16
304#define LL_RCC_AHB_DIV_64 RCC_D1CFGR_HPRE_DIV64
305#define LL_RCC_AHB_DIV_128 RCC_D1CFGR_HPRE_DIV128
306#define LL_RCC_AHB_DIV_256 RCC_D1CFGR_HPRE_DIV256
307#define LL_RCC_AHB_DIV_512 RCC_D1CFGR_HPRE_DIV512
308#else
309#define LL_RCC_AHB_DIV_1 RCC_CDCFGR1_HPRE_DIV1
310#define LL_RCC_AHB_DIV_2 RCC_CDCFGR1_HPRE_DIV2
311#define LL_RCC_AHB_DIV_4 RCC_CDCFGR1_HPRE_DIV4
312#define LL_RCC_AHB_DIV_8 RCC_CDCFGR1_HPRE_DIV8
313#define LL_RCC_AHB_DIV_16 RCC_CDCFGR1_HPRE_DIV16
314#define LL_RCC_AHB_DIV_64 RCC_CDCFGR1_HPRE_DIV64
315#define LL_RCC_AHB_DIV_128 RCC_CDCFGR1_HPRE_DIV128
316#define LL_RCC_AHB_DIV_256 RCC_CDCFGR1_HPRE_DIV256
317#define LL_RCC_AHB_DIV_512 RCC_CDCFGR1_HPRE_DIV512
318#endif /* RCC_D1CFGR_HPRE_DIV1 */
327#if defined(RCC_D2CFGR_D2PPRE1_DIV1)
328#define LL_RCC_APB1_DIV_1 RCC_D2CFGR_D2PPRE1_DIV1
329#define LL_RCC_APB1_DIV_2 RCC_D2CFGR_D2PPRE1_DIV2
330#define LL_RCC_APB1_DIV_4 RCC_D2CFGR_D2PPRE1_DIV4
331#define LL_RCC_APB1_DIV_8 RCC_D2CFGR_D2PPRE1_DIV8
332#define LL_RCC_APB1_DIV_16 RCC_D2CFGR_D2PPRE1_DIV16
333#else
334#define LL_RCC_APB1_DIV_1 RCC_CDCFGR2_CDPPRE1_DIV1
335#define LL_RCC_APB1_DIV_2 RCC_CDCFGR2_CDPPRE1_DIV2
336#define LL_RCC_APB1_DIV_4 RCC_CDCFGR2_CDPPRE1_DIV4
337#define LL_RCC_APB1_DIV_8 RCC_CDCFGR2_CDPPRE1_DIV8
338#define LL_RCC_APB1_DIV_16 RCC_CDCFGR2_CDPPRE1_DIV16
339#endif /* RCC_D2CFGR_D2PPRE1_DIV1 */
348#if defined(RCC_D2CFGR_D2PPRE2_DIV1)
349#define LL_RCC_APB2_DIV_1 RCC_D2CFGR_D2PPRE2_DIV1
350#define LL_RCC_APB2_DIV_2 RCC_D2CFGR_D2PPRE2_DIV2
351#define LL_RCC_APB2_DIV_4 RCC_D2CFGR_D2PPRE2_DIV4
352#define LL_RCC_APB2_DIV_8 RCC_D2CFGR_D2PPRE2_DIV8
353#define LL_RCC_APB2_DIV_16 RCC_D2CFGR_D2PPRE2_DIV16
354#else
355#define LL_RCC_APB2_DIV_1 RCC_CDCFGR2_CDPPRE2_DIV1
356#define LL_RCC_APB2_DIV_2 RCC_CDCFGR2_CDPPRE2_DIV2
357#define LL_RCC_APB2_DIV_4 RCC_CDCFGR2_CDPPRE2_DIV4
358#define LL_RCC_APB2_DIV_8 RCC_CDCFGR2_CDPPRE2_DIV8
359#define LL_RCC_APB2_DIV_16 RCC_CDCFGR2_CDPPRE2_DIV16
360#endif /* RCC_D2CFGR_D2PPRE2_DIV1 */
369#if defined(RCC_D1CFGR_D1PPRE_DIV1)
370#define LL_RCC_APB3_DIV_1 RCC_D1CFGR_D1PPRE_DIV1
371#define LL_RCC_APB3_DIV_2 RCC_D1CFGR_D1PPRE_DIV2
372#define LL_RCC_APB3_DIV_4 RCC_D1CFGR_D1PPRE_DIV4
373#define LL_RCC_APB3_DIV_8 RCC_D1CFGR_D1PPRE_DIV8
374#define LL_RCC_APB3_DIV_16 RCC_D1CFGR_D1PPRE_DIV16
375#else
376#define LL_RCC_APB3_DIV_1 RCC_CDCFGR1_CDPPRE_DIV1
377#define LL_RCC_APB3_DIV_2 RCC_CDCFGR1_CDPPRE_DIV2
378#define LL_RCC_APB3_DIV_4 RCC_CDCFGR1_CDPPRE_DIV4
379#define LL_RCC_APB3_DIV_8 RCC_CDCFGR1_CDPPRE_DIV8
380#define LL_RCC_APB3_DIV_16 RCC_CDCFGR1_CDPPRE_DIV16
381#endif /* RCC_D1CFGR_D1PPRE_DIV1 */
390#if defined(RCC_D3CFGR_D3PPRE_DIV1)
391#define LL_RCC_APB4_DIV_1 RCC_D3CFGR_D3PPRE_DIV1
392#define LL_RCC_APB4_DIV_2 RCC_D3CFGR_D3PPRE_DIV2
393#define LL_RCC_APB4_DIV_4 RCC_D3CFGR_D3PPRE_DIV4
394#define LL_RCC_APB4_DIV_8 RCC_D3CFGR_D3PPRE_DIV8
395#define LL_RCC_APB4_DIV_16 RCC_D3CFGR_D3PPRE_DIV16
396#else
397#define LL_RCC_APB4_DIV_1 RCC_SRDCFGR_SRDPPRE_DIV1
398#define LL_RCC_APB4_DIV_2 RCC_SRDCFGR_SRDPPRE_DIV2
399#define LL_RCC_APB4_DIV_4 RCC_SRDCFGR_SRDPPRE_DIV4
400#define LL_RCC_APB4_DIV_8 RCC_SRDCFGR_SRDPPRE_DIV8
401#define LL_RCC_APB4_DIV_16 RCC_SRDCFGR_SRDPPRE_DIV16
402#endif /* RCC_D3CFGR_D3PPRE_DIV1 */
411#define LL_RCC_MCO1SOURCE_HSI (uint32_t)((RCC_CFGR_MCO1>>16U) | 0x00000000U)
412#define LL_RCC_MCO1SOURCE_LSE (uint32_t)((RCC_CFGR_MCO1>>16U) | RCC_CFGR_MCO1_0)
413#define LL_RCC_MCO1SOURCE_HSE (uint32_t)((RCC_CFGR_MCO1>>16U) | RCC_CFGR_MCO1_1)
414#define LL_RCC_MCO1SOURCE_PLL1QCLK (uint32_t)((RCC_CFGR_MCO1>>16U) | RCC_CFGR_MCO1_1|RCC_CFGR_MCO1_0)
415#define LL_RCC_MCO1SOURCE_HSI48 (uint32_t)((RCC_CFGR_MCO1>>16U) | RCC_CFGR_MCO1_2)
416#define LL_RCC_MCO2SOURCE_SYSCLK (uint32_t)((RCC_CFGR_MCO2>>16U) | 0x00000000U)
417#define LL_RCC_MCO2SOURCE_PLL2PCLK (uint32_t)((RCC_CFGR_MCO2>>16U) | RCC_CFGR_MCO2_0)
418#define LL_RCC_MCO2SOURCE_HSE (uint32_t)((RCC_CFGR_MCO2>>16U) | RCC_CFGR_MCO2_1)
419#define LL_RCC_MCO2SOURCE_PLL1PCLK (uint32_t)((RCC_CFGR_MCO2>>16U) | RCC_CFGR_MCO2_1|RCC_CFGR_MCO2_0)
420#define LL_RCC_MCO2SOURCE_CSI (uint32_t)((RCC_CFGR_MCO2>>16U) | RCC_CFGR_MCO2_2)
421#define LL_RCC_MCO2SOURCE_LSI (uint32_t)((RCC_CFGR_MCO2>>16U) | RCC_CFGR_MCO2_2|RCC_CFGR_MCO2_0)
430#define LL_RCC_MCO1_DIV_1 (uint32_t)((RCC_CFGR_MCO1PRE>>16U) | RCC_CFGR_MCO1PRE_0)
431#define LL_RCC_MCO1_DIV_2 (uint32_t)((RCC_CFGR_MCO1PRE>>16U) | RCC_CFGR_MCO1PRE_1)
432#define LL_RCC_MCO1_DIV_3 (uint32_t)((RCC_CFGR_MCO1PRE>>16U) | RCC_CFGR_MCO1PRE_0 | RCC_CFGR_MCO1PRE_1)
433#define LL_RCC_MCO1_DIV_4 (uint32_t)((RCC_CFGR_MCO1PRE>>16U) | RCC_CFGR_MCO1PRE_2)
434#define LL_RCC_MCO1_DIV_5 (uint32_t)((RCC_CFGR_MCO1PRE>>16U) | RCC_CFGR_MCO1PRE_0 | RCC_CFGR_MCO1PRE_2)
435#define LL_RCC_MCO1_DIV_6 (uint32_t)((RCC_CFGR_MCO1PRE>>16U) | RCC_CFGR_MCO1PRE_1 | RCC_CFGR_MCO1PRE_2)
436#define LL_RCC_MCO1_DIV_7 (uint32_t)((RCC_CFGR_MCO1PRE>>16U) | RCC_CFGR_MCO1PRE_0 | RCC_CFGR_MCO1PRE_1 | RCC_CFGR_MCO1PRE_2)
437#define LL_RCC_MCO1_DIV_8 (uint32_t)((RCC_CFGR_MCO1PRE>>16U) | RCC_CFGR_MCO1PRE_3)
438#define LL_RCC_MCO1_DIV_9 (uint32_t)((RCC_CFGR_MCO1PRE>>16U) | RCC_CFGR_MCO1PRE_0 | RCC_CFGR_MCO1PRE_3)
439#define LL_RCC_MCO1_DIV_10 (uint32_t)((RCC_CFGR_MCO1PRE>>16U) | RCC_CFGR_MCO1PRE_1 | RCC_CFGR_MCO1PRE_3)
440#define LL_RCC_MCO1_DIV_11 (uint32_t)((RCC_CFGR_MCO1PRE>>16U) | RCC_CFGR_MCO1PRE_0 | RCC_CFGR_MCO1PRE_1 | RCC_CFGR_MCO1PRE_3)
441#define LL_RCC_MCO1_DIV_12 (uint32_t)((RCC_CFGR_MCO1PRE>>16U) | RCC_CFGR_MCO1PRE_2 | RCC_CFGR_MCO1PRE_3)
442#define LL_RCC_MCO1_DIV_13 (uint32_t)((RCC_CFGR_MCO1PRE>>16U) | RCC_CFGR_MCO1PRE_0 | RCC_CFGR_MCO1PRE_2 | RCC_CFGR_MCO1PRE_3)
443#define LL_RCC_MCO1_DIV_14 (uint32_t)((RCC_CFGR_MCO1PRE>>16U) | RCC_CFGR_MCO1PRE_1 | RCC_CFGR_MCO1PRE_2 | RCC_CFGR_MCO1PRE_3)
444#define LL_RCC_MCO1_DIV_15 (uint32_t)((RCC_CFGR_MCO1PRE>>16U) | RCC_CFGR_MCO1PRE)
445#define LL_RCC_MCO2_DIV_1 (uint32_t)((RCC_CFGR_MCO2PRE>>16U) | RCC_CFGR_MCO2PRE_0)
446#define LL_RCC_MCO2_DIV_2 (uint32_t)((RCC_CFGR_MCO2PRE>>16U) | RCC_CFGR_MCO2PRE_1)
447#define LL_RCC_MCO2_DIV_3 (uint32_t)((RCC_CFGR_MCO2PRE>>16U) | RCC_CFGR_MCO2PRE_0 | RCC_CFGR_MCO2PRE_1)
448#define LL_RCC_MCO2_DIV_4 (uint32_t)((RCC_CFGR_MCO2PRE>>16U) | RCC_CFGR_MCO2PRE_2)
449#define LL_RCC_MCO2_DIV_5 (uint32_t)((RCC_CFGR_MCO2PRE>>16U) | RCC_CFGR_MCO2PRE_0 | RCC_CFGR_MCO2PRE_2)
450#define LL_RCC_MCO2_DIV_6 (uint32_t)((RCC_CFGR_MCO2PRE>>16U) | RCC_CFGR_MCO2PRE_1 | RCC_CFGR_MCO2PRE_2)
451#define LL_RCC_MCO2_DIV_7 (uint32_t)((RCC_CFGR_MCO2PRE>>16U) | RCC_CFGR_MCO2PRE_0 | RCC_CFGR_MCO2PRE_1 | RCC_CFGR_MCO2PRE_2)
452#define LL_RCC_MCO2_DIV_8 (uint32_t)((RCC_CFGR_MCO2PRE>>16U) | RCC_CFGR_MCO2PRE_3)
453#define LL_RCC_MCO2_DIV_9 (uint32_t)((RCC_CFGR_MCO2PRE>>16U) | RCC_CFGR_MCO2PRE_0 | RCC_CFGR_MCO2PRE_3)
454#define LL_RCC_MCO2_DIV_10 (uint32_t)((RCC_CFGR_MCO2PRE>>16U) | RCC_CFGR_MCO2PRE_1 | RCC_CFGR_MCO2PRE_3)
455#define LL_RCC_MCO2_DIV_11 (uint32_t)((RCC_CFGR_MCO2PRE>>16U) | RCC_CFGR_MCO2PRE_0 | RCC_CFGR_MCO2PRE_1 | RCC_CFGR_MCO2PRE_3)
456#define LL_RCC_MCO2_DIV_12 (uint32_t)((RCC_CFGR_MCO2PRE>>16U) | RCC_CFGR_MCO2PRE_2 | RCC_CFGR_MCO2PRE_3)
457#define LL_RCC_MCO2_DIV_13 (uint32_t)((RCC_CFGR_MCO2PRE>>16U) | RCC_CFGR_MCO2PRE_0 | RCC_CFGR_MCO2PRE_2 | RCC_CFGR_MCO2PRE_3)
458#define LL_RCC_MCO2_DIV_14 (uint32_t)((RCC_CFGR_MCO2PRE>>16U) | RCC_CFGR_MCO2PRE_1 | RCC_CFGR_MCO2PRE_2 | RCC_CFGR_MCO2PRE_3)
459#define LL_RCC_MCO2_DIV_15 (uint32_t)((RCC_CFGR_MCO2PRE>>16U) | RCC_CFGR_MCO2PRE)
460
469#define LL_RCC_RTC_NOCLOCK (uint32_t)(0x00000000U)
470#define LL_RCC_RTC_HSE_DIV_2 (uint32_t)(RCC_CFGR_RTCPRE_1)
471#define LL_RCC_RTC_HSE_DIV_3 (uint32_t)(RCC_CFGR_RTCPRE_1|RCC_CFGR_RTCPRE_0)
472#define LL_RCC_RTC_HSE_DIV_4 (uint32_t)(RCC_CFGR_RTCPRE_2)
473#define LL_RCC_RTC_HSE_DIV_5 (uint32_t)(RCC_CFGR_RTCPRE_2|RCC_CFGR_RTCPRE_0)
474#define LL_RCC_RTC_HSE_DIV_6 (uint32_t)(RCC_CFGR_RTCPRE_2|RCC_CFGR_RTCPRE_1)
475#define LL_RCC_RTC_HSE_DIV_7 (uint32_t)(RCC_CFGR_RTCPRE_2|RCC_CFGR_RTCPRE_1|RCC_CFGR_RTCPRE_0)
476#define LL_RCC_RTC_HSE_DIV_8 (uint32_t)(RCC_CFGR_RTCPRE_3)
477#define LL_RCC_RTC_HSE_DIV_9 (uint32_t)(RCC_CFGR_RTCPRE_3|RCC_CFGR_RTCPRE_0)
478#define LL_RCC_RTC_HSE_DIV_10 (uint32_t)(RCC_CFGR_RTCPRE_3|RCC_CFGR_RTCPRE_1)
479#define LL_RCC_RTC_HSE_DIV_11 (uint32_t)(RCC_CFGR_RTCPRE_3|RCC_CFGR_RTCPRE_1|RCC_CFGR_RTCPRE_0)
480#define LL_RCC_RTC_HSE_DIV_12 (uint32_t)(RCC_CFGR_RTCPRE_3|RCC_CFGR_RTCPRE_2)
481#define LL_RCC_RTC_HSE_DIV_13 (uint32_t)(RCC_CFGR_RTCPRE_3|RCC_CFGR_RTCPRE_2|RCC_CFGR_RTCPRE_0)
482#define LL_RCC_RTC_HSE_DIV_14 (uint32_t)(RCC_CFGR_RTCPRE_3|RCC_CFGR_RTCPRE_2|RCC_CFGR_RTCPRE_1)
483#define LL_RCC_RTC_HSE_DIV_15 (uint32_t)(RCC_CFGR_RTCPRE_3|RCC_CFGR_RTCPRE_2|RCC_CFGR_RTCPRE_1|RCC_CFGR_RTCPRE_0)
484#define LL_RCC_RTC_HSE_DIV_16 (uint32_t)(RCC_CFGR_RTCPRE_4)
485#define LL_RCC_RTC_HSE_DIV_17 (uint32_t)(RCC_CFGR_RTCPRE_4|RCC_CFGR_RTCPRE_0)
486#define LL_RCC_RTC_HSE_DIV_18 (uint32_t)(RCC_CFGR_RTCPRE_4|RCC_CFGR_RTCPRE_1)
487#define LL_RCC_RTC_HSE_DIV_19 (uint32_t)(RCC_CFGR_RTCPRE_4|RCC_CFGR_RTCPRE_1|RCC_CFGR_RTCPRE_0)
488#define LL_RCC_RTC_HSE_DIV_20 (uint32_t)(RCC_CFGR_RTCPRE_4|RCC_CFGR_RTCPRE_2)
489#define LL_RCC_RTC_HSE_DIV_21 (uint32_t)(RCC_CFGR_RTCPRE_4|RCC_CFGR_RTCPRE_2|RCC_CFGR_RTCPRE_0)
490#define LL_RCC_RTC_HSE_DIV_22 (uint32_t)(RCC_CFGR_RTCPRE_4|RCC_CFGR_RTCPRE_2|RCC_CFGR_RTCPRE_1)
491#define LL_RCC_RTC_HSE_DIV_23 (uint32_t)(RCC_CFGR_RTCPRE_4|RCC_CFGR_RTCPRE_2|RCC_CFGR_RTCPRE_1|RCC_CFGR_RTCPRE_0)
492#define LL_RCC_RTC_HSE_DIV_24 (uint32_t)(RCC_CFGR_RTCPRE_4|RCC_CFGR_RTCPRE_3)
493#define LL_RCC_RTC_HSE_DIV_25 (uint32_t)(RCC_CFGR_RTCPRE_4|RCC_CFGR_RTCPRE_3|RCC_CFGR_RTCPRE_0)
494#define LL_RCC_RTC_HSE_DIV_26 (uint32_t)(RCC_CFGR_RTCPRE_4|RCC_CFGR_RTCPRE_3|RCC_CFGR_RTCPRE_1)
495#define LL_RCC_RTC_HSE_DIV_27 (uint32_t)(RCC_CFGR_RTCPRE_4|RCC_CFGR_RTCPRE_3|RCC_CFGR_RTCPRE_1|RCC_CFGR_RTCPRE_0)
496#define LL_RCC_RTC_HSE_DIV_28 (uint32_t)(RCC_CFGR_RTCPRE_4|RCC_CFGR_RTCPRE_3|RCC_CFGR_RTCPRE_2)
497#define LL_RCC_RTC_HSE_DIV_29 (uint32_t)(RCC_CFGR_RTCPRE_4|RCC_CFGR_RTCPRE_3|RCC_CFGR_RTCPRE_2|RCC_CFGR_RTCPRE_0)
498#define LL_RCC_RTC_HSE_DIV_30 (uint32_t)(RCC_CFGR_RTCPRE_4|RCC_CFGR_RTCPRE_3|RCC_CFGR_RTCPRE_2|RCC_CFGR_RTCPRE_1)
499#define LL_RCC_RTC_HSE_DIV_31 (uint32_t)(RCC_CFGR_RTCPRE_4|RCC_CFGR_RTCPRE_3|RCC_CFGR_RTCPRE_2|RCC_CFGR_RTCPRE_1|RCC_CFGR_RTCPRE_0)
500#define LL_RCC_RTC_HSE_DIV_32 (uint32_t)(RCC_CFGR_RTCPRE_5)
501#define LL_RCC_RTC_HSE_DIV_33 (uint32_t)(RCC_CFGR_RTCPRE_5|RCC_CFGR_RTCPRE_0)
502#define LL_RCC_RTC_HSE_DIV_34 (uint32_t)(RCC_CFGR_RTCPRE_5|RCC_CFGR_RTCPRE_1)
503#define LL_RCC_RTC_HSE_DIV_35 (uint32_t)(RCC_CFGR_RTCPRE_5|RCC_CFGR_RTCPRE_1|RCC_CFGR_RTCPRE_0)
504#define LL_RCC_RTC_HSE_DIV_36 (uint32_t)(RCC_CFGR_RTCPRE_5|RCC_CFGR_RTCPRE_2)
505#define LL_RCC_RTC_HSE_DIV_37 (uint32_t)(RCC_CFGR_RTCPRE_5|RCC_CFGR_RTCPRE_2|RCC_CFGR_RTCPRE_0)
506#define LL_RCC_RTC_HSE_DIV_38 (uint32_t)(RCC_CFGR_RTCPRE_5|RCC_CFGR_RTCPRE_2|RCC_CFGR_RTCPRE_1)
507#define LL_RCC_RTC_HSE_DIV_39 (uint32_t)(RCC_CFGR_RTCPRE_5|RCC_CFGR_RTCPRE_2|RCC_CFGR_RTCPRE_1|RCC_CFGR_RTCPRE_0)
508#define LL_RCC_RTC_HSE_DIV_40 (uint32_t)(RCC_CFGR_RTCPRE_5|RCC_CFGR_RTCPRE_3)
509#define LL_RCC_RTC_HSE_DIV_41 (uint32_t)(RCC_CFGR_RTCPRE_5|RCC_CFGR_RTCPRE_3|RCC_CFGR_RTCPRE_0)
510#define LL_RCC_RTC_HSE_DIV_42 (uint32_t)(RCC_CFGR_RTCPRE_5|RCC_CFGR_RTCPRE_3|RCC_CFGR_RTCPRE_1)
511#define LL_RCC_RTC_HSE_DIV_43 (uint32_t)(RCC_CFGR_RTCPRE_5|RCC_CFGR_RTCPRE_3|RCC_CFGR_RTCPRE_1|RCC_CFGR_RTCPRE_0)
512#define LL_RCC_RTC_HSE_DIV_44 (uint32_t)(RCC_CFGR_RTCPRE_5|RCC_CFGR_RTCPRE_3|RCC_CFGR_RTCPRE_2)
513#define LL_RCC_RTC_HSE_DIV_45 (uint32_t)(RCC_CFGR_RTCPRE_5|RCC_CFGR_RTCPRE_3|RCC_CFGR_RTCPRE_2|RCC_CFGR_RTCPRE_0)
514#define LL_RCC_RTC_HSE_DIV_46 (uint32_t)(RCC_CFGR_RTCPRE_5|RCC_CFGR_RTCPRE_3|RCC_CFGR_RTCPRE_2|RCC_CFGR_RTCPRE_1)
515#define LL_RCC_RTC_HSE_DIV_47 (uint32_t)(RCC_CFGR_RTCPRE_5|RCC_CFGR_RTCPRE_3|RCC_CFGR_RTCPRE_2|RCC_CFGR_RTCPRE_1|RCC_CFGR_RTCPRE_0)
516#define LL_RCC_RTC_HSE_DIV_48 (uint32_t)(RCC_CFGR_RTCPRE_5|RCC_CFGR_RTCPRE_4)
517#define LL_RCC_RTC_HSE_DIV_49 (uint32_t)(RCC_CFGR_RTCPRE_5|RCC_CFGR_RTCPRE_4|RCC_CFGR_RTCPRE_0)
518#define LL_RCC_RTC_HSE_DIV_50 (uint32_t)(RCC_CFGR_RTCPRE_5|RCC_CFGR_RTCPRE_4|RCC_CFGR_RTCPRE_1)
519#define LL_RCC_RTC_HSE_DIV_51 (uint32_t)(RCC_CFGR_RTCPRE_5|RCC_CFGR_RTCPRE_4|RCC_CFGR_RTCPRE_1|RCC_CFGR_RTCPRE_0)
520#define LL_RCC_RTC_HSE_DIV_52 (uint32_t)(RCC_CFGR_RTCPRE_5|RCC_CFGR_RTCPRE_4|RCC_CFGR_RTCPRE_2)
521#define LL_RCC_RTC_HSE_DIV_53 (uint32_t)(RCC_CFGR_RTCPRE_5|RCC_CFGR_RTCPRE_4|RCC_CFGR_RTCPRE_2|RCC_CFGR_RTCPRE_0)
522#define LL_RCC_RTC_HSE_DIV_54 (uint32_t)(RCC_CFGR_RTCPRE_5|RCC_CFGR_RTCPRE_4|RCC_CFGR_RTCPRE_2|RCC_CFGR_RTCPRE_1)
523#define LL_RCC_RTC_HSE_DIV_55 (uint32_t)(RCC_CFGR_RTCPRE_5|RCC_CFGR_RTCPRE_4|RCC_CFGR_RTCPRE_2|RCC_CFGR_RTCPRE_1|RCC_CFGR_RTCPRE_0)
524#define LL_RCC_RTC_HSE_DIV_56 (uint32_t)(RCC_CFGR_RTCPRE_5|RCC_CFGR_RTCPRE_4|RCC_CFGR_RTCPRE_3)
525#define LL_RCC_RTC_HSE_DIV_57 (uint32_t)(RCC_CFGR_RTCPRE_5|RCC_CFGR_RTCPRE_4|RCC_CFGR_RTCPRE_3|RCC_CFGR_RTCPRE_0)
526#define LL_RCC_RTC_HSE_DIV_58 (uint32_t)(RCC_CFGR_RTCPRE_5|RCC_CFGR_RTCPRE_4|RCC_CFGR_RTCPRE_3|RCC_CFGR_RTCPRE_1)
527#define LL_RCC_RTC_HSE_DIV_59 (uint32_t)(RCC_CFGR_RTCPRE_5|RCC_CFGR_RTCPRE_4|RCC_CFGR_RTCPRE_3|RCC_CFGR_RTCPRE_1|RCC_CFGR_RTCPRE_0)
528#define LL_RCC_RTC_HSE_DIV_60 (uint32_t)(RCC_CFGR_RTCPRE_5|RCC_CFGR_RTCPRE_4|RCC_CFGR_RTCPRE_3|RCC_CFGR_RTCPRE_2)
529#define LL_RCC_RTC_HSE_DIV_61 (uint32_t)(RCC_CFGR_RTCPRE_5|RCC_CFGR_RTCPRE_4|RCC_CFGR_RTCPRE_3|RCC_CFGR_RTCPRE_2|RCC_CFGR_RTCPRE_0)
530#define LL_RCC_RTC_HSE_DIV_62 (uint32_t)(RCC_CFGR_RTCPRE_5|RCC_CFGR_RTCPRE_4|RCC_CFGR_RTCPRE_3|RCC_CFGR_RTCPRE_2|RCC_CFGR_RTCPRE_1)
531#define LL_RCC_RTC_HSE_DIV_63 (uint32_t)(RCC_CFGR_RTCPRE_5|RCC_CFGR_RTCPRE_4|RCC_CFGR_RTCPRE_3|RCC_CFGR_RTCPRE_2|RCC_CFGR_RTCPRE_1|RCC_CFGR_RTCPRE_0)
540#if defined(RCC_D2CCIP2R_USART16SEL)
541#define LL_RCC_USART16_CLKSOURCE_PCLK2 LL_CLKSOURCE(D2CCIP2, RCC_D2CCIP2R_USART16SEL, RCC_D2CCIP2R_USART16SEL_Pos, 0x00000000U)
542#define LL_RCC_USART16_CLKSOURCE_PLL2Q LL_CLKSOURCE(D2CCIP2, RCC_D2CCIP2R_USART16SEL, RCC_D2CCIP2R_USART16SEL_Pos, RCC_D2CCIP2R_USART16SEL_0)
543#define LL_RCC_USART16_CLKSOURCE_PLL3Q LL_CLKSOURCE(D2CCIP2, RCC_D2CCIP2R_USART16SEL, RCC_D2CCIP2R_USART16SEL_Pos, RCC_D2CCIP2R_USART16SEL_1)
544#define LL_RCC_USART16_CLKSOURCE_HSI LL_CLKSOURCE(D2CCIP2, RCC_D2CCIP2R_USART16SEL, RCC_D2CCIP2R_USART16SEL_Pos, RCC_D2CCIP2R_USART16SEL_0 | RCC_D2CCIP2R_USART16SEL_1)
545#define LL_RCC_USART16_CLKSOURCE_CSI LL_CLKSOURCE(D2CCIP2, RCC_D2CCIP2R_USART16SEL, RCC_D2CCIP2R_USART16SEL_Pos, RCC_D2CCIP2R_USART16SEL_2)
546#define LL_RCC_USART16_CLKSOURCE_LSE LL_CLKSOURCE(D2CCIP2, RCC_D2CCIP2R_USART16SEL, RCC_D2CCIP2R_USART16SEL_Pos, RCC_D2CCIP2R_USART16SEL_0 | RCC_D2CCIP2R_USART16SEL_2)
547/* Aliases */
548#define LL_RCC_USART16910_CLKSOURCE_PCLK2 LL_RCC_USART16_CLKSOURCE_PCLK2
549#define LL_RCC_USART16910_CLKSOURCE_PLL2Q LL_RCC_USART16_CLKSOURCE_PLL2Q
550#define LL_RCC_USART16910_CLKSOURCE_PLL3Q LL_RCC_USART16_CLKSOURCE_PLL3Q
551#define LL_RCC_USART16910_CLKSOURCE_HSI LL_RCC_USART16_CLKSOURCE_HSI
552#define LL_RCC_USART16910_CLKSOURCE_CSI LL_RCC_USART16_CLKSOURCE_CSI
553#define LL_RCC_USART16910_CLKSOURCE_LSE LL_RCC_USART16_CLKSOURCE_LSE
554
555#elif defined(RCC_D2CCIP2R_USART16910SEL)
556#define LL_RCC_USART16910_CLKSOURCE_PCLK2 LL_CLKSOURCE(D2CCIP2, RCC_D2CCIP2R_USART16910SEL, RCC_D2CCIP2R_USART16910SEL_Pos, 0x00000000U)
557#define LL_RCC_USART16910_CLKSOURCE_PLL2Q LL_CLKSOURCE(D2CCIP2, RCC_D2CCIP2R_USART16910SEL, RCC_D2CCIP2R_USART16910SEL_Pos, RCC_D2CCIP2R_USART16910SEL_0)
558#define LL_RCC_USART16910_CLKSOURCE_PLL3Q LL_CLKSOURCE(D2CCIP2, RCC_D2CCIP2R_USART16910SEL, RCC_D2CCIP2R_USART16910SEL_Pos, RCC_D2CCIP2R_USART16910SEL_1)
559#define LL_RCC_USART16910_CLKSOURCE_HSI LL_CLKSOURCE(D2CCIP2, RCC_D2CCIP2R_USART16910SEL, RCC_D2CCIP2R_USART16910SEL_Pos, RCC_D2CCIP2R_USART16910SEL_0 | RCC_D2CCIP2R_USART16910SEL_1)
560#define LL_RCC_USART16910_CLKSOURCE_CSI LL_CLKSOURCE(D2CCIP2, RCC_D2CCIP2R_USART16910SEL, RCC_D2CCIP2R_USART16910SEL_Pos, RCC_D2CCIP2R_USART16910SEL_2)
561#define LL_RCC_USART16910_CLKSOURCE_LSE LL_CLKSOURCE(D2CCIP2, RCC_D2CCIP2R_USART16910SEL, RCC_D2CCIP2R_USART16910SEL_Pos, RCC_D2CCIP2R_USART16910SEL_0 | RCC_D2CCIP2R_USART16910SEL_2)
562/* Aliases */
563#define LL_RCC_USART16_CLKSOURCE_PCLK2 LL_RCC_USART16910_CLKSOURCE_PCLK2
564#define LL_RCC_USART16_CLKSOURCE_PLL2Q LL_RCC_USART16910_CLKSOURCE_PLL2Q
565#define LL_RCC_USART16_CLKSOURCE_PLL3Q LL_RCC_USART16910_CLKSOURCE_PLL3Q
566#define LL_RCC_USART16_CLKSOURCE_HSI LL_RCC_USART16910_CLKSOURCE_HSI
567#define LL_RCC_USART16_CLKSOURCE_CSI LL_RCC_USART16910_CLKSOURCE_CSI
568#define LL_RCC_USART16_CLKSOURCE_LSE LL_RCC_USART16910_CLKSOURCE_LSE
569
570#else
571#define LL_RCC_USART16910_CLKSOURCE_PCLK2 LL_CLKSOURCE(CDCCIP2, RCC_CDCCIP2R_USART16910SEL, RCC_CDCCIP2R_USART16910SEL_Pos, 0x00000000U)
572#define LL_RCC_USART16910_CLKSOURCE_PLL2Q LL_CLKSOURCE(CDCCIP2, RCC_CDCCIP2R_USART16910SEL, RCC_CDCCIP2R_USART16910SEL_Pos, RCC_CDCCIP2R_USART16910SEL_0)
573#define LL_RCC_USART16910_CLKSOURCE_PLL3Q LL_CLKSOURCE(CDCCIP2, RCC_CDCCIP2R_USART16910SEL, RCC_CDCCIP2R_USART16910SEL_Pos, RCC_CDCCIP2R_USART16910SEL_1)
574#define LL_RCC_USART16910_CLKSOURCE_HSI LL_CLKSOURCE(CDCCIP2, RCC_CDCCIP2R_USART16910SEL, RCC_CDCCIP2R_USART16910SEL_Pos, RCC_CDCCIP2R_USART16910SEL_0 | RCC_CDCCIP2R_USART16910SEL_1)
575#define LL_RCC_USART16910_CLKSOURCE_CSI LL_CLKSOURCE(CDCCIP2, RCC_CDCCIP2R_USART16910SEL, RCC_CDCCIP2R_USART16910SEL_Pos, RCC_CDCCIP2R_USART16910SEL_2)
576#define LL_RCC_USART16910_CLKSOURCE_LSE LL_CLKSOURCE(CDCCIP2, RCC_CDCCIP2R_USART16910SEL, RCC_CDCCIP2R_USART16910SEL_Pos, RCC_CDCCIP2R_USART16910SEL_0 | RCC_CDCCIP2R_USART16910SEL_2)
577/* Aliases */
578#define LL_RCC_USART16_CLKSOURCE_PCLK2 LL_RCC_USART16910_CLKSOURCE_PCLK2
579#define LL_RCC_USART16_CLKSOURCE_PLL2Q LL_RCC_USART16910_CLKSOURCE_PLL2Q
580#define LL_RCC_USART16_CLKSOURCE_PLL3Q LL_RCC_USART16910_CLKSOURCE_PLL3Q
581#define LL_RCC_USART16_CLKSOURCE_HSI LL_RCC_USART16910_CLKSOURCE_HSI
582#define LL_RCC_USART16_CLKSOURCE_CSI LL_RCC_USART16910_CLKSOURCE_CSI
583#define LL_RCC_USART16_CLKSOURCE_LSE LL_RCC_USART16910_CLKSOURCE_LSE
584#endif /* RCC_D2CCIP2R_USART16SEL */
585#if defined(RCC_D2CCIP2R_USART28SEL)
586#define LL_RCC_USART234578_CLKSOURCE_PCLK1 LL_CLKSOURCE(D2CCIP2, RCC_D2CCIP2R_USART28SEL, RCC_D2CCIP2R_USART28SEL_Pos, 0x00000000U)
587#define LL_RCC_USART234578_CLKSOURCE_PLL2Q LL_CLKSOURCE(D2CCIP2, RCC_D2CCIP2R_USART28SEL, RCC_D2CCIP2R_USART28SEL_Pos, RCC_D2CCIP2R_USART28SEL_0)
588#define LL_RCC_USART234578_CLKSOURCE_PLL3Q LL_CLKSOURCE(D2CCIP2, RCC_D2CCIP2R_USART28SEL, RCC_D2CCIP2R_USART28SEL_Pos, RCC_D2CCIP2R_USART28SEL_1)
589#define LL_RCC_USART234578_CLKSOURCE_HSI LL_CLKSOURCE(D2CCIP2, RCC_D2CCIP2R_USART28SEL, RCC_D2CCIP2R_USART28SEL_Pos, RCC_D2CCIP2R_USART28SEL_0 | RCC_D2CCIP2R_USART28SEL_1)
590#define LL_RCC_USART234578_CLKSOURCE_CSI LL_CLKSOURCE(D2CCIP2, RCC_D2CCIP2R_USART28SEL, RCC_D2CCIP2R_USART28SEL_Pos, RCC_D2CCIP2R_USART28SEL_2)
591#define LL_RCC_USART234578_CLKSOURCE_LSE LL_CLKSOURCE(D2CCIP2, RCC_D2CCIP2R_USART28SEL, RCC_D2CCIP2R_USART28SEL_Pos, RCC_D2CCIP2R_USART28SEL_0 | RCC_D2CCIP2R_USART28SEL_2)
592#else
593#define LL_RCC_USART234578_CLKSOURCE_PCLK1 LL_CLKSOURCE(CDCCIP2, RCC_CDCCIP2R_USART234578SEL, RCC_CDCCIP2R_USART234578SEL_Pos, 0x00000000U)
594#define LL_RCC_USART234578_CLKSOURCE_PLL2Q LL_CLKSOURCE(CDCCIP2, RCC_CDCCIP2R_USART234578SEL, RCC_CDCCIP2R_USART234578SEL_Pos, RCC_CDCCIP2R_USART234578SEL_0)
595#define LL_RCC_USART234578_CLKSOURCE_PLL3Q LL_CLKSOURCE(CDCCIP2, RCC_CDCCIP2R_USART234578SEL, RCC_CDCCIP2R_USART234578SEL_Pos, RCC_CDCCIP2R_USART234578SEL_1)
596#define LL_RCC_USART234578_CLKSOURCE_HSI LL_CLKSOURCE(CDCCIP2, RCC_CDCCIP2R_USART234578SEL, RCC_CDCCIP2R_USART234578SEL_Pos, RCC_CDCCIP2R_USART234578SEL_0 | RCC_CDCCIP2R_USART234578SEL_1)
597#define LL_RCC_USART234578_CLKSOURCE_CSI LL_CLKSOURCE(CDCCIP2, RCC_CDCCIP2R_USART234578SEL, RCC_CDCCIP2R_USART234578SEL_Pos, RCC_CDCCIP2R_USART234578SEL_2)
598#define LL_RCC_USART234578_CLKSOURCE_LSE LL_CLKSOURCE(CDCCIP2, RCC_CDCCIP2R_USART234578SEL, RCC_CDCCIP2R_USART234578SEL_Pos, RCC_CDCCIP2R_USART234578SEL_0 | RCC_CDCCIP2R_USART234578SEL_2)
599#endif /* RCC_D2CCIP2R_USART28SEL */
608#if defined(RCC_D3CCIPR_LPUART1SEL)
609#define LL_RCC_LPUART1_CLKSOURCE_PCLK4 (0x00000000U)
610#define LL_RCC_LPUART1_CLKSOURCE_PLL2Q (RCC_D3CCIPR_LPUART1SEL_0)
611#define LL_RCC_LPUART1_CLKSOURCE_PLL3Q (RCC_D3CCIPR_LPUART1SEL_1)
612#define LL_RCC_LPUART1_CLKSOURCE_HSI (RCC_D3CCIPR_LPUART1SEL_0 | RCC_D3CCIPR_LPUART1SEL_1)
613#define LL_RCC_LPUART1_CLKSOURCE_CSI (RCC_D3CCIPR_LPUART1SEL_2)
614#define LL_RCC_LPUART1_CLKSOURCE_LSE (RCC_D3CCIPR_LPUART1SEL_0 | RCC_D3CCIPR_LPUART1SEL_2)
615#else
616#define LL_RCC_LPUART1_CLKSOURCE_PCLK4 (0x00000000U)
617#define LL_RCC_LPUART1_CLKSOURCE_PLL2Q (RCC_SRDCCIPR_LPUART1SEL_0)
618#define LL_RCC_LPUART1_CLKSOURCE_PLL3Q (RCC_SRDCCIPR_LPUART1SEL_1)
619#define LL_RCC_LPUART1_CLKSOURCE_HSI (RCC_SRDCCIPR_LPUART1SEL_0 | RCC_SRDCCIPR_LPUART1SEL_1)
620#define LL_RCC_LPUART1_CLKSOURCE_CSI (RCC_SRDCCIPR_LPUART1SEL_2)
621#define LL_RCC_LPUART1_CLKSOURCE_LSE (RCC_SRDCCIPR_LPUART1SEL_0 | RCC_SRDCCIPR_LPUART1SEL_2)
622#endif /* RCC_D3CCIPR_LPUART1SEL */
631#if defined (RCC_D2CCIP2R_I2C123SEL)
632#define LL_RCC_I2C123_CLKSOURCE_PCLK1 LL_CLKSOURCE(D2CCIP2, RCC_D2CCIP2R_I2C123SEL, RCC_D2CCIP2R_I2C123SEL_Pos, 0x00000000U)
633#define LL_RCC_I2C123_CLKSOURCE_PLL3R LL_CLKSOURCE(D2CCIP2, RCC_D2CCIP2R_I2C123SEL, RCC_D2CCIP2R_I2C123SEL_Pos, RCC_D2CCIP2R_I2C123SEL_0)
634#define LL_RCC_I2C123_CLKSOURCE_HSI LL_CLKSOURCE(D2CCIP2, RCC_D2CCIP2R_I2C123SEL, RCC_D2CCIP2R_I2C123SEL_Pos, RCC_D2CCIP2R_I2C123SEL_1)
635#define LL_RCC_I2C123_CLKSOURCE_CSI LL_CLKSOURCE(D2CCIP2, RCC_D2CCIP2R_I2C123SEL, RCC_D2CCIP2R_I2C123SEL_Pos, RCC_D2CCIP2R_I2C123SEL_0 | RCC_D2CCIP2R_I2C123SEL_1)
636/* Aliases */
637#define LL_RCC_I2C1235_CLKSOURCE_PCLK1 LL_RCC_I2C123_CLKSOURCE_PCLK1
638#define LL_RCC_I2C1235_CLKSOURCE_PLL3R LL_RCC_I2C123_CLKSOURCE_PLL3R
639#define LL_RCC_I2C1235_CLKSOURCE_HSI LL_RCC_I2C123_CLKSOURCE_HSI
640#define LL_RCC_I2C1235_CLKSOURCE_CSI LL_RCC_I2C123_CLKSOURCE_CSI
641
642#elif defined (RCC_D2CCIP2R_I2C1235SEL)
643#define LL_RCC_I2C1235_CLKSOURCE_PCLK1 LL_CLKSOURCE(D2CCIP2, RCC_D2CCIP2R_I2C1235SEL, RCC_D2CCIP2R_I2C1235SEL_Pos, 0x00000000U)
644#define LL_RCC_I2C1235_CLKSOURCE_PLL3R LL_CLKSOURCE(D2CCIP2, RCC_D2CCIP2R_I2C1235SEL, RCC_D2CCIP2R_I2C1235SEL_Pos, RCC_D2CCIP2R_I2C1235SEL_0)
645#define LL_RCC_I2C1235_CLKSOURCE_HSI LL_CLKSOURCE(D2CCIP2, RCC_D2CCIP2R_I2C1235SEL, RCC_D2CCIP2R_I2C1235SEL_Pos, RCC_D2CCIP2R_I2C1235SEL_1)
646#define LL_RCC_I2C1235_CLKSOURCE_CSI LL_CLKSOURCE(D2CCIP2, RCC_D2CCIP2R_I2C1235SEL, RCC_D2CCIP2R_I2C1235SEL_Pos, RCC_D2CCIP2R_I2C1235SEL_0 | RCC_D2CCIP2R_I2C1235SEL_1)
647/* Aliases */
648#define LL_RCC_I2C123_CLKSOURCE_PCLK1 LL_RCC_I2C1235_CLKSOURCE_PCLK1
649#define LL_RCC_I2C123_CLKSOURCE_PLL3R LL_RCC_I2C1235_CLKSOURCE_PLL3R
650#define LL_RCC_I2C123_CLKSOURCE_HSI LL_RCC_I2C1235_CLKSOURCE_HSI
651#define LL_RCC_I2C123_CLKSOURCE_CSI LL_RCC_I2C1235_CLKSOURCE_CSI
652
653#else
654#define LL_RCC_I2C123_CLKSOURCE_PCLK1 LL_CLKSOURCE(CDCCIP2, RCC_CDCCIP2R_I2C123SEL, RCC_CDCCIP2R_I2C123SEL_Pos, 0x00000000U)
655#define LL_RCC_I2C123_CLKSOURCE_PLL3R LL_CLKSOURCE(CDCCIP2, RCC_CDCCIP2R_I2C123SEL, RCC_CDCCIP2R_I2C123SEL_Pos, RCC_CDCCIP2R_I2C123SEL_0)
656#define LL_RCC_I2C123_CLKSOURCE_HSI LL_CLKSOURCE(CDCCIP2, RCC_CDCCIP2R_I2C123SEL, RCC_CDCCIP2R_I2C123SEL_Pos, RCC_CDCCIP2R_I2C123SEL_1)
657#define LL_RCC_I2C123_CLKSOURCE_CSI LL_CLKSOURCE(CDCCIP2, RCC_CDCCIP2R_I2C123SEL, RCC_CDCCIP2R_I2C123SEL_Pos, RCC_CDCCIP2R_I2C123SEL_0 | RCC_CDCCIP2R_I2C123SEL_1)
658#endif /* RCC_D2CCIP2R_I2C123SEL */
659#if defined (RCC_D3CCIPR_I2C4SEL)
660#define LL_RCC_I2C4_CLKSOURCE_PCLK4 LL_CLKSOURCE(D3CCIP, RCC_D3CCIPR_I2C4SEL, RCC_D3CCIPR_I2C4SEL_Pos, 0x00000000U)
661#define LL_RCC_I2C4_CLKSOURCE_PLL3R LL_CLKSOURCE(D3CCIP, RCC_D3CCIPR_I2C4SEL, RCC_D3CCIPR_I2C4SEL_Pos, RCC_D3CCIPR_I2C4SEL_0)
662#define LL_RCC_I2C4_CLKSOURCE_HSI LL_CLKSOURCE(D3CCIP, RCC_D3CCIPR_I2C4SEL, RCC_D3CCIPR_I2C4SEL_Pos, RCC_D3CCIPR_I2C4SEL_1)
663#define LL_RCC_I2C4_CLKSOURCE_CSI LL_CLKSOURCE(D3CCIP, RCC_D3CCIPR_I2C4SEL, RCC_D3CCIPR_I2C4SEL_Pos, RCC_D3CCIPR_I2C4SEL_0 | RCC_D3CCIPR_I2C4SEL_1)
664#else
665#define LL_RCC_I2C4_CLKSOURCE_PCLK4 LL_CLKSOURCE(SRDCCIP, RCC_SRDCCIPR_I2C4SEL, RCC_SRDCCIPR_I2C4SEL_Pos, 0x00000000U)
666#define LL_RCC_I2C4_CLKSOURCE_PLL3R LL_CLKSOURCE(SRDCCIP, RCC_SRDCCIPR_I2C4SEL, RCC_SRDCCIPR_I2C4SEL_Pos, RCC_SRDCCIPR_I2C4SEL_0)
667#define LL_RCC_I2C4_CLKSOURCE_HSI LL_CLKSOURCE(SRDCCIP, RCC_SRDCCIPR_I2C4SEL, RCC_SRDCCIPR_I2C4SEL_Pos, RCC_SRDCCIPR_I2C4SEL_1)
668#define LL_RCC_I2C4_CLKSOURCE_CSI LL_CLKSOURCE(SRDCCIP, RCC_SRDCCIPR_I2C4SEL, RCC_SRDCCIPR_I2C4SEL_Pos, RCC_SRDCCIPR_I2C4SEL_0 | RCC_SRDCCIPR_I2C4SEL_1)
669#endif /* RCC_D3CCIPR_I2C4SEL */
678#if defined(RCC_D2CCIP2R_LPTIM1SEL)
679#define LL_RCC_LPTIM1_CLKSOURCE_PCLK1 LL_CLKSOURCE(D2CCIP2, RCC_D2CCIP2R_LPTIM1SEL, RCC_D2CCIP2R_LPTIM1SEL_Pos, 0x00000000U)
680#define LL_RCC_LPTIM1_CLKSOURCE_PLL2P LL_CLKSOURCE(D2CCIP2, RCC_D2CCIP2R_LPTIM1SEL, RCC_D2CCIP2R_LPTIM1SEL_Pos, RCC_D2CCIP2R_LPTIM1SEL_0)
681#define LL_RCC_LPTIM1_CLKSOURCE_PLL3R LL_CLKSOURCE(D2CCIP2, RCC_D2CCIP2R_LPTIM1SEL, RCC_D2CCIP2R_LPTIM1SEL_Pos, RCC_D2CCIP2R_LPTIM1SEL_1)
682#define LL_RCC_LPTIM1_CLKSOURCE_LSE LL_CLKSOURCE(D2CCIP2, RCC_D2CCIP2R_LPTIM1SEL, RCC_D2CCIP2R_LPTIM1SEL_Pos, RCC_D2CCIP2R_LPTIM1SEL_0 | RCC_D2CCIP2R_LPTIM1SEL_1)
683#define LL_RCC_LPTIM1_CLKSOURCE_LSI LL_CLKSOURCE(D2CCIP2, RCC_D2CCIP2R_LPTIM1SEL, RCC_D2CCIP2R_LPTIM1SEL_Pos, RCC_D2CCIP2R_LPTIM1SEL_2)
684#define LL_RCC_LPTIM1_CLKSOURCE_CLKP LL_CLKSOURCE(D2CCIP2, RCC_D2CCIP2R_LPTIM1SEL, RCC_D2CCIP2R_LPTIM1SEL_Pos, RCC_D2CCIP2R_LPTIM1SEL_0 | RCC_D2CCIP2R_LPTIM1SEL_2)
685#else
686#define LL_RCC_LPTIM1_CLKSOURCE_PCLK1 LL_CLKSOURCE(CDCCIP2, RCC_CDCCIP2R_LPTIM1SEL, RCC_CDCCIP2R_LPTIM1SEL_Pos, 0x00000000U)
687#define LL_RCC_LPTIM1_CLKSOURCE_PLL2P LL_CLKSOURCE(CDCCIP2, RCC_CDCCIP2R_LPTIM1SEL, RCC_CDCCIP2R_LPTIM1SEL_Pos, RCC_CDCCIP2R_LPTIM1SEL_0)
688#define LL_RCC_LPTIM1_CLKSOURCE_PLL3R LL_CLKSOURCE(CDCCIP2, RCC_CDCCIP2R_LPTIM1SEL, RCC_CDCCIP2R_LPTIM1SEL_Pos, RCC_CDCCIP2R_LPTIM1SEL_1)
689#define LL_RCC_LPTIM1_CLKSOURCE_LSE LL_CLKSOURCE(CDCCIP2, RCC_CDCCIP2R_LPTIM1SEL, RCC_CDCCIP2R_LPTIM1SEL_Pos, RCC_CDCCIP2R_LPTIM1SEL_0 | RCC_CDCCIP2R_LPTIM1SEL_1)
690#define LL_RCC_LPTIM1_CLKSOURCE_LSI LL_CLKSOURCE(CDCCIP2, RCC_CDCCIP2R_LPTIM1SEL, RCC_CDCCIP2R_LPTIM1SEL_Pos, RCC_CDCCIP2R_LPTIM1SEL_2)
691#define LL_RCC_LPTIM1_CLKSOURCE_CLKP LL_CLKSOURCE(CDCCIP2, RCC_CDCCIP2R_LPTIM1SEL, RCC_CDCCIP2R_LPTIM1SEL_Pos, RCC_CDCCIP2R_LPTIM1SEL_0 | RCC_CDCCIP2R_LPTIM1SEL_2)
692#endif /* RCC_D2CCIP2R_LPTIM1SEL */
693#if defined(RCC_D3CCIPR_LPTIM2SEL)
694#define LL_RCC_LPTIM2_CLKSOURCE_PCLK4 LL_CLKSOURCE(D3CCIP, RCC_D3CCIPR_LPTIM2SEL, RCC_D3CCIPR_LPTIM2SEL_Pos, 0x00000000U)
695#define LL_RCC_LPTIM2_CLKSOURCE_PLL2P LL_CLKSOURCE(D3CCIP, RCC_D3CCIPR_LPTIM2SEL, RCC_D3CCIPR_LPTIM2SEL_Pos, RCC_D3CCIPR_LPTIM2SEL_0)
696#define LL_RCC_LPTIM2_CLKSOURCE_PLL3R LL_CLKSOURCE(D3CCIP, RCC_D3CCIPR_LPTIM2SEL, RCC_D3CCIPR_LPTIM2SEL_Pos, RCC_D3CCIPR_LPTIM2SEL_1)
697#define LL_RCC_LPTIM2_CLKSOURCE_LSE LL_CLKSOURCE(D3CCIP, RCC_D3CCIPR_LPTIM2SEL, RCC_D3CCIPR_LPTIM2SEL_Pos, RCC_D3CCIPR_LPTIM2SEL_0 | RCC_D3CCIPR_LPTIM2SEL_1)
698#define LL_RCC_LPTIM2_CLKSOURCE_LSI LL_CLKSOURCE(D3CCIP, RCC_D3CCIPR_LPTIM2SEL, RCC_D3CCIPR_LPTIM2SEL_Pos, RCC_D3CCIPR_LPTIM2SEL_2)
699#define LL_RCC_LPTIM2_CLKSOURCE_CLKP LL_CLKSOURCE(D3CCIP, RCC_D3CCIPR_LPTIM2SEL, RCC_D3CCIPR_LPTIM2SEL_Pos, RCC_D3CCIPR_LPTIM2SEL_0 | RCC_D3CCIPR_LPTIM2SEL_2)
700#else
701#define LL_RCC_LPTIM2_CLKSOURCE_PCLK4 LL_CLKSOURCE(SRDCCIP, RCC_SRDCCIPR_LPTIM2SEL, RCC_SRDCCIPR_LPTIM2SEL_Pos, 0x00000000U)
702#define LL_RCC_LPTIM2_CLKSOURCE_PLL2P LL_CLKSOURCE(SRDCCIP, RCC_SRDCCIPR_LPTIM2SEL, RCC_SRDCCIPR_LPTIM2SEL_Pos, RCC_SRDCCIPR_LPTIM2SEL_0)
703#define LL_RCC_LPTIM2_CLKSOURCE_PLL3R LL_CLKSOURCE(SRDCCIP, RCC_SRDCCIPR_LPTIM2SEL, RCC_SRDCCIPR_LPTIM2SEL_Pos, RCC_SRDCCIPR_LPTIM2SEL_1)
704#define LL_RCC_LPTIM2_CLKSOURCE_LSE LL_CLKSOURCE(SRDCCIP, RCC_SRDCCIPR_LPTIM2SEL, RCC_SRDCCIPR_LPTIM2SEL_Pos, RCC_SRDCCIPR_LPTIM2SEL_0 | RCC_SRDCCIPR_LPTIM2SEL_1)
705#define LL_RCC_LPTIM2_CLKSOURCE_LSI LL_CLKSOURCE(SRDCCIP, RCC_SRDCCIPR_LPTIM2SEL, RCC_SRDCCIPR_LPTIM2SEL_Pos, RCC_SRDCCIPR_LPTIM2SEL_2)
706#define LL_RCC_LPTIM2_CLKSOURCE_CLKP LL_CLKSOURCE(SRDCCIP, RCC_SRDCCIPR_LPTIM2SEL, RCC_SRDCCIPR_LPTIM2SEL_Pos, RCC_SRDCCIPR_LPTIM2SEL_0 | RCC_SRDCCIPR_LPTIM2SEL_2)
707#endif /* RCC_D3CCIPR_LPTIM2SEL */
708#if defined(RCC_D3CCIPR_LPTIM345SEL)
709#define LL_RCC_LPTIM345_CLKSOURCE_PCLK4 LL_CLKSOURCE(D3CCIP, RCC_D3CCIPR_LPTIM345SEL, RCC_D3CCIPR_LPTIM345SEL_Pos, 0x00000000U)
710#define LL_RCC_LPTIM345_CLKSOURCE_PLL2P LL_CLKSOURCE(D3CCIP, RCC_D3CCIPR_LPTIM345SEL, RCC_D3CCIPR_LPTIM345SEL_Pos, RCC_D3CCIPR_LPTIM345SEL_0)
711#define LL_RCC_LPTIM345_CLKSOURCE_PLL3R LL_CLKSOURCE(D3CCIP, RCC_D3CCIPR_LPTIM345SEL, RCC_D3CCIPR_LPTIM345SEL_Pos, RCC_D3CCIPR_LPTIM345SEL_1)
712#define LL_RCC_LPTIM345_CLKSOURCE_LSE LL_CLKSOURCE(D3CCIP, RCC_D3CCIPR_LPTIM345SEL, RCC_D3CCIPR_LPTIM345SEL_Pos, RCC_D3CCIPR_LPTIM345SEL_0 | RCC_D3CCIPR_LPTIM345SEL_1)
713#define LL_RCC_LPTIM345_CLKSOURCE_LSI LL_CLKSOURCE(D3CCIP, RCC_D3CCIPR_LPTIM345SEL, RCC_D3CCIPR_LPTIM345SEL_Pos, RCC_D3CCIPR_LPTIM345SEL_2)
714#define LL_RCC_LPTIM345_CLKSOURCE_CLKP LL_CLKSOURCE(D3CCIP, RCC_D3CCIPR_LPTIM345SEL, RCC_D3CCIPR_LPTIM345SEL_Pos, RCC_D3CCIPR_LPTIM345SEL_0 | RCC_D3CCIPR_LPTIM345SEL_2)
715#else
716#define LL_RCC_LPTIM345_CLKSOURCE_PCLK4 LL_CLKSOURCE(SRDCCIP, RCC_SRDCCIPR_LPTIM3SEL, RCC_SRDCCIPR_LPTIM3SEL_Pos, 0x00000000U)
717#define LL_RCC_LPTIM345_CLKSOURCE_PLL2P LL_CLKSOURCE(SRDCCIP, RCC_SRDCCIPR_LPTIM3SEL, RCC_SRDCCIPR_LPTIM3SEL_Pos, RCC_SRDCCIPR_LPTIM3SEL_0)
718#define LL_RCC_LPTIM345_CLKSOURCE_PLL3R LL_CLKSOURCE(SRDCCIP, RCC_SRDCCIPR_LPTIM3SEL, RCC_SRDCCIPR_LPTIM3SEL_Pos, RCC_SRDCCIPR_LPTIM3SEL_1)
719#define LL_RCC_LPTIM345_CLKSOURCE_LSE LL_CLKSOURCE(SRDCCIP, RCC_SRDCCIPR_LPTIM3SEL, RCC_SRDCCIPR_LPTIM3SEL_Pos, RCC_SRDCCIPR_LPTIM3SEL_0 | RCC_SRDCCIPR_LPTIM3SEL_1)
720#define LL_RCC_LPTIM345_CLKSOURCE_LSI LL_CLKSOURCE(SRDCCIP, RCC_SRDCCIPR_LPTIM3SEL, RCC_SRDCCIPR_LPTIM3SEL_Pos, RCC_SRDCCIPR_LPTIM3SEL_2)
721#define LL_RCC_LPTIM345_CLKSOURCE_CLKP LL_CLKSOURCE(SRDCCIP, RCC_SRDCCIPR_LPTIM3SEL, RCC_SRDCCIPR_LPTIM3SEL_Pos, RCC_SRDCCIPR_LPTIM3SEL_0 | RCC_SRDCCIPR_LPTIM3SEL_2)
722/* aliases*/
723#define LL_RCC_LPTIM3_CLKSOURCE_PCLK4 LL_RCC_LPTIM345_CLKSOURCE_PCLK4
724#define LL_RCC_LPTIM3_CLKSOURCE_PLL2P LL_RCC_LPTIM345_CLKSOURCE_PLL2P
725#define LL_RCC_LPTIM3_CLKSOURCE_PLL3R LL_RCC_LPTIM345_CLKSOURCE_PLL3R
726#define LL_RCC_LPTIM3_CLKSOURCE_LSE LL_RCC_LPTIM345_CLKSOURCE_LSE
727#define LL_RCC_LPTIM3_CLKSOURCE_LSI LL_RCC_LPTIM345_CLKSOURCE_LSI
728#define LL_RCC_LPTIM3_CLKSOURCE_CLKP LL_RCC_LPTIM345_CLKSOURCE_CLKP
729#endif /* RCC_D3CCIPR_LPTIM345SEL */
738#if defined(RCC_D2CCIP1R_SAI1SEL)
739#define LL_RCC_SAI1_CLKSOURCE_PLL1Q LL_CLKSOURCE(D2CCIP1, RCC_D2CCIP1R_SAI1SEL, RCC_D2CCIP1R_SAI1SEL_Pos, 0x00000000U)
740#define LL_RCC_SAI1_CLKSOURCE_PLL2P LL_CLKSOURCE(D2CCIP1, RCC_D2CCIP1R_SAI1SEL, RCC_D2CCIP1R_SAI1SEL_Pos, RCC_D2CCIP1R_SAI1SEL_0)
741#define LL_RCC_SAI1_CLKSOURCE_PLL3P LL_CLKSOURCE(D2CCIP1, RCC_D2CCIP1R_SAI1SEL, RCC_D2CCIP1R_SAI1SEL_Pos, RCC_D2CCIP1R_SAI1SEL_1)
742#define LL_RCC_SAI1_CLKSOURCE_I2S_CKIN LL_CLKSOURCE(D2CCIP1, RCC_D2CCIP1R_SAI1SEL, RCC_D2CCIP1R_SAI1SEL_Pos, RCC_D2CCIP1R_SAI1SEL_0 | RCC_D2CCIP1R_SAI1SEL_1)
743#define LL_RCC_SAI1_CLKSOURCE_CLKP LL_CLKSOURCE(D2CCIP1, RCC_D2CCIP1R_SAI1SEL, RCC_D2CCIP1R_SAI1SEL_Pos, RCC_D2CCIP1R_SAI1SEL_2)
744#else
745#define LL_RCC_SAI1_CLKSOURCE_PLL1Q LL_CLKSOURCE(CDCCIP1, RCC_CDCCIP1R_SAI1SEL, RCC_CDCCIP1R_SAI1SEL_Pos, 0x00000000U)
746#define LL_RCC_SAI1_CLKSOURCE_PLL2P LL_CLKSOURCE(CDCCIP1, RCC_CDCCIP1R_SAI1SEL, RCC_CDCCIP1R_SAI1SEL_Pos, RCC_CDCCIP1R_SAI1SEL_0)
747#define LL_RCC_SAI1_CLKSOURCE_PLL3P LL_CLKSOURCE(CDCCIP1, RCC_CDCCIP1R_SAI1SEL, RCC_CDCCIP1R_SAI1SEL_Pos, RCC_CDCCIP1R_SAI1SEL_1)
748#define LL_RCC_SAI1_CLKSOURCE_I2S_CKIN LL_CLKSOURCE(CDCCIP1, RCC_CDCCIP1R_SAI1SEL, RCC_CDCCIP1R_SAI1SEL_Pos, RCC_CDCCIP1R_SAI1SEL_0 | RCC_CDCCIP1R_SAI1SEL_1)
749#define LL_RCC_SAI1_CLKSOURCE_CLKP LL_CLKSOURCE(CDCCIP1, RCC_CDCCIP1R_SAI1SEL, RCC_CDCCIP1R_SAI1SEL_Pos, RCC_CDCCIP1R_SAI1SEL_2)
750#endif
751#if defined(SAI3)
752#define LL_RCC_SAI23_CLKSOURCE_PLL1Q LL_CLKSOURCE(D2CCIP1, RCC_D2CCIP1R_SAI23SEL, RCC_D2CCIP1R_SAI23SEL_Pos, 0x00000000U)
753#define LL_RCC_SAI23_CLKSOURCE_PLL2P LL_CLKSOURCE(D2CCIP1, RCC_D2CCIP1R_SAI23SEL, RCC_D2CCIP1R_SAI23SEL_Pos, RCC_D2CCIP1R_SAI23SEL_0)
754#define LL_RCC_SAI23_CLKSOURCE_PLL3P LL_CLKSOURCE(D2CCIP1, RCC_D2CCIP1R_SAI23SEL, RCC_D2CCIP1R_SAI23SEL_Pos, RCC_D2CCIP1R_SAI23SEL_1)
755#define LL_RCC_SAI23_CLKSOURCE_I2S_CKIN LL_CLKSOURCE(D2CCIP1, RCC_D2CCIP1R_SAI23SEL, RCC_D2CCIP1R_SAI23SEL_Pos, RCC_D2CCIP1R_SAI23SEL_0 | RCC_D2CCIP1R_SAI23SEL_1)
756#define LL_RCC_SAI23_CLKSOURCE_CLKP LL_CLKSOURCE(D2CCIP1, RCC_D2CCIP1R_SAI23SEL, RCC_D2CCIP1R_SAI23SEL_Pos, RCC_D2CCIP1R_SAI23SEL_2)
757#endif /* SAI3 */
758#if defined(RCC_CDCCIP1R_SAI2ASEL)
759#define LL_RCC_SAI2A_CLKSOURCE_PLL1Q LL_CLKSOURCE(CDCCIP1, RCC_CDCCIP1R_SAI2ASEL, RCC_CDCCIP1R_SAI2ASEL_Pos, 0x00000000U)
760#define LL_RCC_SAI2A_CLKSOURCE_PLL2P LL_CLKSOURCE(CDCCIP1, RCC_CDCCIP1R_SAI2ASEL, RCC_CDCCIP1R_SAI2ASEL_Pos, RCC_CDCCIP1R_SAI2ASEL_0)
761#define LL_RCC_SAI2A_CLKSOURCE_PLL3P LL_CLKSOURCE(CDCCIP1, RCC_CDCCIP1R_SAI2ASEL, RCC_CDCCIP1R_SAI2ASEL_Pos, RCC_CDCCIP1R_SAI2ASEL_1)
762#define LL_RCC_SAI2A_CLKSOURCE_I2S_CKIN LL_CLKSOURCE(CDCCIP1, RCC_CDCCIP1R_SAI2ASEL, RCC_CDCCIP1R_SAI2ASEL_Pos, RCC_CDCCIP1R_SAI2ASEL_0 | RCC_CDCCIP1R_SAI2ASEL_1)
763#define LL_RCC_SAI2A_CLKSOURCE_CLKP LL_CLKSOURCE(CDCCIP1, RCC_CDCCIP1R_SAI2ASEL, RCC_CDCCIP1R_SAI2ASEL_Pos, RCC_CDCCIP1R_SAI2ASEL_2)
764#define LL_RCC_SAI2A_CLKSOURCE_SPDIF LL_CLKSOURCE(CDCCIP1, RCC_CDCCIP1R_SAI2ASEL, RCC_CDCCIP1R_SAI2ASEL_Pos, RCC_CDCCIP1R_SAI2ASEL_0 | RCC_CDCCIP1R_SAI2ASEL_2)
765#endif /* RCC_CDCCIP1R_SAI2ASEL */
766#if defined(RCC_CDCCIP1R_SAI2BSEL)
767#define LL_RCC_SAI2B_CLKSOURCE_PLL1Q LL_CLKSOURCE(CDCCIP1, RCC_CDCCIP1R_SAI2BSEL, RCC_CDCCIP1R_SAI2BSEL_Pos, 0x00000000U)
768#define LL_RCC_SAI2B_CLKSOURCE_PLL2P LL_CLKSOURCE(CDCCIP1, RCC_CDCCIP1R_SAI2BSEL, RCC_CDCCIP1R_SAI2BSEL_Pos, RCC_CDCCIP1R_SAI2BSEL_0)
769#define LL_RCC_SAI2B_CLKSOURCE_PLL3P LL_CLKSOURCE(CDCCIP1, RCC_CDCCIP1R_SAI2BSEL, RCC_CDCCIP1R_SAI2BSEL_Pos, RCC_CDCCIP1R_SAI2BSEL_1)
770#define LL_RCC_SAI2B_CLKSOURCE_I2S_CKIN LL_CLKSOURCE(CDCCIP1, RCC_CDCCIP1R_SAI2BSEL, RCC_CDCCIP1R_SAI2BSEL_Pos, RCC_CDCCIP1R_SAI2BSEL_0 | RCC_CDCCIP1R_SAI2BSEL_1)
771#define LL_RCC_SAI2B_CLKSOURCE_CLKP LL_CLKSOURCE(CDCCIP1, RCC_CDCCIP1R_SAI2BSEL, RCC_CDCCIP1R_SAI2BSEL_Pos, RCC_CDCCIP1R_SAI2BSEL_2)
772#define LL_RCC_SAI2B_CLKSOURCE_SPDIF LL_CLKSOURCE(CDCCIP1, RCC_CDCCIP1R_SAI2BSEL, RCC_CDCCIP1R_SAI2BSEL_Pos, RCC_CDCCIP1R_SAI2BSEL_0 | RCC_CDCCIP1R_SAI2BSEL_2)
773#endif /* RCC_CDCCIP1R_SAI2BSEL */
774#if defined(SAI4_Block_A)
775#define LL_RCC_SAI4A_CLKSOURCE_PLL1Q LL_CLKSOURCE(D3CCIP, RCC_D3CCIPR_SAI4ASEL, RCC_D3CCIPR_SAI4ASEL_Pos, 0x00000000U)
776#define LL_RCC_SAI4A_CLKSOURCE_PLL2P LL_CLKSOURCE(D3CCIP, RCC_D3CCIPR_SAI4ASEL, RCC_D3CCIPR_SAI4ASEL_Pos, RCC_D3CCIPR_SAI4ASEL_0)
777#define LL_RCC_SAI4A_CLKSOURCE_PLL3P LL_CLKSOURCE(D3CCIP, RCC_D3CCIPR_SAI4ASEL, RCC_D3CCIPR_SAI4ASEL_Pos, RCC_D3CCIPR_SAI4ASEL_1)
778#define LL_RCC_SAI4A_CLKSOURCE_I2S_CKIN LL_CLKSOURCE(D3CCIP, RCC_D3CCIPR_SAI4ASEL, RCC_D3CCIPR_SAI4ASEL_Pos, RCC_D3CCIPR_SAI4ASEL_0 | RCC_D3CCIPR_SAI4ASEL_1)
779#define LL_RCC_SAI4A_CLKSOURCE_CLKP LL_CLKSOURCE(D3CCIP, RCC_D3CCIPR_SAI4ASEL, RCC_D3CCIPR_SAI4ASEL_Pos, RCC_D3CCIPR_SAI4ASEL_2)
780#if defined(RCC_VER_3_0)
781#define LL_RCC_SAI4A_CLKSOURCE_SPDIF LL_CLKSOURCE(D3CCIP, RCC_D3CCIPR_SAI4ASEL, RCC_D3CCIPR_SAI4ASEL_Pos, RCC_D3CCIPR_SAI4ASEL_2 | RCC_D3CCIPR_SAI4ASEL_0)
782#endif /* RCC_VER_3_0 */
783#endif /* SAI4_Block_A */
784#if defined(SAI4_Block_B)
785#define LL_RCC_SAI4B_CLKSOURCE_PLL1Q LL_CLKSOURCE(D3CCIP, RCC_D3CCIPR_SAI4BSEL, RCC_D3CCIPR_SAI4BSEL_Pos, 0x00000000U)
786#define LL_RCC_SAI4B_CLKSOURCE_PLL2P LL_CLKSOURCE(D3CCIP, RCC_D3CCIPR_SAI4BSEL, RCC_D3CCIPR_SAI4BSEL_Pos, RCC_D3CCIPR_SAI4BSEL_0)
787#define LL_RCC_SAI4B_CLKSOURCE_PLL3P LL_CLKSOURCE(D3CCIP, RCC_D3CCIPR_SAI4BSEL, RCC_D3CCIPR_SAI4BSEL_Pos, RCC_D3CCIPR_SAI4BSEL_1)
788#define LL_RCC_SAI4B_CLKSOURCE_I2S_CKIN LL_CLKSOURCE(D3CCIP, RCC_D3CCIPR_SAI4BSEL, RCC_D3CCIPR_SAI4BSEL_Pos, RCC_D3CCIPR_SAI4BSEL_0 | RCC_D3CCIPR_SAI4BSEL_1)
789#define LL_RCC_SAI4B_CLKSOURCE_CLKP LL_CLKSOURCE(D3CCIP, RCC_D3CCIPR_SAI4BSEL, RCC_D3CCIPR_SAI4BSEL_Pos, RCC_D3CCIPR_SAI4BSEL_2)
790#if defined(RCC_VER_3_0)
791#define LL_RCC_SAI4B_CLKSOURCE_SPDIF LL_CLKSOURCE(D3CCIP, RCC_D3CCIPR_SAI4BSEL, RCC_D3CCIPR_SAI4BSEL_Pos, RCC_D3CCIPR_SAI4BSEL_2 | RCC_D3CCIPR_SAI4BSEL_0)
792#endif /* RCC_VER_3_0 */
793#endif /* SAI4_Block_B */
802#if defined(RCC_D1CCIPR_SDMMCSEL)
803#define LL_RCC_SDMMC_CLKSOURCE_PLL1Q (0x00000000U)
804#define LL_RCC_SDMMC_CLKSOURCE_PLL2R (RCC_D1CCIPR_SDMMCSEL)
805#else
806#define LL_RCC_SDMMC_CLKSOURCE_PLL1Q (0x00000000U)
807#define LL_RCC_SDMMC_CLKSOURCE_PLL2R (RCC_CDCCIPR_SDMMCSEL)
808#endif /* RCC_D1CCIPR_SDMMCSEL */
817#if defined(RCC_D2CCIP2R_RNGSEL)
818#define LL_RCC_RNG_CLKSOURCE_HSI48 (0x00000000U)
819#define LL_RCC_RNG_CLKSOURCE_PLL1Q (RCC_D2CCIP2R_RNGSEL_0)
820#define LL_RCC_RNG_CLKSOURCE_LSE (RCC_D2CCIP2R_RNGSEL_1)
821#define LL_RCC_RNG_CLKSOURCE_LSI (RCC_D2CCIP2R_RNGSEL_1 | RCC_D2CCIP2R_RNGSEL_0)
822#else
823#define LL_RCC_RNG_CLKSOURCE_HSI48 (0x00000000U)
824#define LL_RCC_RNG_CLKSOURCE_PLL1Q (RCC_CDCCIP2R_RNGSEL_0)
825#define LL_RCC_RNG_CLKSOURCE_LSE (RCC_CDCCIP2R_RNGSEL_1)
826#define LL_RCC_RNG_CLKSOURCE_LSI (RCC_CDCCIP2R_RNGSEL_1 | RCC_CDCCIP2R_RNGSEL_0)
827#endif /* RCC_D2CCIP2R_RNGSEL */
836#if defined(RCC_D2CCIP2R_USBSEL)
837#define LL_RCC_USB_CLKSOURCE_DISABLE (0x00000000U)
838#define LL_RCC_USB_CLKSOURCE_PLL1Q (RCC_D2CCIP2R_USBSEL_0)
839#define LL_RCC_USB_CLKSOURCE_PLL3Q (RCC_D2CCIP2R_USBSEL_1)
840#define LL_RCC_USB_CLKSOURCE_HSI48 (RCC_D2CCIP2R_USBSEL_1 | RCC_D2CCIP2R_USBSEL_0)
841#else
842#define LL_RCC_USB_CLKSOURCE_DISABLE (0x00000000U)
843#define LL_RCC_USB_CLKSOURCE_PLL1Q (RCC_CDCCIP2R_USBSEL_0)
844#define LL_RCC_USB_CLKSOURCE_PLL3Q (RCC_CDCCIP2R_USBSEL_1)
845#define LL_RCC_USB_CLKSOURCE_HSI48 (RCC_CDCCIP2R_USBSEL_1 | RCC_CDCCIP2R_USBSEL_0)
846#endif /* RCC_D2CCIP2R_USBSEL */
855#if defined(RCC_D2CCIP2R_CECSEL)
856#define LL_RCC_CEC_CLKSOURCE_LSE (0x00000000U)
857#define LL_RCC_CEC_CLKSOURCE_LSI (RCC_D2CCIP2R_CECSEL_0)
858#define LL_RCC_CEC_CLKSOURCE_CSI_DIV122 (RCC_D2CCIP2R_CECSEL_1)
859#else
860#define LL_RCC_CEC_CLKSOURCE_LSE (0x00000000U)
861#define LL_RCC_CEC_CLKSOURCE_LSI (RCC_CDCCIP2R_CECSEL_0)
862#define LL_RCC_CEC_CLKSOURCE_CSI_DIV122 (RCC_CDCCIP2R_CECSEL_1)
863#endif
868#if defined(DSI)
873#define LL_RCC_DSI_CLKSOURCE_PHY (0x00000000U)
874#define LL_RCC_DSI_CLKSOURCE_PLL2Q (RCC_D1CCIPR_DSISEL)
878#endif /* DSI */
879
884#if defined(RCC_D2CCIP1R_DFSDM1SEL)
885#define LL_RCC_DFSDM1_CLKSOURCE_PCLK2 (0x00000000U)
886#define LL_RCC_DFSDM1_CLKSOURCE_SYSCLK (RCC_D2CCIP1R_DFSDM1SEL)
887#else
888#define LL_RCC_DFSDM1_CLKSOURCE_PCLK2 (0x00000000U)
889#define LL_RCC_DFSDM1_CLKSOURCE_SYSCLK (RCC_CDCCIP1R_DFSDM1SEL)
890#endif /* RCC_D2CCIP1R_DFSDM1SEL */
895#if defined(DFSDM2_BASE)
900#define LL_RCC_DFSDM2_CLKSOURCE_PCLK4 (0x00000000U)
901#define LL_RCC_DFSDM2_CLKSOURCE_SYSCLK (RCC_SRDCCIPR_DFSDM2SEL)
905#endif /* DFSDM2_BASE */
906
911#if defined(RCC_D1CCIPR_FMCSEL)
912#define LL_RCC_FMC_CLKSOURCE_HCLK (0x00000000U)
913#define LL_RCC_FMC_CLKSOURCE_PLL1Q (RCC_D1CCIPR_FMCSEL_0)
914#define LL_RCC_FMC_CLKSOURCE_PLL2R (RCC_D1CCIPR_FMCSEL_1)
915#define LL_RCC_FMC_CLKSOURCE_CLKP (RCC_D1CCIPR_FMCSEL_0 | RCC_D1CCIPR_FMCSEL_1)
916#else
917#define LL_RCC_FMC_CLKSOURCE_HCLK (0x00000000U)
918#define LL_RCC_FMC_CLKSOURCE_PLL1Q (RCC_CDCCIPR_FMCSEL_0)
919#define LL_RCC_FMC_CLKSOURCE_PLL2R (RCC_CDCCIPR_FMCSEL_1)
920#define LL_RCC_FMC_CLKSOURCE_CLKP (RCC_CDCCIPR_FMCSEL_0 | RCC_CDCCIPR_FMCSEL_1)
921#endif /* RCC_D1CCIPR_FMCSEL */
926#if defined(QUADSPI)
931#define LL_RCC_QSPI_CLKSOURCE_HCLK (0x00000000U)
932#define LL_RCC_QSPI_CLKSOURCE_PLL1Q (RCC_D1CCIPR_QSPISEL_0)
933#define LL_RCC_QSPI_CLKSOURCE_PLL2R (RCC_D1CCIPR_QSPISEL_1)
934#define LL_RCC_QSPI_CLKSOURCE_CLKP (RCC_D1CCIPR_QSPISEL_0 | RCC_D1CCIPR_QSPISEL_1)
938#endif /* QUADSPI */
939
940
941#if defined(OCTOSPI1) || defined(OCTOSPI2)
946#if defined(RCC_D1CCIPR_OCTOSPISEL)
947#define LL_RCC_OSPI_CLKSOURCE_HCLK (0x00000000U)
948#define LL_RCC_OSPI_CLKSOURCE_PLL1Q (RCC_D1CCIPR_OCTOSPISEL_0)
949#define LL_RCC_OSPI_CLKSOURCE_PLL2R (RCC_D1CCIPR_OCTOSPISEL_1)
950#define LL_RCC_OSPI_CLKSOURCE_CLKP (RCC_D1CCIPR_OCTOSPISEL_0 | RCC_D1CCIPR_OCTOSPISEL_1)
951#else
952#define LL_RCC_OSPI_CLKSOURCE_HCLK (0x00000000U)
953#define LL_RCC_OSPI_CLKSOURCE_PLL1Q (RCC_CDCCIPR_OCTOSPISEL_0)
954#define LL_RCC_OSPI_CLKSOURCE_PLL2R (RCC_CDCCIPR_OCTOSPISEL_1)
955#define LL_RCC_OSPI_CLKSOURCE_CLKP (RCC_CDCCIPR_OCTOSPISEL_0 | RCC_CDCCIPR_OCTOSPISEL_1)
956#endif /* RCC_D1CCIPR_OCTOSPISEL */
960#endif /* defined(OCTOSPI1) || defined(OCTOSPI2) */
961
962
967#if defined(RCC_D1CCIPR_CKPERSEL)
968#define LL_RCC_CLKP_CLKSOURCE_HSI (0x00000000U)
969#define LL_RCC_CLKP_CLKSOURCE_CSI (RCC_D1CCIPR_CKPERSEL_0)
970#define LL_RCC_CLKP_CLKSOURCE_HSE (RCC_D1CCIPR_CKPERSEL_1)
971#else
972#define LL_RCC_CLKP_CLKSOURCE_HSI (0x00000000U)
973#define LL_RCC_CLKP_CLKSOURCE_CSI (RCC_CDCCIPR_CKPERSEL_0)
974#define LL_RCC_CLKP_CLKSOURCE_HSE (RCC_CDCCIPR_CKPERSEL_1)
975#endif /* RCC_D1CCIPR_CKPERSEL */
984#if defined(RCC_D2CCIP1R_SPI123SEL)
985#define LL_RCC_SPI123_CLKSOURCE_PLL1Q LL_CLKSOURCE(D2CCIP1, RCC_D2CCIP1R_SPI123SEL, RCC_D2CCIP1R_SPI123SEL_Pos, 0x00000000U)
986#define LL_RCC_SPI123_CLKSOURCE_PLL2P LL_CLKSOURCE(D2CCIP1, RCC_D2CCIP1R_SPI123SEL, RCC_D2CCIP1R_SPI123SEL_Pos, RCC_D2CCIP1R_SPI123SEL_0)
987#define LL_RCC_SPI123_CLKSOURCE_PLL3P LL_CLKSOURCE(D2CCIP1, RCC_D2CCIP1R_SPI123SEL, RCC_D2CCIP1R_SPI123SEL_Pos, RCC_D2CCIP1R_SPI123SEL_1)
988#define LL_RCC_SPI123_CLKSOURCE_I2S_CKIN LL_CLKSOURCE(D2CCIP1, RCC_D2CCIP1R_SPI123SEL, RCC_D2CCIP1R_SPI123SEL_Pos, RCC_D2CCIP1R_SPI123SEL_0 | RCC_D2CCIP1R_SPI123SEL_1)
989#define LL_RCC_SPI123_CLKSOURCE_CLKP LL_CLKSOURCE(D2CCIP1, RCC_D2CCIP1R_SPI123SEL, RCC_D2CCIP1R_SPI123SEL_Pos, RCC_D2CCIP1R_SPI123SEL_2)
990#else
991#define LL_RCC_SPI123_CLKSOURCE_PLL1Q LL_CLKSOURCE(CDCCIP1, RCC_CDCCIP1R_SPI123SEL, RCC_CDCCIP1R_SPI123SEL_Pos, 0x00000000U)
992#define LL_RCC_SPI123_CLKSOURCE_PLL2P LL_CLKSOURCE(CDCCIP1, RCC_CDCCIP1R_SPI123SEL, RCC_CDCCIP1R_SPI123SEL_Pos, RCC_CDCCIP1R_SPI123SEL_0)
993#define LL_RCC_SPI123_CLKSOURCE_PLL3P LL_CLKSOURCE(CDCCIP1, RCC_CDCCIP1R_SPI123SEL, RCC_CDCCIP1R_SPI123SEL_Pos, RCC_CDCCIP1R_SPI123SEL_1)
994#define LL_RCC_SPI123_CLKSOURCE_I2S_CKIN LL_CLKSOURCE(CDCCIP1, RCC_CDCCIP1R_SPI123SEL, RCC_CDCCIP1R_SPI123SEL_Pos, RCC_CDCCIP1R_SPI123SEL_0 | RCC_CDCCIP1R_SPI123SEL_1)
995#define LL_RCC_SPI123_CLKSOURCE_CLKP LL_CLKSOURCE(CDCCIP1, RCC_CDCCIP1R_SPI123SEL, RCC_CDCCIP1R_SPI123SEL_Pos, RCC_CDCCIP1R_SPI123SEL_2)
996#endif /* RCC_D2CCIP1R_SPI123SEL */
997#if defined(RCC_D2CCIP1R_SPI45SEL)
998#define LL_RCC_SPI45_CLKSOURCE_PCLK2 LL_CLKSOURCE(D2CCIP1, RCC_D2CCIP1R_SPI45SEL, RCC_D2CCIP1R_SPI45SEL_Pos, 0x00000000U)
999#define LL_RCC_SPI45_CLKSOURCE_PLL2Q LL_CLKSOURCE(D2CCIP1, RCC_D2CCIP1R_SPI45SEL, RCC_D2CCIP1R_SPI45SEL_Pos, RCC_D2CCIP1R_SPI45SEL_0)
1000#define LL_RCC_SPI45_CLKSOURCE_PLL3Q LL_CLKSOURCE(D2CCIP1, RCC_D2CCIP1R_SPI45SEL, RCC_D2CCIP1R_SPI45SEL_Pos, RCC_D2CCIP1R_SPI45SEL_1)
1001#define LL_RCC_SPI45_CLKSOURCE_HSI LL_CLKSOURCE(D2CCIP1, RCC_D2CCIP1R_SPI45SEL, RCC_D2CCIP1R_SPI45SEL_Pos, RCC_D2CCIP1R_SPI45SEL_0 | RCC_D2CCIP1R_SPI45SEL_1)
1002#define LL_RCC_SPI45_CLKSOURCE_CSI LL_CLKSOURCE(D2CCIP1, RCC_D2CCIP1R_SPI45SEL, RCC_D2CCIP1R_SPI45SEL_Pos, RCC_D2CCIP1R_SPI45SEL_2)
1003#define LL_RCC_SPI45_CLKSOURCE_HSE LL_CLKSOURCE(D2CCIP1, RCC_D2CCIP1R_SPI45SEL, RCC_D2CCIP1R_SPI45SEL_Pos, RCC_D2CCIP1R_SPI45SEL_0 | RCC_D2CCIP1R_SPI45SEL_2)
1004#else
1005#define LL_RCC_SPI45_CLKSOURCE_PCLK2 LL_CLKSOURCE(CDCCIP1, RCC_CDCCIP1R_SPI45SEL, RCC_CDCCIP1R_SPI45SEL_Pos, 0x00000000U)
1006#define LL_RCC_SPI45_CLKSOURCE_PLL2Q LL_CLKSOURCE(CDCCIP1, RCC_CDCCIP1R_SPI45SEL, RCC_CDCCIP1R_SPI45SEL_Pos, RCC_CDCCIP1R_SPI45SEL_0)
1007#define LL_RCC_SPI45_CLKSOURCE_PLL3Q LL_CLKSOURCE(CDCCIP1, RCC_CDCCIP1R_SPI45SEL, RCC_CDCCIP1R_SPI45SEL_Pos, RCC_CDCCIP1R_SPI45SEL_1)
1008#define LL_RCC_SPI45_CLKSOURCE_HSI LL_CLKSOURCE(CDCCIP1, RCC_CDCCIP1R_SPI45SEL, RCC_CDCCIP1R_SPI45SEL_Pos, RCC_CDCCIP1R_SPI45SEL_0 | RCC_CDCCIP1R_SPI45SEL_1)
1009#define LL_RCC_SPI45_CLKSOURCE_CSI LL_CLKSOURCE(CDCCIP1, RCC_CDCCIP1R_SPI45SEL, RCC_CDCCIP1R_SPI45SEL_Pos, RCC_CDCCIP1R_SPI45SEL_2)
1010#define LL_RCC_SPI45_CLKSOURCE_HSE LL_CLKSOURCE(CDCCIP1, RCC_CDCCIP1R_SPI45SEL, RCC_CDCCIP1R_SPI45SEL_Pos, RCC_CDCCIP1R_SPI45SEL_0 | RCC_CDCCIP1R_SPI45SEL_2)
1011#endif /* (RCC_D2CCIP1R_SPI45SEL */
1012#if defined(RCC_D3CCIPR_SPI6SEL)
1013#define LL_RCC_SPI6_CLKSOURCE_PCLK4 LL_CLKSOURCE(D3CCIP, RCC_D3CCIPR_SPI6SEL, RCC_D3CCIPR_SPI6SEL_Pos, 0x00000000U)
1014#define LL_RCC_SPI6_CLKSOURCE_PLL2Q LL_CLKSOURCE(D3CCIP, RCC_D3CCIPR_SPI6SEL, RCC_D3CCIPR_SPI6SEL_Pos, RCC_D3CCIPR_SPI6SEL_0)
1015#define LL_RCC_SPI6_CLKSOURCE_PLL3Q LL_CLKSOURCE(D3CCIP, RCC_D3CCIPR_SPI6SEL, RCC_D3CCIPR_SPI6SEL_Pos, RCC_D3CCIPR_SPI6SEL_1)
1016#define LL_RCC_SPI6_CLKSOURCE_HSI LL_CLKSOURCE(D3CCIP, RCC_D3CCIPR_SPI6SEL, RCC_D3CCIPR_SPI6SEL_Pos, RCC_D3CCIPR_SPI6SEL_0 | RCC_D3CCIPR_SPI6SEL_1)
1017#define LL_RCC_SPI6_CLKSOURCE_CSI LL_CLKSOURCE(D3CCIP, RCC_D3CCIPR_SPI6SEL, RCC_D3CCIPR_SPI6SEL_Pos, RCC_D3CCIPR_SPI6SEL_2)
1018#define LL_RCC_SPI6_CLKSOURCE_HSE LL_CLKSOURCE(D3CCIP, RCC_D3CCIPR_SPI6SEL, RCC_D3CCIPR_SPI6SEL_Pos, RCC_D3CCIPR_SPI6SEL_0 | RCC_D3CCIPR_SPI6SEL_2)
1019#else
1020#define LL_RCC_SPI6_CLKSOURCE_PCLK4 LL_CLKSOURCE(SRDCCIP, RCC_SRDCCIPR_SPI6SEL, RCC_SRDCCIPR_SPI6SEL_Pos, 0x00000000U)
1021#define LL_RCC_SPI6_CLKSOURCE_PLL2Q LL_CLKSOURCE(SRDCCIP, RCC_SRDCCIPR_SPI6SEL, RCC_SRDCCIPR_SPI6SEL_Pos, RCC_SRDCCIPR_SPI6SEL_0)
1022#define LL_RCC_SPI6_CLKSOURCE_PLL3Q LL_CLKSOURCE(SRDCCIP, RCC_SRDCCIPR_SPI6SEL, RCC_SRDCCIPR_SPI6SEL_Pos, RCC_SRDCCIPR_SPI6SEL_1)
1023#define LL_RCC_SPI6_CLKSOURCE_HSI LL_CLKSOURCE(SRDCCIP, RCC_SRDCCIPR_SPI6SEL, RCC_SRDCCIPR_SPI6SEL_Pos, RCC_SRDCCIPR_SPI6SEL_0 | RCC_SRDCCIPR_SPI6SEL_1)
1024#define LL_RCC_SPI6_CLKSOURCE_CSI LL_CLKSOURCE(SRDCCIP, RCC_SRDCCIPR_SPI6SEL, RCC_SRDCCIPR_SPI6SEL_Pos, RCC_SRDCCIPR_SPI6SEL_2)
1025#define LL_RCC_SPI6_CLKSOURCE_HSE LL_CLKSOURCE(SRDCCIP, RCC_SRDCCIPR_SPI6SEL, RCC_SRDCCIPR_SPI6SEL_Pos, RCC_SRDCCIPR_SPI6SEL_0 | RCC_SRDCCIPR_SPI6SEL_2)
1026#define LL_RCC_SPI6_CLKSOURCE_I2S_CKIN LL_CLKSOURCE(SRDCCIP, RCC_SRDCCIPR_SPI6SEL, RCC_SRDCCIPR_SPI6SEL_Pos, RCC_SRDCCIPR_SPI6SEL_1 | RCC_SRDCCIPR_SPI6SEL_2)
1027#endif /* RCC_D3CCIPR_SPI6SEL */
1036#if defined(RCC_D2CCIP1R_SPDIFSEL)
1037#define LL_RCC_SPDIF_CLKSOURCE_PLL1Q (0x00000000U)
1038#define LL_RCC_SPDIF_CLKSOURCE_PLL2R (RCC_D2CCIP1R_SPDIFSEL_0)
1039#define LL_RCC_SPDIF_CLKSOURCE_PLL3R (RCC_D2CCIP1R_SPDIFSEL_1)
1040#define LL_RCC_SPDIF_CLKSOURCE_HSI (RCC_D2CCIP1R_SPDIFSEL_0 | RCC_D2CCIP1R_SPDIFSEL_1)
1041#else
1042#define LL_RCC_SPDIF_CLKSOURCE_PLL1Q (0x00000000U)
1043#define LL_RCC_SPDIF_CLKSOURCE_PLL2R (RCC_CDCCIP1R_SPDIFSEL_0)
1044#define LL_RCC_SPDIF_CLKSOURCE_PLL3R (RCC_CDCCIP1R_SPDIFSEL_1)
1045#define LL_RCC_SPDIF_CLKSOURCE_HSI (RCC_CDCCIP1R_SPDIFSEL_0 | RCC_CDCCIP1R_SPDIFSEL_1)
1046#endif /* RCC_D2CCIP1R_SPDIFSEL */
1051#if defined(FDCAN1) || defined(FDCAN2)
1056#if defined(RCC_D2CCIP1R_FDCANSEL)
1057#define LL_RCC_FDCAN_CLKSOURCE_HSE (0x00000000U)
1058#define LL_RCC_FDCAN_CLKSOURCE_PLL1Q (RCC_D2CCIP1R_FDCANSEL_0)
1059#define LL_RCC_FDCAN_CLKSOURCE_PLL2Q (RCC_D2CCIP1R_FDCANSEL_1)
1060#else
1061#define LL_RCC_FDCAN_CLKSOURCE_HSE (0x00000000U)
1062#define LL_RCC_FDCAN_CLKSOURCE_PLL1Q (RCC_CDCCIP1R_FDCANSEL_0)
1063#define LL_RCC_FDCAN_CLKSOURCE_PLL2Q (RCC_CDCCIP1R_FDCANSEL_1)
1064#endif /* RCC_D2CCIP1R_FDCANSEL */
1068#endif /*FDCAN1 || FDCAN2*/
1069
1074#if defined(RCC_D2CCIP1R_SWPSEL)
1075#define LL_RCC_SWP_CLKSOURCE_PCLK1 (0x00000000U)
1076#define LL_RCC_SWP_CLKSOURCE_HSI (RCC_D2CCIP1R_SWPSEL)
1077#else
1078#define LL_RCC_SWP_CLKSOURCE_PCLK1 (0x00000000U)
1079#define LL_RCC_SWP_CLKSOURCE_HSI (RCC_CDCCIP1R_SWPSEL)
1080#endif /* RCC_D2CCIP1R_SWPSEL */
1089#if defined(RCC_D3CCIPR_ADCSEL)
1090#define LL_RCC_ADC_CLKSOURCE_PLL2P (0x00000000U)
1091#define LL_RCC_ADC_CLKSOURCE_PLL3R (RCC_D3CCIPR_ADCSEL_0)
1092#define LL_RCC_ADC_CLKSOURCE_CLKP (RCC_D3CCIPR_ADCSEL_1)
1093#else
1094#define LL_RCC_ADC_CLKSOURCE_PLL2P (0x00000000U)
1095#define LL_RCC_ADC_CLKSOURCE_PLL3R (RCC_SRDCCIPR_ADCSEL_0)
1096#define LL_RCC_ADC_CLKSOURCE_CLKP (RCC_SRDCCIPR_ADCSEL_1)
1097#endif /* RCC_D3CCIPR_ADCSEL */
1106#if defined (RCC_D2CCIP2R_USART16SEL)
1107#define LL_RCC_USART16_CLKSOURCE LL_CLKSOURCE(D2CCIP2, RCC_D2CCIP2R_USART16SEL, RCC_D2CCIP2R_USART16SEL_Pos, 0x00000000U)
1108#elif defined (RCC_D2CCIP2R_USART16910SEL)
1109#define LL_RCC_USART16_CLKSOURCE LL_CLKSOURCE(D2CCIP2, RCC_D2CCIP2R_USART16910SEL, RCC_D2CCIP2R_USART16910SEL_Pos, 0x00000000U)
1110/* alias*/
1111#define LL_RCC_USART16910_CLKSOURCE LL_RCC_USART16_CLKSOURCE
1112#else
1113#define LL_RCC_USART16_CLKSOURCE LL_CLKSOURCE(CDCCIP2, RCC_CDCCIP2R_USART16910SEL, RCC_CDCCIP2R_USART16910SEL_Pos, 0x00000000U)
1114/* alias*/
1115#define LL_RCC_USART16910_CLKSOURCE LL_RCC_USART16_CLKSOURCE
1116#endif /* RCC_D2CCIP2R_USART16SEL */
1117#if defined (RCC_D2CCIP2R_USART28SEL)
1118#define LL_RCC_USART234578_CLKSOURCE LL_CLKSOURCE(D2CCIP2, RCC_D2CCIP2R_USART28SEL, RCC_D2CCIP2R_USART28SEL_Pos, 0x00000000U)
1119#else
1120#define LL_RCC_USART234578_CLKSOURCE LL_CLKSOURCE(CDCCIP2, RCC_CDCCIP2R_USART234578SEL, RCC_CDCCIP2R_USART234578SEL_Pos, 0x00000000U)
1121#endif /* RCC_D2CCIP2R_USART28SEL */
1130#if defined(RCC_D3CCIPR_LPUART1SEL)
1131#define LL_RCC_LPUART1_CLKSOURCE RCC_D3CCIPR_LPUART1SEL
1132#else
1133#define LL_RCC_LPUART1_CLKSOURCE RCC_SRDCCIPR_LPUART1SEL
1134#endif /* RCC_D3CCIPR_LPUART1SEL */
1143#if defined(RCC_D2CCIP2R_I2C123SEL)
1144#define LL_RCC_I2C123_CLKSOURCE LL_CLKSOURCE(D2CCIP2, RCC_D2CCIP2R_I2C123SEL, RCC_D2CCIP2R_I2C123SEL_Pos, 0x00000000U)
1145/* alias */
1146#define LL_RCC_I2C1235_CLKSOURCE LL_RCC_I2C123_CLKSOURCE
1147#elif defined(RCC_D2CCIP2R_I2C1235SEL)
1148#define LL_RCC_I2C1235_CLKSOURCE LL_CLKSOURCE(D2CCIP2, RCC_D2CCIP2R_I2C1235SEL, RCC_D2CCIP2R_I2C1235SEL_Pos, 0x00000000U)
1149/* alias */
1150#define LL_RCC_I2C123_CLKSOURCE LL_RCC_I2C1235_CLKSOURCE
1151#else
1152#define LL_RCC_I2C123_CLKSOURCE LL_CLKSOURCE(CDCCIP2, RCC_CDCCIP2R_I2C123SEL, RCC_CDCCIP2R_I2C123SEL_Pos, 0x00000000U)
1153/* alias */
1154#define LL_RCC_I2C1235_CLKSOURCE LL_RCC_I2C123_CLKSOURCE
1155#endif /* RCC_D2CCIP2R_I2C123SEL */
1156#if defined(RCC_D3CCIPR_I2C4SEL)
1157#define LL_RCC_I2C4_CLKSOURCE LL_CLKSOURCE(D3CCIP, RCC_D3CCIPR_I2C4SEL, RCC_D3CCIPR_I2C4SEL_Pos, 0x00000000U)
1158#else
1159#define LL_RCC_I2C4_CLKSOURCE LL_CLKSOURCE(SRDCCIP, RCC_SRDCCIPR_I2C4SEL, RCC_SRDCCIPR_I2C4SEL_Pos, 0x00000000U)
1160#endif /* RCC_D3CCIPR_I2C4SEL */
1169#if defined(RCC_D2CCIP2R_LPTIM1SEL)
1170#define LL_RCC_LPTIM1_CLKSOURCE LL_CLKSOURCE(D2CCIP2, RCC_D2CCIP2R_LPTIM1SEL, RCC_D2CCIP2R_LPTIM1SEL_Pos, 0x00000000U)
1171#else
1172#define LL_RCC_LPTIM1_CLKSOURCE LL_CLKSOURCE(CDCCIP2, RCC_CDCCIP2R_LPTIM1SEL, RCC_CDCCIP2R_LPTIM1SEL_Pos, 0x00000000U)
1173#endif /* RCC_D2CCIP2R_LPTIM1SEL) */
1174#if defined(RCC_D3CCIPR_LPTIM2SEL)
1175#define LL_RCC_LPTIM2_CLKSOURCE LL_CLKSOURCE(D3CCIP, RCC_D3CCIPR_LPTIM2SEL, RCC_D3CCIPR_LPTIM2SEL_Pos, 0x00000000U)
1176#else
1177#define LL_RCC_LPTIM2_CLKSOURCE LL_CLKSOURCE(SRDCCIP, RCC_SRDCCIPR_LPTIM2SEL, RCC_SRDCCIPR_LPTIM2SEL_Pos, 0x00000000U)
1178#endif /* RCC_D3CCIPR_LPTIM2SEL */
1179#if defined(RCC_D3CCIPR_LPTIM345SEL)
1180#define LL_RCC_LPTIM345_CLKSOURCE LL_CLKSOURCE(D3CCIP, RCC_D3CCIPR_LPTIM345SEL, RCC_D3CCIPR_LPTIM345SEL_Pos, 0x00000000U)
1181#else
1182#define LL_RCC_LPTIM345_CLKSOURCE LL_CLKSOURCE(SRDCCIP, RCC_SRDCCIPR_LPTIM3SEL, RCC_SRDCCIPR_LPTIM3SEL_Pos, 0x00000000U)
1183#define LL_RCC_LPTIM3_CLKSOURCE LL_RCC_LPTIM345_CLKSOURCE /* alias */
1184#endif /* RCC_D3CCIPR_LPTIM345SEL */
1193#if defined(RCC_D2CCIP1R_SAI1SEL)
1194#define LL_RCC_SAI1_CLKSOURCE LL_CLKSOURCE(D2CCIP1, RCC_D2CCIP1R_SAI1SEL, RCC_D2CCIP1R_SAI1SEL_Pos, 0x00000000U)
1195#else
1196#define LL_RCC_SAI1_CLKSOURCE LL_CLKSOURCE(CDCCIP1, RCC_CDCCIP1R_SAI1SEL, RCC_CDCCIP1R_SAI1SEL_Pos, 0x00000000U)
1197#endif /* RCC_D2CCIP1R_SAI1SEL */
1198#if defined(RCC_D2CCIP1R_SAI23SEL)
1199#define LL_RCC_SAI23_CLKSOURCE LL_CLKSOURCE(D2CCIP1, RCC_D2CCIP1R_SAI23SEL, RCC_D2CCIP1R_SAI23SEL_Pos, 0x00000000U)
1200#endif /* RCC_D2CCIP1R_SAI23SEL */
1201#if defined(RCC_CDCCIP1R_SAI2ASEL)
1202#define LL_RCC_SAI2A_CLKSOURCE LL_CLKSOURCE(CDCCIP1, RCC_CDCCIP1R_SAI2ASEL, RCC_CDCCIP1R_SAI2ASEL_Pos, 0x00000000U)
1203#endif /* RCC_CDCCIP1R_SAI2ASEL */
1204#if defined(RCC_CDCCIP1R_SAI2BSEL)
1205#define LL_RCC_SAI2B_CLKSOURCE LL_CLKSOURCE(CDCCIP1, RCC_CDCCIP1R_SAI2BSEL, RCC_CDCCIP1R_SAI2BSEL_Pos, 0x00000000U)
1206#endif /* RCC_CDCCIP1R_SAI2BSEL */
1207#if defined(RCC_D3CCIPR_SAI4ASEL)
1208#define LL_RCC_SAI4A_CLKSOURCE LL_CLKSOURCE(D3CCIP, RCC_D3CCIPR_SAI4ASEL, RCC_D3CCIPR_SAI4ASEL_Pos, 0x00000000U)
1209#endif /* RCC_D3CCIPR_SAI4ASEL */
1210#if defined(RCC_D3CCIPR_SAI4BSEL)
1211#define LL_RCC_SAI4B_CLKSOURCE LL_CLKSOURCE(D3CCIP, RCC_D3CCIPR_SAI4BSEL, RCC_D3CCIPR_SAI4BSEL_Pos, 0x00000000U)
1212#endif /* RCC_D3CCIPR_SAI4BSEL */
1221#if defined(RCC_D1CCIPR_SDMMCSEL)
1222#define LL_RCC_SDMMC_CLKSOURCE RCC_D1CCIPR_SDMMCSEL
1223#else
1224#define LL_RCC_SDMMC_CLKSOURCE RCC_CDCCIPR_SDMMCSEL
1225#endif /* RCC_D1CCIPR_SDMMCSEL */
1234#if (RCC_D2CCIP2R_RNGSEL)
1235#define LL_RCC_RNG_CLKSOURCE RCC_D2CCIP2R_RNGSEL
1236#else
1237#define LL_RCC_RNG_CLKSOURCE RCC_CDCCIP2R_RNGSEL
1238#endif /* RCC_D2CCIP2R_RNGSEL */
1247#if (RCC_D2CCIP2R_USBSEL)
1248#define LL_RCC_USB_CLKSOURCE RCC_D2CCIP2R_USBSEL
1249#else
1250#define LL_RCC_USB_CLKSOURCE RCC_CDCCIP2R_USBSEL
1251#endif /* RCC_D2CCIP2R_USBSEL */
1260#if (RCC_D2CCIP2R_CECSEL)
1261#define LL_RCC_CEC_CLKSOURCE RCC_D2CCIP2R_CECSEL
1262#else
1263#define LL_RCC_CEC_CLKSOURCE RCC_CDCCIP2R_CECSEL
1264#endif /* RCC_D2CCIP2R_CECSEL */
1269#if defined(DSI)
1274#define LL_RCC_DSI_CLKSOURCE RCC_D1CCIPR_DSISEL
1278#endif /* DSI */
1279
1284#if defined(RCC_D2CCIP1R_DFSDM1SEL)
1285#define LL_RCC_DFSDM1_CLKSOURCE RCC_D2CCIP1R_DFSDM1SEL
1286#else
1287#define LL_RCC_DFSDM1_CLKSOURCE RCC_CDCCIP1R_DFSDM1SEL
1288#endif /* RCC_D2CCIP1R_DFSDM1SEL */
1293#if defined(DFSDM2_BASE)
1298#define LL_RCC_DFSDM2_CLKSOURCE RCC_SRDCCIPR_DFSDM2SEL
1302#endif /* DFSDM2_BASE */
1303
1304
1305
1310#if defined(RCC_D1CCIPR_FMCSEL)
1311#define LL_RCC_FMC_CLKSOURCE RCC_D1CCIPR_FMCSEL
1312#else
1313#define LL_RCC_FMC_CLKSOURCE RCC_CDCCIPR_FMCSEL
1314#endif
1319#if defined(QUADSPI)
1324#define LL_RCC_QSPI_CLKSOURCE RCC_D1CCIPR_QSPISEL
1328#endif /* QUADSPI */
1329
1330#if defined(OCTOSPI1) || defined(OCTOSPI2)
1335#if defined(RCC_CDCCIPR_OCTOSPISEL)
1336#define LL_RCC_OSPI_CLKSOURCE RCC_CDCCIPR_OCTOSPISEL
1337#else
1338#define LL_RCC_OSPI_CLKSOURCE RCC_D1CCIPR_OCTOSPISEL
1339#endif /* RCC_CDCCIPR_OCTOSPISEL */
1343#endif /* OCTOSPI1 || OCTOSPI2 */
1344
1349#if defined(RCC_D1CCIPR_CKPERSEL)
1350#define LL_RCC_CLKP_CLKSOURCE RCC_D1CCIPR_CKPERSEL
1351#else
1352#define LL_RCC_CLKP_CLKSOURCE RCC_CDCCIPR_CKPERSEL
1353#endif /* RCC_D1CCIPR_CKPERSEL */
1362#if defined(RCC_D2CCIP1R_SPI123SEL)
1363#define LL_RCC_SPI123_CLKSOURCE LL_CLKSOURCE(D2CCIP1, RCC_D2CCIP1R_SPI123SEL, RCC_D2CCIP1R_SPI123SEL_Pos, 0x00000000U)
1364#else
1365#define LL_RCC_SPI123_CLKSOURCE LL_CLKSOURCE(CDCCIP1, RCC_CDCCIP1R_SPI123SEL, RCC_CDCCIP1R_SPI123SEL_Pos, 0x00000000U)
1366#endif /* RCC_D2CCIP1R_SPI123SEL */
1367#if defined(RCC_D2CCIP1R_SPI45SEL)
1368#define LL_RCC_SPI45_CLKSOURCE LL_CLKSOURCE(D2CCIP1, RCC_D2CCIP1R_SPI45SEL, RCC_D2CCIP1R_SPI45SEL_Pos, 0x00000000U)
1369#else
1370#define LL_RCC_SPI45_CLKSOURCE LL_CLKSOURCE(CDCCIP1, RCC_CDCCIP1R_SPI45SEL, RCC_CDCCIP1R_SPI45SEL_Pos, 0x00000000U)
1371#endif /* RCC_D2CCIP1R_SPI45SEL */
1372#if defined(RCC_D3CCIPR_SPI6SEL)
1373#define LL_RCC_SPI6_CLKSOURCE LL_CLKSOURCE(D3CCIP, RCC_D3CCIPR_SPI6SEL, RCC_D3CCIPR_SPI6SEL_Pos, 0x00000000U)
1374#else
1375#define LL_RCC_SPI6_CLKSOURCE LL_CLKSOURCE(SRDCCIP, RCC_SRDCCIPR_SPI6SEL, RCC_SRDCCIPR_SPI6SEL_Pos, 0x00000000U)
1376#endif /* RCC_D3CCIPR_SPI6SEL */
1385#if defined(RCC_D2CCIP1R_SPDIFSEL)
1386#define LL_RCC_SPDIF_CLKSOURCE RCC_D2CCIP1R_SPDIFSEL
1387#else
1388#define LL_RCC_SPDIF_CLKSOURCE RCC_CDCCIP1R_SPDIFSEL
1389#endif /* RCC_D2CCIP1R_SPDIFSEL */
1394#if defined(FDCAN1) || defined(FDCAN2)
1399#if defined(RCC_D2CCIP1R_FDCANSEL)
1400#define LL_RCC_FDCAN_CLKSOURCE RCC_D2CCIP1R_FDCANSEL
1401#else
1402#define LL_RCC_FDCAN_CLKSOURCE RCC_CDCCIP1R_FDCANSEL
1403#endif
1407#endif /*FDCAN1 || FDCAN2*/
1408
1413#if defined(RCC_D2CCIP1R_SWPSEL)
1414#define LL_RCC_SWP_CLKSOURCE RCC_D2CCIP1R_SWPSEL
1415#else
1416#define LL_RCC_SWP_CLKSOURCE RCC_CDCCIP1R_SWPSEL
1417#endif /* RCC_D2CCIP1R_SWPSEL */
1426#if defined(RCC_D3CCIPR_ADCSEL)
1427#define LL_RCC_ADC_CLKSOURCE RCC_D3CCIPR_ADCSEL
1428#else
1429#define LL_RCC_ADC_CLKSOURCE RCC_SRDCCIPR_ADCSEL
1430#endif /* RCC_D3CCIPR_ADCSEL */
1439#define LL_RCC_RTC_CLKSOURCE_NONE (uint32_t)(0x00000000U)
1440#define LL_RCC_RTC_CLKSOURCE_LSE (uint32_t)(RCC_BDCR_RTCSEL_0)
1441#define LL_RCC_RTC_CLKSOURCE_LSI (uint32_t)(RCC_BDCR_RTCSEL_1)
1442#define LL_RCC_RTC_CLKSOURCE_HSE (uint32_t)(RCC_BDCR_RTCSEL_0 | RCC_BDCR_RTCSEL_1)
1451#define LL_RCC_TIM_PRESCALER_TWICE (uint32_t)(0x00000000U)
1452#define LL_RCC_TIM_PRESCALER_FOUR_TIMES (uint32_t)(RCC_CFGR_TIMPRE)
1457#if defined(HRTIM1)
1462#define LL_RCC_HRTIM_CLKSOURCE_TIM (uint32_t)(0x00000000U) /* HRTIM Clock source is same as other timers */
1463#define LL_RCC_HRTIM_CLKSOURCE_CPU (uint32_t)(RCC_CFGR_HRTIMSEL) /* HRTIM Clock source is the CPU clock */
1467#endif /* HRTIM1 */
1468
1473#define LL_RCC_PLLSOURCE_HSI RCC_PLLCKSELR_PLLSRC_HSI
1474#define LL_RCC_PLLSOURCE_CSI RCC_PLLCKSELR_PLLSRC_CSI
1475#define LL_RCC_PLLSOURCE_HSE RCC_PLLCKSELR_PLLSRC_HSE
1476#define LL_RCC_PLLSOURCE_NONE RCC_PLLCKSELR_PLLSRC_NONE
1485#define LL_RCC_PLLINPUTRANGE_1_2 (uint32_t)(0x00000000U)
1486#define LL_RCC_PLLINPUTRANGE_2_4 (uint32_t)(0x00000001)
1487#define LL_RCC_PLLINPUTRANGE_4_8 (uint32_t)(0x00000002)
1488#define LL_RCC_PLLINPUTRANGE_8_16 (uint32_t)(0x00000003)
1497#define LL_RCC_PLLVCORANGE_WIDE (uint32_t)(0x00000000U) /* VCO output range: 192 to 836 MHz OR 128 to 544 MHz (*) */
1498#define LL_RCC_PLLVCORANGE_MEDIUM (uint32_t)(0x00000001) /* VCO output range: 150 to 420 MHz */
1508/* Exported macro ------------------------------------------------------------*/
1525#define LL_RCC_WriteReg(__REG__, __VALUE__) WRITE_REG(RCC->__REG__, (__VALUE__))
1526
1532#define LL_RCC_ReadReg(__REG__) READ_REG(RCC->__REG__)
1557#if defined(RCC_D1CFGR_D1CPRE)
1558#define LL_RCC_CALC_SYSCLK_FREQ(__SYSINPUTCLKFREQ__, __SYSPRESCALER__) ((__SYSINPUTCLKFREQ__) >> ((LL_RCC_PrescTable[((__SYSPRESCALER__) & RCC_D1CFGR_D1CPRE) >> RCC_D1CFGR_D1CPRE_Pos]) & 0x1FU))
1559#else
1560#define LL_RCC_CALC_SYSCLK_FREQ(__SYSINPUTCLKFREQ__, __SYSPRESCALER__) ((__SYSINPUTCLKFREQ__) >> ((LL_RCC_PrescTable[((__SYSPRESCALER__) & RCC_CDCFGR1_CDCPRE) >> RCC_CDCFGR1_CDCPRE_Pos]) & 0x1FU))
1561#endif /* RCC_D1CFGR_D1CPRE */
1562
1578#if defined(RCC_D1CFGR_HPRE)
1579#define LL_RCC_CALC_HCLK_FREQ(__SYSCLKFREQ__, __HPRESCALER__) ((__SYSCLKFREQ__) >> ((LL_RCC_PrescTable[((__HPRESCALER__) & RCC_D1CFGR_HPRE) >> RCC_D1CFGR_HPRE_Pos]) & 0x1FU))
1580#else
1581#define LL_RCC_CALC_HCLK_FREQ(__SYSCLKFREQ__, __HPRESCALER__) ((__SYSCLKFREQ__) >> ((LL_RCC_PrescTable[((__HPRESCALER__) & RCC_CDCFGR1_HPRE) >> RCC_CDCFGR1_HPRE_Pos]) & 0x1FU))
1582#endif /* RCC_D1CFGR_HPRE */
1583
1595#if defined(RCC_D2CFGR_D2PPRE1)
1596#define LL_RCC_CALC_PCLK1_FREQ(__HCLKFREQ__, __APB1PRESCALER__) ((__HCLKFREQ__) >> ((LL_RCC_PrescTable[((__APB1PRESCALER__) & RCC_D2CFGR_D2PPRE1) >> RCC_D2CFGR_D2PPRE1_Pos]) & 0x1FU))
1597#else
1598#define LL_RCC_CALC_PCLK1_FREQ(__HCLKFREQ__, __APB1PRESCALER__) ((__HCLKFREQ__) >> ((LL_RCC_PrescTable[((__APB1PRESCALER__) & RCC_CDCFGR2_CDPPRE1) >> RCC_CDCFGR2_CDPPRE1_Pos]) & 0x1FU))
1599#endif /* RCC_D2CFGR_D2PPRE1 */
1600
1612#if defined(RCC_D2CFGR_D2PPRE2)
1613#define LL_RCC_CALC_PCLK2_FREQ(__HCLKFREQ__, __APB2PRESCALER__) ((__HCLKFREQ__) >> ((LL_RCC_PrescTable[((__APB2PRESCALER__) & RCC_D2CFGR_D2PPRE2) >> RCC_D2CFGR_D2PPRE2_Pos]) & 0x1FU))
1614#else
1615#define LL_RCC_CALC_PCLK2_FREQ(__HCLKFREQ__, __APB2PRESCALER__) ((__HCLKFREQ__) >> ((LL_RCC_PrescTable[((__APB2PRESCALER__) & RCC_CDCFGR2_CDPPRE2) >> RCC_CDCFGR2_CDPPRE2_Pos]) & 0x1FU))
1616#endif /* RCC_D2CFGR_D2PPRE2 */
1617
1629#if defined(RCC_D1CFGR_D1PPRE)
1630#define LL_RCC_CALC_PCLK3_FREQ(__HCLKFREQ__, __APB3PRESCALER__) ((__HCLKFREQ__) >> ((LL_RCC_PrescTable[((__APB3PRESCALER__) & RCC_D1CFGR_D1PPRE) >> RCC_D1CFGR_D1PPRE_Pos]) & 0x1FU))
1631#else
1632#define LL_RCC_CALC_PCLK3_FREQ(__HCLKFREQ__, __APB3PRESCALER__) ((__HCLKFREQ__) >> ((LL_RCC_PrescTable[((__APB3PRESCALER__) & RCC_CDCFGR1_CDPPRE) >> RCC_CDCFGR1_CDPPRE_Pos]) & 0x1FU))
1633#endif /* RCC_D1CFGR_D1PPRE */
1634
1646#if defined(RCC_D3CFGR_D3PPRE)
1647#define LL_RCC_CALC_PCLK4_FREQ(__HCLKFREQ__, __APB4PRESCALER__) ((__HCLKFREQ__) >> ((LL_RCC_PrescTable[((__APB4PRESCALER__) & RCC_D3CFGR_D3PPRE) >> RCC_D3CFGR_D3PPRE_Pos]) & 0x1FU))
1648#else
1649#define LL_RCC_CALC_PCLK4_FREQ(__HCLKFREQ__, __APB4PRESCALER__) ((__HCLKFREQ__) >> ((LL_RCC_PrescTable[((__APB4PRESCALER__) & RCC_SRDCFGR_SRDPPRE) >> RCC_SRDCFGR_SRDPPRE_Pos]) & 0x1FU))
1650#endif /* RCC_D3CFGR_D3PPRE */
1651
1656#if defined(USE_FULL_LL_DRIVER) || defined(__rtems__)
1661#define LL_RCC_PERIPH_FREQUENCY_NO 0x00000000U
1662#define LL_RCC_PERIPH_FREQUENCY_NA 0xFFFFFFFFU
1666#endif /* USE_FULL_LL_DRIVER */
1667
1672/* Exported functions --------------------------------------------------------*/
1690__STATIC_INLINE void LL_RCC_HSE_EnableCSS(void)
1691{
1692 SET_BIT(RCC->CR, RCC_CR_CSSHSEON);
1693}
1694
1700__STATIC_INLINE void LL_RCC_HSE_EnableBypass(void)
1701{
1702 SET_BIT(RCC->CR, RCC_CR_HSEBYP);
1703}
1704
1710__STATIC_INLINE void LL_RCC_HSE_DisableBypass(void)
1711{
1712 CLEAR_BIT(RCC->CR, RCC_CR_HSEBYP);
1713}
1714
1715#if defined(RCC_CR_HSEEXT)
1721__STATIC_INLINE void LL_RCC_HSE_SelectAnalogClock(void)
1722{
1723 CLEAR_BIT(RCC->CR, RCC_CR_HSEEXT);
1724}
1725
1731__STATIC_INLINE void LL_RCC_HSE_SelectDigitalClock(void)
1732{
1733 SET_BIT(RCC->CR, RCC_CR_HSEEXT);
1734}
1735#endif /* RCC_CR_HSEEXT */
1736
1742__STATIC_INLINE void LL_RCC_HSE_Enable(void)
1743{
1744 SET_BIT(RCC->CR, RCC_CR_HSEON);
1745}
1746
1752__STATIC_INLINE void LL_RCC_HSE_Disable(void)
1753{
1754 CLEAR_BIT(RCC->CR, RCC_CR_HSEON);
1755}
1756
1762__STATIC_INLINE uint32_t LL_RCC_HSE_IsReady(void)
1763{
1764 return ((READ_BIT(RCC->CR, RCC_CR_HSERDY) == (RCC_CR_HSERDY)) ? 1UL : 0UL);
1765}
1766
1781__STATIC_INLINE void LL_RCC_HSI_Enable(void)
1782{
1783 SET_BIT(RCC->CR, RCC_CR_HSION);
1784}
1785
1791__STATIC_INLINE void LL_RCC_HSI_Disable(void)
1792{
1793 CLEAR_BIT(RCC->CR, RCC_CR_HSION);
1794}
1795
1801__STATIC_INLINE uint32_t LL_RCC_HSI_IsReady(void)
1802{
1803 return ((READ_BIT(RCC->CR, RCC_CR_HSIRDY) == (RCC_CR_HSIRDY)) ? 1UL : 0UL);
1804}
1805
1811__STATIC_INLINE uint32_t LL_RCC_HSI_IsDividerReady(void)
1812{
1813 return ((READ_BIT(RCC->CR, RCC_CR_HSIDIVF) == (RCC_CR_HSIDIVF)) ? 1UL : 0UL);
1814}
1815
1826__STATIC_INLINE void LL_RCC_HSI_SetDivider(uint32_t Divider)
1827{
1828 MODIFY_REG(RCC->CR, RCC_CR_HSIDIV, Divider);
1829}
1830
1840__STATIC_INLINE uint32_t LL_RCC_HSI_GetDivider(void)
1841{
1842 return (READ_BIT(RCC->CR, RCC_CR_HSIDIV));
1843}
1844
1850__STATIC_INLINE void LL_RCC_HSI_EnableStopMode(void)
1851{
1852 SET_BIT(RCC->CR, RCC_CR_HSIKERON);
1853}
1854
1860__STATIC_INLINE void LL_RCC_HSI_DisableStopMode(void)
1861{
1862 CLEAR_BIT(RCC->CR, RCC_CR_HSIKERON);
1863}
1864
1872__STATIC_INLINE uint32_t LL_RCC_HSI_GetCalibration(void)
1873{
1874 return (uint32_t)(READ_BIT(RCC->HSICFGR, RCC_HSICFGR_HSICAL) >> RCC_HSICFGR_HSICAL_Pos);
1875}
1876
1886__STATIC_INLINE void LL_RCC_HSI_SetCalibTrimming(uint32_t Value)
1887{
1888#if defined(RCC_VER_X)
1889 if ((DBGMCU->IDCODE & 0xF0000000U) == 0x10000000U)
1890 {
1891 /* STM32H7 Rev.Y */
1892 MODIFY_REG(RCC->HSICFGR, 0x3F000U, Value << 12U);
1893 }
1894 else
1895 {
1896 /* STM32H7 Rev.V */
1897 MODIFY_REG(RCC->HSICFGR, RCC_HSICFGR_HSITRIM, Value << RCC_HSICFGR_HSITRIM_Pos);
1898 }
1899#else
1900 MODIFY_REG(RCC->HSICFGR, RCC_HSICFGR_HSITRIM, Value << RCC_HSICFGR_HSITRIM_Pos);
1901#endif /* RCC_VER_X */
1902}
1903
1909__STATIC_INLINE uint32_t LL_RCC_HSI_GetCalibTrimming(void)
1910{
1911#if defined(RCC_VER_X)
1912 if ((DBGMCU->IDCODE & 0xF0000000U) == 0x10000000U)
1913 {
1914 /* STM32H7 Rev.Y */
1915 return (uint32_t)(READ_BIT(RCC->HSICFGR, 0x3F000U) >> 12U);
1916 }
1917 else
1918 {
1919 /* STM32H7 Rev.V */
1920 return (uint32_t)(READ_BIT(RCC->HSICFGR, RCC_HSICFGR_HSITRIM) >> RCC_HSICFGR_HSITRIM_Pos);
1921 }
1922#else
1923 return (uint32_t)(READ_BIT(RCC->HSICFGR, RCC_HSICFGR_HSITRIM) >> RCC_HSICFGR_HSITRIM_Pos);
1924#endif /* RCC_VER_X */
1925}
1926
1941__STATIC_INLINE void LL_RCC_CSI_Enable(void)
1942{
1943 SET_BIT(RCC->CR, RCC_CR_CSION);
1944}
1945
1951__STATIC_INLINE void LL_RCC_CSI_Disable(void)
1952{
1953 CLEAR_BIT(RCC->CR, RCC_CR_CSION);
1954}
1955
1961__STATIC_INLINE uint32_t LL_RCC_CSI_IsReady(void)
1962{
1963 return ((READ_BIT(RCC->CR, RCC_CR_CSIRDY) == (RCC_CR_CSIRDY)) ? 1UL : 0UL);
1964}
1965
1971__STATIC_INLINE void LL_RCC_CSI_EnableStopMode(void)
1972{
1973 SET_BIT(RCC->CR, RCC_CR_CSIKERON);
1974}
1975
1981__STATIC_INLINE void LL_RCC_CSI_DisableStopMode(void)
1982{
1983 CLEAR_BIT(RCC->CR, RCC_CR_CSIKERON);
1984}
1985
1993__STATIC_INLINE uint32_t LL_RCC_CSI_GetCalibration(void)
1994{
1995#if defined(RCC_VER_X)
1996 if ((DBGMCU->IDCODE & 0xF0000000U) == 0x10000000U)
1997 {
1998 /* STM32H7 Rev.Y */
1999 return (uint32_t)(READ_BIT(RCC->HSICFGR, 0x3FC0000U) >> 18U);
2000 }
2001 else
2002 {
2003 /* STM32H7 Rev.V */
2004 return (uint32_t)(READ_BIT(RCC->CSICFGR, RCC_CSICFGR_CSICAL) >> RCC_CSICFGR_CSICAL_Pos);
2005 }
2006#else
2007 return (uint32_t)(READ_BIT(RCC->CSICFGR, RCC_CSICFGR_CSICAL) >> RCC_CSICFGR_CSICAL_Pos);
2008#endif /* RCC_VER_X */
2009}
2010
2020__STATIC_INLINE void LL_RCC_CSI_SetCalibTrimming(uint32_t Value)
2021{
2022#if defined(RCC_VER_X)
2023 if ((DBGMCU->IDCODE & 0xF0000000U) == 0x10000000U)
2024 {
2025 /* STM32H7 Rev.Y */
2026 MODIFY_REG(RCC->HSICFGR, 0x7C000000U, Value << 26U);
2027 }
2028 else
2029 {
2030 /* STM32H7 Rev.V */
2031 MODIFY_REG(RCC->CSICFGR, RCC_CSICFGR_CSITRIM, Value << RCC_CSICFGR_CSITRIM_Pos);
2032 }
2033#else
2034 MODIFY_REG(RCC->CSICFGR, RCC_CSICFGR_CSITRIM, Value << RCC_CSICFGR_CSITRIM_Pos);
2035#endif /* RCC_VER_X */
2036}
2037
2043__STATIC_INLINE uint32_t LL_RCC_CSI_GetCalibTrimming(void)
2044{
2045#if defined(RCC_VER_X)
2046 if ((DBGMCU->IDCODE & 0xF0000000U) == 0x10000000U)
2047 {
2048 /* STM32H7 Rev.Y */
2049 return (uint32_t)(READ_BIT(RCC->HSICFGR, 0x7C000000U) >> 26U);
2050 }
2051 else
2052 {
2053 /* STM32H7 Rev.V */
2054 return (uint32_t)(READ_BIT(RCC->CSICFGR, RCC_CSICFGR_CSITRIM) >> RCC_CSICFGR_CSITRIM_Pos);
2055 }
2056#else
2057 return (uint32_t)(READ_BIT(RCC->CSICFGR, RCC_CSICFGR_CSITRIM) >> RCC_CSICFGR_CSITRIM_Pos);
2058#endif /* RCC_VER_X */
2059}
2060
2075__STATIC_INLINE void LL_RCC_HSI48_Enable(void)
2076{
2077 SET_BIT(RCC->CR, RCC_CR_HSI48ON);
2078}
2079
2085__STATIC_INLINE void LL_RCC_HSI48_Disable(void)
2086{
2087 CLEAR_BIT(RCC->CR, RCC_CR_HSI48ON);
2088}
2089
2095__STATIC_INLINE uint32_t LL_RCC_HSI48_IsReady(void)
2096{
2097 return ((READ_BIT(RCC->CR, RCC_CR_HSI48RDY) == (RCC_CR_HSI48RDY)) ? 1UL : 0UL);
2098}
2099
2107__STATIC_INLINE uint32_t LL_RCC_HSI48_GetCalibration(void)
2108{
2109 return (uint32_t)(READ_BIT(RCC->CRRCR, RCC_CRRCR_HSI48CAL) >> RCC_CRRCR_HSI48CAL_Pos);
2110}
2115#if defined(RCC_CR_D1CKRDY)
2116
2127__STATIC_INLINE uint32_t LL_RCC_D1CK_IsReady(void)
2128{
2129 return ((READ_BIT(RCC->CR, RCC_CR_D1CKRDY) == (RCC_CR_D1CKRDY)) ? 1UL : 0UL);
2130}
2131
2135#else
2136
2147__STATIC_INLINE uint32_t LL_RCC_CPUCK_IsReady(void)
2148{
2149 return ((READ_BIT(RCC->CR, RCC_CR_CPUCKRDY) == (RCC_CR_CPUCKRDY)) ? 1UL : 0UL);
2150}
2151/* alias */
2152#define LL_RCC_D1CK_IsReady LL_RCC_CPUCK_IsReady
2156#endif /* RCC_CR_D1CKRDY */
2157
2158#if defined(RCC_CR_D2CKRDY)
2159
2170__STATIC_INLINE uint32_t LL_RCC_D2CK_IsReady(void)
2171{
2172 return ((READ_BIT(RCC->CR, RCC_CR_D2CKRDY) == (RCC_CR_D2CKRDY)) ? 1UL : 0UL);
2173}
2177#else
2178
2189__STATIC_INLINE uint32_t LL_RCC_CDCK_IsReady(void)
2190{
2191 return ((READ_BIT(RCC->CR, RCC_CR_CDCKRDY) == (RCC_CR_CDCKRDY)) ? 1UL : 0UL);
2192}
2193#define LL_RCC_D2CK_IsReady LL_RCC_CDCK_IsReady
2197#endif /* RCC_CR_D2CKRDY */
2198
2203#if defined(RCC_GCR_WW1RSC)
2204
2210__STATIC_INLINE void LL_RCC_WWDG1_EnableSystemReset(void)
2211{
2212 SET_BIT(RCC->GCR, RCC_GCR_WW1RSC);
2213}
2214
2220__STATIC_INLINE uint32_t LL_RCC_WWDG1_IsSystemReset(void)
2221{
2222 return ((READ_BIT(RCC->GCR, RCC_GCR_WW1RSC) == RCC_GCR_WW1RSC) ? 1UL : 0UL);
2223}
2224#endif /* RCC_GCR_WW1RSC */
2225
2226#if defined(DUAL_CORE)
2232__STATIC_INLINE void LL_RCC_WWDG2_EnableSystemReset(void)
2233{
2234 SET_BIT(RCC->GCR, RCC_GCR_WW2RSC);
2235}
2236
2242__STATIC_INLINE uint32_t LL_RCC_WWDG2_IsSystemReset(void)
2243{
2244 return ((READ_BIT(RCC->GCR, RCC_GCR_WW2RSC) == RCC_GCR_WW2RSC) ? 1UL : 0UL);
2245}
2246#endif /*DUAL_CORE*/
2251#if defined(DUAL_CORE)
2262__STATIC_INLINE void LL_RCC_ForceCM4Boot(void)
2263{
2264 SET_BIT(RCC->GCR, RCC_GCR_BOOT_C2);
2265}
2266
2272__STATIC_INLINE uint32_t LL_RCC_IsCM4BootForced(void)
2273{
2274 return ((READ_BIT(RCC->GCR, RCC_GCR_BOOT_C2) == RCC_GCR_BOOT_C2) ? 1UL : 0UL);
2275}
2276
2282__STATIC_INLINE void LL_RCC_ForceCM7Boot(void)
2283{
2284 SET_BIT(RCC->GCR, RCC_GCR_BOOT_C1);
2285}
2286
2292__STATIC_INLINE uint32_t LL_RCC_IsCM7BootForced(void)
2293{
2294 return ((READ_BIT(RCC->GCR, RCC_GCR_BOOT_C1) == RCC_GCR_BOOT_C1) ? 1UL : 0UL);
2295}
2296
2300#endif /*DUAL_CORE*/
2301
2314__STATIC_INLINE void LL_RCC_LSE_EnableCSS(void)
2315{
2316 SET_BIT(RCC->BDCR, RCC_BDCR_LSECSSON);
2317}
2318
2324__STATIC_INLINE uint32_t LL_RCC_LSE_IsFailureDetected(void)
2325{
2326 return ((READ_BIT(RCC->BDCR, RCC_BDCR_LSECSSD) == (RCC_BDCR_LSECSSD)) ? 1UL : 0UL);
2327}
2328
2334__STATIC_INLINE void LL_RCC_LSE_Enable(void)
2335{
2336 SET_BIT(RCC->BDCR, RCC_BDCR_LSEON);
2337}
2338
2344__STATIC_INLINE void LL_RCC_LSE_Disable(void)
2345{
2346 CLEAR_BIT(RCC->BDCR, RCC_BDCR_LSEON);
2347}
2348
2354__STATIC_INLINE void LL_RCC_LSE_EnableBypass(void)
2355{
2356 SET_BIT(RCC->BDCR, RCC_BDCR_LSEBYP);
2357}
2358
2364__STATIC_INLINE void LL_RCC_LSE_DisableBypass(void)
2365{
2366 CLEAR_BIT(RCC->BDCR, RCC_BDCR_LSEBYP);
2367}
2368
2369#if defined(RCC_BDCR_LSEEXT)
2377__STATIC_INLINE void LL_RCC_LSE_SelectDigitalClock(void)
2378{
2379 SET_BIT(RCC->BDCR, RCC_BDCR_LSEEXT);
2380}
2381
2389__STATIC_INLINE void LL_RCC_LSE_SelectAnalogClock(void)
2390{
2391 CLEAR_BIT(RCC->BDCR, RCC_BDCR_LSEEXT);
2392}
2393#endif /* RCC_BDCR_LSEEXT */
2394
2406__STATIC_INLINE void LL_RCC_LSE_SetDriveCapability(uint32_t LSEDrive)
2407{
2408 MODIFY_REG(RCC->BDCR, RCC_BDCR_LSEDRV, LSEDrive);
2409}
2410
2420__STATIC_INLINE uint32_t LL_RCC_LSE_GetDriveCapability(void)
2421{
2422 return (uint32_t)(READ_BIT(RCC->BDCR, RCC_BDCR_LSEDRV));
2423}
2424
2430__STATIC_INLINE uint32_t LL_RCC_LSE_IsReady(void)
2431{
2432 return ((READ_BIT(RCC->BDCR, RCC_BDCR_LSERDY) == (RCC_BDCR_LSERDY)) ? 1UL : 0UL);
2433}
2434
2449__STATIC_INLINE void LL_RCC_LSI_Enable(void)
2450{
2451 SET_BIT(RCC->CSR, RCC_CSR_LSION);
2452}
2453
2459__STATIC_INLINE void LL_RCC_LSI_Disable(void)
2460{
2461 CLEAR_BIT(RCC->CSR, RCC_CSR_LSION);
2462}
2463
2469__STATIC_INLINE uint32_t LL_RCC_LSI_IsReady(void)
2470{
2471 return ((READ_BIT(RCC->CSR, RCC_CSR_LSIRDY) == (RCC_CSR_LSIRDY)) ? 1UL : 0UL);
2472}
2473
2493__STATIC_INLINE void LL_RCC_SetSysClkSource(uint32_t Source)
2494{
2495 MODIFY_REG(RCC->CFGR, RCC_CFGR_SW, Source);
2496}
2497
2507__STATIC_INLINE uint32_t LL_RCC_GetSysClkSource(void)
2508{
2509 return (uint32_t)(READ_BIT(RCC->CFGR, RCC_CFGR_SWS));
2510}
2511
2520__STATIC_INLINE void LL_RCC_SetSysWakeUpClkSource(uint32_t Source)
2521{
2522 MODIFY_REG(RCC->CFGR, RCC_CFGR_STOPWUCK, Source);
2523}
2524
2532__STATIC_INLINE uint32_t LL_RCC_GetSysWakeUpClkSource(void)
2533{
2534 return (uint32_t)(READ_BIT(RCC->CFGR, RCC_CFGR_STOPWUCK));
2535}
2536
2545__STATIC_INLINE void LL_RCC_SetKerWakeUpClkSource(uint32_t Source)
2546{
2547 MODIFY_REG(RCC->CFGR, RCC_CFGR_STOPKERWUCK, Source);
2548}
2549
2557__STATIC_INLINE uint32_t LL_RCC_GetKerWakeUpClkSource(void)
2558{
2559 return (uint32_t)(READ_BIT(RCC->CFGR, RCC_CFGR_STOPKERWUCK));
2560}
2561
2577__STATIC_INLINE void LL_RCC_SetSysPrescaler(uint32_t Prescaler)
2578{
2579#if defined(RCC_D1CFGR_D1CPRE)
2580 MODIFY_REG(RCC->D1CFGR, RCC_D1CFGR_D1CPRE, Prescaler);
2581#else
2582 MODIFY_REG(RCC->CDCFGR1, RCC_CDCFGR1_CDCPRE, Prescaler);
2583#endif /* RCC_D1CFGR_D1CPRE */
2584}
2585
2601__STATIC_INLINE void LL_RCC_SetAHBPrescaler(uint32_t Prescaler)
2602{
2603#if defined(RCC_D1CFGR_HPRE)
2604 MODIFY_REG(RCC->D1CFGR, RCC_D1CFGR_HPRE, Prescaler);
2605#else
2606 MODIFY_REG(RCC->CDCFGR1, RCC_CDCFGR1_HPRE, Prescaler);
2607#endif /* RCC_D1CFGR_HPRE */
2608}
2609
2621__STATIC_INLINE void LL_RCC_SetAPB1Prescaler(uint32_t Prescaler)
2622{
2623#if defined(RCC_D2CFGR_D2PPRE1)
2624 MODIFY_REG(RCC->D2CFGR, RCC_D2CFGR_D2PPRE1, Prescaler);
2625#else
2626 MODIFY_REG(RCC->CDCFGR2, RCC_CDCFGR2_CDPPRE1, Prescaler);
2627#endif /* RCC_D2CFGR_D2PPRE1 */
2628}
2629
2641__STATIC_INLINE void LL_RCC_SetAPB2Prescaler(uint32_t Prescaler)
2642{
2643#if defined(RCC_D2CFGR_D2PPRE2)
2644 MODIFY_REG(RCC->D2CFGR, RCC_D2CFGR_D2PPRE2, Prescaler);
2645#else
2646 MODIFY_REG(RCC->CDCFGR2, RCC_CDCFGR2_CDPPRE2, Prescaler);
2647#endif /* RCC_D2CFGR_D2PPRE2 */
2648}
2649
2661__STATIC_INLINE void LL_RCC_SetAPB3Prescaler(uint32_t Prescaler)
2662{
2663#if defined(RCC_D1CFGR_D1PPRE)
2664 MODIFY_REG(RCC->D1CFGR, RCC_D1CFGR_D1PPRE, Prescaler);
2665#else
2666 MODIFY_REG(RCC->CDCFGR1, RCC_CDCFGR1_CDPPRE, Prescaler);
2667#endif /* RCC_D1CFGR_D1PPRE */
2668}
2669
2681__STATIC_INLINE void LL_RCC_SetAPB4Prescaler(uint32_t Prescaler)
2682{
2683#if defined(RCC_D3CFGR_D3PPRE)
2684 MODIFY_REG(RCC->D3CFGR, RCC_D3CFGR_D3PPRE, Prescaler);
2685#else
2686 MODIFY_REG(RCC->SRDCFGR, RCC_SRDCFGR_SRDPPRE, Prescaler);
2687#endif /* RCC_D3CFGR_D3PPRE */
2688}
2689
2704__STATIC_INLINE uint32_t LL_RCC_GetSysPrescaler(void)
2705{
2706#if defined(RCC_D1CFGR_D1CPRE)
2707 return (uint32_t)(READ_BIT(RCC->D1CFGR, RCC_D1CFGR_D1CPRE));
2708#else
2709 return (uint32_t)(READ_BIT(RCC->CDCFGR1, RCC_CDCFGR1_CDCPRE));
2710#endif /* RCC_D1CFGR_D1CPRE */
2711}
2712
2727__STATIC_INLINE uint32_t LL_RCC_GetAHBPrescaler(void)
2728{
2729#if defined(RCC_D1CFGR_HPRE)
2730 return (uint32_t)(READ_BIT(RCC->D1CFGR, RCC_D1CFGR_HPRE));
2731#else
2732 return (uint32_t)(READ_BIT(RCC->CDCFGR1, RCC_CDCFGR1_HPRE));
2733#endif /* RCC_D1CFGR_HPRE */
2734}
2735
2746__STATIC_INLINE uint32_t LL_RCC_GetAPB1Prescaler(void)
2747{
2748#if defined(RCC_D2CFGR_D2PPRE1)
2749 return (uint32_t)(READ_BIT(RCC->D2CFGR, RCC_D2CFGR_D2PPRE1));
2750#else
2751 return (uint32_t)(READ_BIT(RCC->CDCFGR2, RCC_CDCFGR2_CDPPRE1));
2752#endif /* RCC_D2CFGR_D2PPRE1 */
2753}
2754
2765__STATIC_INLINE uint32_t LL_RCC_GetAPB2Prescaler(void)
2766{
2767#if defined(RCC_D2CFGR_D2PPRE2)
2768 return (uint32_t)(READ_BIT(RCC->D2CFGR, RCC_D2CFGR_D2PPRE2));
2769#else
2770 return (uint32_t)(READ_BIT(RCC->CDCFGR2, RCC_CDCFGR2_CDPPRE2));
2771#endif /* RCC_D2CFGR_D2PPRE2 */
2772}
2773
2784__STATIC_INLINE uint32_t LL_RCC_GetAPB3Prescaler(void)
2785{
2786#if defined(RCC_D1CFGR_D1PPRE)
2787 return (uint32_t)(READ_BIT(RCC->D1CFGR, RCC_D1CFGR_D1PPRE));
2788#else
2789 return (uint32_t)(READ_BIT(RCC->CDCFGR1, RCC_CDCFGR1_CDPPRE));
2790#endif /* RCC_D1CFGR_D1PPRE */
2791}
2792
2803__STATIC_INLINE uint32_t LL_RCC_GetAPB4Prescaler(void)
2804{
2805#if defined(RCC_D3CFGR_D3PPRE)
2806 return (uint32_t)(READ_BIT(RCC->D3CFGR, RCC_D3CFGR_D3PPRE));
2807#else
2808 return (uint32_t)(READ_BIT(RCC->SRDCFGR, RCC_SRDCFGR_SRDPPRE));
2809#endif /* RCC_D3CFGR_D3PPRE */
2810}
2811
2872__STATIC_INLINE void LL_RCC_ConfigMCO(uint32_t MCOxSource, uint32_t MCOxPrescaler)
2873{
2874 MODIFY_REG(RCC->CFGR, (MCOxSource << 16U) | (MCOxPrescaler << 16U), (MCOxSource & 0xFFFF0000U) | (MCOxPrescaler & 0xFFFF0000U));
2875}
2876
2985__STATIC_INLINE void LL_RCC_SetClockSource(uint32_t ClkSource)
2986{
2987#if defined(RCC_D1CCIPR_FMCSEL)
2988 uint32_t *pReg = (uint32_t *)((uint32_t)&RCC->D1CCIPR + LL_CLKSOURCE_REG(ClkSource));
2989#else
2990 uint32_t *pReg = (uint32_t *)((uint32_t)&RCC->CDCCIPR + LL_CLKSOURCE_REG(ClkSource));
2991#endif /* */
2992 MODIFY_REG(*pReg, LL_CLKSOURCE_MASK(ClkSource), LL_CLKSOURCE_CONFIG(ClkSource));
2993}
2994
3014__STATIC_INLINE void LL_RCC_SetUSARTClockSource(uint32_t ClkSource)
3015{
3016 LL_RCC_SetClockSource(ClkSource);
3017}
3018
3031__STATIC_INLINE void LL_RCC_SetLPUARTClockSource(uint32_t ClkSource)
3032{
3033#if defined(RCC_D3CCIPR_LPUART1SEL)
3034 MODIFY_REG(RCC->D3CCIPR, RCC_D3CCIPR_LPUART1SEL, ClkSource);
3035#else
3036 MODIFY_REG(RCC->SRDCCIPR, RCC_SRDCCIPR_LPUART1SEL, ClkSource);
3037#endif /* RCC_D3CCIPR_LPUART1SEL */
3038}
3039
3055__STATIC_INLINE void LL_RCC_SetI2CClockSource(uint32_t ClkSource)
3056{
3057 LL_RCC_SetClockSource(ClkSource);
3058}
3059
3086__STATIC_INLINE void LL_RCC_SetLPTIMClockSource(uint32_t ClkSource)
3087{
3088 LL_RCC_SetClockSource(ClkSource);
3089}
3090
3135__STATIC_INLINE void LL_RCC_SetSAIClockSource(uint32_t ClkSource)
3136{
3137 LL_RCC_SetClockSource(ClkSource);
3138}
3139
3148__STATIC_INLINE void LL_RCC_SetSDMMCClockSource(uint32_t ClkSource)
3149{
3150#if defined(RCC_D1CCIPR_SDMMCSEL)
3151 MODIFY_REG(RCC->D1CCIPR, RCC_D1CCIPR_SDMMCSEL, ClkSource);
3152#else
3153 MODIFY_REG(RCC->CDCCIPR, RCC_CDCCIPR_SDMMCSEL, ClkSource);
3154#endif /* RCC_D1CCIPR_SDMMCSEL */
3155}
3156
3167__STATIC_INLINE void LL_RCC_SetRNGClockSource(uint32_t ClkSource)
3168{
3169#if defined(RCC_D2CCIP2R_RNGSEL)
3170 MODIFY_REG(RCC->D2CCIP2R, RCC_D2CCIP2R_RNGSEL, ClkSource);
3171#else
3172 MODIFY_REG(RCC->CDCCIP2R, RCC_CDCCIP2R_RNGSEL, ClkSource);
3173#endif /* RCC_D2CCIP2R_RNGSEL */
3174}
3175
3186__STATIC_INLINE void LL_RCC_SetUSBClockSource(uint32_t ClkSource)
3187{
3188#if defined(RCC_D2CCIP2R_USBSEL)
3189 MODIFY_REG(RCC->D2CCIP2R, RCC_D2CCIP2R_USBSEL, ClkSource);
3190#else
3191 MODIFY_REG(RCC->CDCCIP2R, RCC_CDCCIP2R_USBSEL, ClkSource);
3192#endif /* RCC_D2CCIP2R_USBSEL */
3193}
3194
3204__STATIC_INLINE void LL_RCC_SetCECClockSource(uint32_t ClkSource)
3205{
3206#if defined(RCC_D2CCIP2R_CECSEL)
3207 MODIFY_REG(RCC->D2CCIP2R, RCC_D2CCIP2R_CECSEL, ClkSource);
3208#else
3209 MODIFY_REG(RCC->CDCCIP2R, RCC_CDCCIP2R_CECSEL, ClkSource);
3210#endif /* RCC_D2CCIP2R_CECSEL */
3211}
3212
3213#if defined(DSI)
3222__STATIC_INLINE void LL_RCC_SetDSIClockSource(uint32_t ClkSource)
3223{
3224 MODIFY_REG(RCC->D1CCIPR, RCC_D1CCIPR_DSISEL, ClkSource);
3225}
3226#endif /* DSI */
3227
3236__STATIC_INLINE void LL_RCC_SetDFSDMClockSource(uint32_t ClkSource)
3237{
3238#if defined(RCC_D2CCIP1R_DFSDM1SEL)
3239 MODIFY_REG(RCC->D2CCIP1R, RCC_D2CCIP1R_DFSDM1SEL, ClkSource);
3240#else
3241 MODIFY_REG(RCC->CDCCIP1R, RCC_CDCCIP1R_DFSDM1SEL, ClkSource);
3242#endif /* RCC_D2CCIP1R_DFSDM1SEL */
3243}
3244
3245#if defined(DFSDM2_BASE)
3254__STATIC_INLINE void LL_RCC_SetDFSDM2ClockSource(uint32_t ClkSource)
3255{
3256 MODIFY_REG(RCC->SRDCCIPR, RCC_SRDCCIPR_DFSDM2SEL, ClkSource);
3257}
3258#endif /* DFSDM2_BASE */
3259
3270__STATIC_INLINE void LL_RCC_SetFMCClockSource(uint32_t ClkSource)
3271{
3272#if defined(RCC_D1CCIPR_FMCSEL)
3273 MODIFY_REG(RCC->D1CCIPR, RCC_D1CCIPR_FMCSEL, ClkSource);
3274#else
3275 MODIFY_REG(RCC->CDCCIPR, RCC_CDCCIPR_FMCSEL, ClkSource);
3276#endif /* RCC_D1CCIPR_FMCSEL */
3277}
3278
3279#if defined(QUADSPI)
3290__STATIC_INLINE void LL_RCC_SetQSPIClockSource(uint32_t ClkSource)
3291{
3292 MODIFY_REG(RCC->D1CCIPR, RCC_D1CCIPR_QSPISEL, ClkSource);
3293}
3294#endif /* QUADSPI */
3295
3296#if defined(OCTOSPI1) || defined(OCTOSPI2)
3307__STATIC_INLINE void LL_RCC_SetOSPIClockSource(uint32_t ClkSource)
3308{
3309#if defined(RCC_D1CCIPR_OCTOSPISEL)
3310 MODIFY_REG(RCC->D1CCIPR, RCC_D1CCIPR_OCTOSPISEL, ClkSource);
3311#else
3312 MODIFY_REG(RCC->CDCCIPR, RCC_CDCCIPR_OCTOSPISEL, ClkSource);
3313#endif /* RCC_D1CCIPR_OCTOSPISEL */
3314}
3315#endif /* OCTOSPI1 || OCTOSPI2 */
3316
3326__STATIC_INLINE void LL_RCC_SetCLKPClockSource(uint32_t ClkSource)
3327{
3328#if defined(RCC_D1CCIPR_CKPERSEL)
3329 MODIFY_REG(RCC->D1CCIPR, RCC_D1CCIPR_CKPERSEL, ClkSource);
3330#else
3331 MODIFY_REG(RCC->CDCCIPR, RCC_CDCCIPR_CKPERSEL, ClkSource);
3332#endif /* RCC_D1CCIPR_CKPERSEL */
3333}
3334
3363__STATIC_INLINE void LL_RCC_SetSPIClockSource(uint32_t ClkSource)
3364{
3365 LL_RCC_SetClockSource(ClkSource);
3366}
3367
3378__STATIC_INLINE void LL_RCC_SetSPDIFClockSource(uint32_t ClkSource)
3379{
3380#if defined(RCC_D2CCIP1R_SPDIFSEL)
3381 MODIFY_REG(RCC->D2CCIP1R, RCC_D2CCIP1R_SPDIFSEL, ClkSource);
3382#else
3383 MODIFY_REG(RCC->CDCCIP1R, RCC_CDCCIP1R_SPDIFSEL, ClkSource);
3384#endif /* RCC_D2CCIP1R_SPDIFSEL */
3385}
3386
3396__STATIC_INLINE void LL_RCC_SetFDCANClockSource(uint32_t ClkSource)
3397{
3398#if defined(RCC_D2CCIP1R_FDCANSEL)
3399 MODIFY_REG(RCC->D2CCIP1R, RCC_D2CCIP1R_FDCANSEL, ClkSource);
3400#else
3401 MODIFY_REG(RCC->CDCCIP1R, RCC_CDCCIP1R_FDCANSEL, ClkSource);
3402#endif /* RCC_D2CCIP1R_FDCANSEL */
3403}
3404
3413__STATIC_INLINE void LL_RCC_SetSWPClockSource(uint32_t ClkSource)
3414{
3415#if defined(RCC_D2CCIP1R_SWPSEL)
3416 MODIFY_REG(RCC->D2CCIP1R, RCC_D2CCIP1R_SWPSEL, ClkSource);
3417#else
3418 MODIFY_REG(RCC->CDCCIP1R, RCC_CDCCIP1R_SWPSEL, ClkSource);
3419#endif /* RCC_D2CCIP1R_SWPSEL */
3420}
3421
3431__STATIC_INLINE void LL_RCC_SetADCClockSource(uint32_t ClkSource)
3432{
3433#if defined(RCC_D3CCIPR_ADCSEL)
3434 MODIFY_REG(RCC->D3CCIPR, RCC_D3CCIPR_ADCSEL, ClkSource);
3435#else
3436 MODIFY_REG(RCC->SRDCCIPR, RCC_SRDCCIPR_ADCSEL, ClkSource);
3437#endif /* RCC_D3CCIPR_ADCSEL */
3438}
3439
3556__STATIC_INLINE uint32_t LL_RCC_GetClockSource(uint32_t Periph)
3557{
3558#if defined(RCC_D1CCIPR_FMCSEL)
3559 const uint32_t *pReg = (uint32_t *)((uint32_t)((uint32_t)(&RCC->D1CCIPR) + LL_CLKSOURCE_REG(Periph)));
3560#else
3561 const uint32_t *pReg = (uint32_t *)((uint32_t)((uint32_t)(&RCC->CDCCIPR) + LL_CLKSOURCE_REG(Periph)));
3562#endif /* RCC_D1CCIPR_FMCSEL */
3563 return (uint32_t)(Periph | (((READ_BIT(*pReg, LL_CLKSOURCE_MASK(Periph))) >> LL_CLKSOURCE_SHIFT(Periph)) << LL_RCC_CONFIG_SHIFT));
3564}
3565
3587__STATIC_INLINE uint32_t LL_RCC_GetUSARTClockSource(uint32_t Periph)
3588{
3589 return LL_RCC_GetClockSource(Periph);
3590}
3591
3605__STATIC_INLINE uint32_t LL_RCC_GetLPUARTClockSource(uint32_t Periph)
3606{
3607 UNUSED(Periph);
3608#if defined(RCC_D3CCIPR_LPUART1SEL)
3609 return (uint32_t)(READ_BIT(RCC->D3CCIPR, RCC_D3CCIPR_LPUART1SEL));
3610#else
3611 return (uint32_t)(READ_BIT(RCC->SRDCCIPR, RCC_SRDCCIPR_LPUART1SEL));
3612#endif /* RCC_D3CCIPR_LPUART1SEL */
3613}
3614
3632__STATIC_INLINE uint32_t LL_RCC_GetI2CClockSource(uint32_t Periph)
3633{
3634 return LL_RCC_GetClockSource(Periph);
3635}
3636
3667__STATIC_INLINE uint32_t LL_RCC_GetLPTIMClockSource(uint32_t Periph)
3668{
3669 return LL_RCC_GetClockSource(Periph);
3670}
3671
3721__STATIC_INLINE uint32_t LL_RCC_GetSAIClockSource(uint32_t Periph)
3722{
3723 return LL_RCC_GetClockSource(Periph);
3724}
3725
3735__STATIC_INLINE uint32_t LL_RCC_GetSDMMCClockSource(uint32_t Periph)
3736{
3737 UNUSED(Periph);
3738#if defined(RCC_D1CCIPR_SDMMCSEL)
3739 return (uint32_t)(READ_BIT(RCC->D1CCIPR, RCC_D1CCIPR_SDMMCSEL));
3740#else
3741 return (uint32_t)(READ_BIT(RCC->CDCCIPR, RCC_CDCCIPR_SDMMCSEL));
3742#endif /* RCC_D1CCIPR_SDMMCSEL */
3743}
3744
3756__STATIC_INLINE uint32_t LL_RCC_GetRNGClockSource(uint32_t Periph)
3757{
3758 UNUSED(Periph);
3759#if defined(RCC_D2CCIP2R_RNGSEL)
3760 return (uint32_t)(READ_BIT(RCC->D2CCIP2R, RCC_D2CCIP2R_RNGSEL));
3761#else
3762 return (uint32_t)(READ_BIT(RCC->CDCCIP2R, RCC_CDCCIP2R_RNGSEL));
3763#endif /* RCC_D2CCIP2R_RNGSEL */
3764}
3765
3777__STATIC_INLINE uint32_t LL_RCC_GetUSBClockSource(uint32_t Periph)
3778{
3779 UNUSED(Periph);
3780#if defined(RCC_D2CCIP2R_USBSEL)
3781 return (uint32_t)(READ_BIT(RCC->D2CCIP2R, RCC_D2CCIP2R_USBSEL));
3782#else
3783 return (uint32_t)(READ_BIT(RCC->CDCCIP2R, RCC_CDCCIP2R_USBSEL));
3784#endif /* RCC_D2CCIP2R_USBSEL */
3785}
3786
3797__STATIC_INLINE uint32_t LL_RCC_GetCECClockSource(uint32_t Periph)
3798{
3799 UNUSED(Periph);
3800#if defined(RCC_D2CCIP2R_CECSEL)
3801 return (uint32_t)(READ_BIT(RCC->D2CCIP2R, RCC_D2CCIP2R_CECSEL));
3802#else
3803 return (uint32_t)(READ_BIT(RCC->CDCCIP2R, RCC_CDCCIP2R_CECSEL));
3804#endif /* RCC_D2CCIP2R_CECSEL */
3805}
3806
3807#if defined(DSI)
3817__STATIC_INLINE uint32_t LL_RCC_GetDSIClockSource(uint32_t Periph)
3818{
3819 UNUSED(Periph);
3820 return (uint32_t)(READ_BIT(RCC->D1CCIPR, RCC_D1CCIPR_DSISEL));
3821}
3822#endif /* DSI */
3823
3833__STATIC_INLINE uint32_t LL_RCC_GetDFSDMClockSource(uint32_t Periph)
3834{
3835 UNUSED(Periph);
3836#if defined(RCC_D2CCIP1R_DFSDM1SEL)
3837 return (uint32_t)(READ_BIT(RCC->D2CCIP1R, RCC_D2CCIP1R_DFSDM1SEL));
3838#else
3839 return (uint32_t)(READ_BIT(RCC->CDCCIP1R, RCC_CDCCIP1R_DFSDM1SEL));
3840#endif /* RCC_D2CCIP1R_DFSDM1SEL */
3841}
3842
3843#if defined(DFSDM2_BASE)
3853__STATIC_INLINE uint32_t LL_RCC_GetDFSDM2ClockSource(uint32_t Periph)
3854{
3855 UNUSED(Periph);
3856 return (uint32_t)(READ_BIT(RCC->SRDCCIPR, RCC_SRDCCIPR_DFSDM2SEL));
3857}
3858#endif /* DFSDM2_BASE */
3859
3871__STATIC_INLINE uint32_t LL_RCC_GetFMCClockSource(uint32_t Periph)
3872{
3873 UNUSED(Periph);
3874#if defined(RCC_D1CCIPR_FMCSEL)
3875 return (uint32_t)(READ_BIT(RCC->D1CCIPR, RCC_D1CCIPR_FMCSEL));
3876#else
3877 return (uint32_t)(READ_BIT(RCC->CDCCIPR, RCC_CDCCIPR_FMCSEL));
3878#endif /* RCC_D1CCIPR_FMCSEL */
3879}
3880
3881#if defined(QUADSPI)
3893__STATIC_INLINE uint32_t LL_RCC_GetQSPIClockSource(uint32_t Periph)
3894{
3895 UNUSED(Periph);
3896 return (uint32_t)(READ_BIT(RCC->D1CCIPR, RCC_D1CCIPR_QSPISEL));
3897}
3898#endif /* QUADSPI */
3899
3900#if defined(OCTOSPI1) || defined(OCTOSPI2)
3912__STATIC_INLINE uint32_t LL_RCC_GetOSPIClockSource(uint32_t Periph)
3913{
3914 UNUSED(Periph);
3915#if defined(RCC_D1CCIPR_OCTOSPISEL)
3916 return (uint32_t)(READ_BIT(RCC->D1CCIPR, RCC_D1CCIPR_OCTOSPISEL));
3917#else
3918 return (uint32_t)(READ_BIT(RCC->CDCCIPR, RCC_CDCCIPR_OCTOSPISEL));
3919#endif /* RCC_D1CCIPR_OCTOSPISEL */
3920}
3921#endif /* defined(OCTOSPI1) || defined(OCTOSPI2) */
3922
3933__STATIC_INLINE uint32_t LL_RCC_GetCLKPClockSource(uint32_t Periph)
3934{
3935 UNUSED(Periph);
3936#if defined(RCC_D1CCIPR_CKPERSEL)
3937 return (uint32_t)(READ_BIT(RCC->D1CCIPR, RCC_D1CCIPR_CKPERSEL));
3938#else
3939 return (uint32_t)(READ_BIT(RCC->CDCCIPR, RCC_CDCCIPR_CKPERSEL));
3940#endif /* RCC_D1CCIPR_CKPERSEL */
3941}
3942
3974__STATIC_INLINE uint32_t LL_RCC_GetSPIClockSource(uint32_t Periph)
3975{
3976 return LL_RCC_GetClockSource(Periph);
3977}
3978
3990__STATIC_INLINE uint32_t LL_RCC_GetSPDIFClockSource(uint32_t Periph)
3991{
3992 UNUSED(Periph);
3993#if defined(RCC_D2CCIP1R_SPDIFSEL)
3994 return (uint32_t)(READ_BIT(RCC->D2CCIP1R, RCC_D2CCIP1R_SPDIFSEL));
3995#else
3996 return (uint32_t)(READ_BIT(RCC->CDCCIP1R, RCC_CDCCIP1R_SPDIFSEL));
3997#endif /* RCC_D2CCIP1R_SPDIFSEL */
3998}
3999
4010__STATIC_INLINE uint32_t LL_RCC_GetFDCANClockSource(uint32_t Periph)
4011{
4012 UNUSED(Periph);
4013#if defined(RCC_D2CCIP1R_FDCANSEL)
4014 return (uint32_t)(READ_BIT(RCC->D2CCIP1R, RCC_D2CCIP1R_FDCANSEL));
4015#else
4016 return (uint32_t)(READ_BIT(RCC->CDCCIP1R, RCC_CDCCIP1R_FDCANSEL));
4017#endif /* RCC_D2CCIP1R_FDCANSEL */
4018}
4019
4029__STATIC_INLINE uint32_t LL_RCC_GetSWPClockSource(uint32_t Periph)
4030{
4031 UNUSED(Periph);
4032#if defined(RCC_D2CCIP1R_SWPSEL)
4033 return (uint32_t)(READ_BIT(RCC->D2CCIP1R, RCC_D2CCIP1R_SWPSEL));
4034#else
4035 return (uint32_t)(READ_BIT(RCC->CDCCIP1R, RCC_CDCCIP1R_SWPSEL));
4036#endif /* RCC_D2CCIP1R_SWPSEL */
4037}
4038
4049__STATIC_INLINE uint32_t LL_RCC_GetADCClockSource(uint32_t Periph)
4050{
4051 UNUSED(Periph);
4052#if defined (RCC_D3CCIPR_ADCSEL)
4053 return (uint32_t)(READ_BIT(RCC->D3CCIPR, RCC_D3CCIPR_ADCSEL));
4054#else
4055 return (uint32_t)(READ_BIT(RCC->SRDCCIPR, RCC_SRDCCIPR_ADCSEL));
4056#endif /* RCC_D3CCIPR_ADCSEL */
4057}
4058
4081__STATIC_INLINE void LL_RCC_SetRTCClockSource(uint32_t Source)
4082{
4083 MODIFY_REG(RCC->BDCR, RCC_BDCR_RTCSEL, Source);
4084}
4085
4095__STATIC_INLINE uint32_t LL_RCC_GetRTCClockSource(void)
4096{
4097 return (uint32_t)(READ_BIT(RCC->BDCR, RCC_BDCR_RTCSEL));
4098}
4099
4105__STATIC_INLINE void LL_RCC_EnableRTC(void)
4106{
4107 SET_BIT(RCC->BDCR, RCC_BDCR_RTCEN);
4108}
4109
4115__STATIC_INLINE void LL_RCC_DisableRTC(void)
4116{
4117 CLEAR_BIT(RCC->BDCR, RCC_BDCR_RTCEN);
4118}
4119
4125__STATIC_INLINE uint32_t LL_RCC_IsEnabledRTC(void)
4126{
4127 return ((READ_BIT(RCC->BDCR, RCC_BDCR_RTCEN) == (RCC_BDCR_RTCEN)) ? 1UL : 0UL);
4128}
4129
4135__STATIC_INLINE void LL_RCC_ForceBackupDomainReset(void)
4136{
4137 SET_BIT(RCC->BDCR, RCC_BDCR_BDRST);
4138}
4139
4145__STATIC_INLINE void LL_RCC_ReleaseBackupDomainReset(void)
4146{
4147#if defined(RCC_BDCR_BDRST)
4148 CLEAR_BIT(RCC->BDCR, RCC_BDCR_BDRST);
4149#else
4150 CLEAR_BIT(RCC->BDCR, RCC_BDCR_VSWRST);
4151#endif /* RCC_BDCR_BDRST */
4152}
4153
4223__STATIC_INLINE void LL_RCC_SetRTC_HSEPrescaler(uint32_t Prescaler)
4224{
4225 MODIFY_REG(RCC->CFGR, RCC_CFGR_RTCPRE, Prescaler);
4226}
4227
4296__STATIC_INLINE uint32_t LL_RCC_GetRTC_HSEPrescaler(void)
4297{
4298 return (uint32_t)(READ_BIT(RCC->CFGR, RCC_CFGR_RTCPRE));
4299}
4300
4318__STATIC_INLINE void LL_RCC_SetTIMPrescaler(uint32_t Prescaler)
4319{
4320 MODIFY_REG(RCC->CFGR, RCC_CFGR_TIMPRE, Prescaler);
4321}
4322
4330__STATIC_INLINE uint32_t LL_RCC_GetTIMPrescaler(void)
4331{
4332 return (uint32_t)(READ_BIT(RCC->CFGR, RCC_CFGR_TIMPRE));
4333}
4334
4339#if defined(HRTIM1)
4353__STATIC_INLINE void LL_RCC_SetHRTIMClockSource(uint32_t Prescaler)
4354{
4355 MODIFY_REG(RCC->CFGR, RCC_CFGR_HRTIMSEL, Prescaler);
4356}
4357#endif /* HRTIM1 */
4358
4359#if defined(HRTIM1)
4367__STATIC_INLINE uint32_t LL_RCC_GetHRTIMClockSource(void)
4368{
4369 return (uint32_t)(READ_BIT(RCC->CFGR, RCC_CFGR_HRTIMSEL));
4370}
4374#endif /* HRTIM1 */
4375
4392__STATIC_INLINE void LL_RCC_PLL_SetSource(uint32_t PLLSource)
4393{
4394 MODIFY_REG(RCC->PLLCKSELR, RCC_PLLCKSELR_PLLSRC, PLLSource);
4395}
4396
4406__STATIC_INLINE uint32_t LL_RCC_PLL_GetSource(void)
4407{
4408 return (uint32_t)(READ_BIT(RCC->PLLCKSELR, RCC_PLLCKSELR_PLLSRC));
4409}
4410
4416__STATIC_INLINE void LL_RCC_PLL1_Enable(void)
4417{
4418 SET_BIT(RCC->CR, RCC_CR_PLL1ON);
4419}
4420
4427__STATIC_INLINE void LL_RCC_PLL1_Disable(void)
4428{
4429 CLEAR_BIT(RCC->CR, RCC_CR_PLL1ON);
4430}
4431
4437__STATIC_INLINE uint32_t LL_RCC_PLL1_IsReady(void)
4438{
4439 return ((READ_BIT(RCC->CR, RCC_CR_PLL1RDY) == (RCC_CR_PLL1RDY)) ? 1UL : 0UL);
4440}
4441
4448__STATIC_INLINE void LL_RCC_PLL1P_Enable(void)
4449{
4450 SET_BIT(RCC->PLLCFGR, RCC_PLLCFGR_DIVP1EN);
4451}
4452
4459__STATIC_INLINE void LL_RCC_PLL1Q_Enable(void)
4460{
4461 SET_BIT(RCC->PLLCFGR, RCC_PLLCFGR_DIVQ1EN);
4462}
4463
4470__STATIC_INLINE void LL_RCC_PLL1R_Enable(void)
4471{
4472 SET_BIT(RCC->PLLCFGR, RCC_PLLCFGR_DIVR1EN);
4473}
4474
4480__STATIC_INLINE void LL_RCC_PLL1FRACN_Enable(void)
4481{
4482 SET_BIT(RCC->PLLCFGR, RCC_PLLCFGR_PLL1FRACEN);
4483}
4484
4490__STATIC_INLINE uint32_t LL_RCC_PLL1P_IsEnabled(void)
4491{
4492 return ((READ_BIT(RCC->PLLCFGR, RCC_PLLCFGR_DIVP1EN) == RCC_PLLCFGR_DIVP1EN) ? 1UL : 0UL);
4493}
4494
4500__STATIC_INLINE uint32_t LL_RCC_PLL1Q_IsEnabled(void)
4501{
4502 return ((READ_BIT(RCC->PLLCFGR, RCC_PLLCFGR_DIVQ1EN) == RCC_PLLCFGR_DIVQ1EN) ? 1UL : 0UL);
4503}
4504
4510__STATIC_INLINE uint32_t LL_RCC_PLL1R_IsEnabled(void)
4511{
4512 return ((READ_BIT(RCC->PLLCFGR, RCC_PLLCFGR_DIVR1EN) == RCC_PLLCFGR_DIVR1EN) ? 1UL : 0UL);
4513}
4514
4520__STATIC_INLINE uint32_t LL_RCC_PLL1FRACN_IsEnabled(void)
4521{
4522 return ((READ_BIT(RCC->PLLCFGR, RCC_PLLCFGR_PLL1FRACEN) == RCC_PLLCFGR_PLL1FRACEN) ? 1UL : 0UL);
4523}
4524
4531__STATIC_INLINE void LL_RCC_PLL1P_Disable(void)
4532{
4533 CLEAR_BIT(RCC->PLLCFGR, RCC_PLLCFGR_DIVP1EN);
4534}
4535
4542__STATIC_INLINE void LL_RCC_PLL1Q_Disable(void)
4543{
4544 CLEAR_BIT(RCC->PLLCFGR, RCC_PLLCFGR_DIVQ1EN);
4545}
4546
4553__STATIC_INLINE void LL_RCC_PLL1R_Disable(void)
4554{
4555 CLEAR_BIT(RCC->PLLCFGR, RCC_PLLCFGR_DIVR1EN);
4556}
4557
4563__STATIC_INLINE void LL_RCC_PLL1FRACN_Disable(void)
4564{
4565 CLEAR_BIT(RCC->PLLCFGR, RCC_PLLCFGR_PLL1FRACEN);
4566}
4567
4577__STATIC_INLINE void LL_RCC_PLL1_SetVCOOutputRange(uint32_t VCORange)
4578{
4579 MODIFY_REG(RCC->PLLCFGR, RCC_PLLCFGR_PLL1VCOSEL, VCORange << RCC_PLLCFGR_PLL1VCOSEL_Pos);
4580}
4581
4593__STATIC_INLINE void LL_RCC_PLL1_SetVCOInputRange(uint32_t InputRange)
4594{
4595 MODIFY_REG(RCC->PLLCFGR, RCC_PLLCFGR_PLL1RGE, InputRange << RCC_PLLCFGR_PLL1RGE_Pos);
4596}
4597
4603__STATIC_INLINE uint32_t LL_RCC_PLL1_GetN(void)
4604{
4605 return (uint32_t)((READ_BIT(RCC->PLL1DIVR, RCC_PLL1DIVR_N1) >> RCC_PLL1DIVR_N1_Pos) + 1UL);
4606}
4607
4613__STATIC_INLINE uint32_t LL_RCC_PLL1_GetM(void)
4614{
4615 return (uint32_t)(READ_BIT(RCC->PLLCKSELR, RCC_PLLCKSELR_DIVM1) >> RCC_PLLCKSELR_DIVM1_Pos);
4616}
4617
4623__STATIC_INLINE uint32_t LL_RCC_PLL1_GetP(void)
4624{
4625 return (uint32_t)((READ_BIT(RCC->PLL1DIVR, RCC_PLL1DIVR_P1) >> RCC_PLL1DIVR_P1_Pos) + 1UL);
4626}
4627
4633__STATIC_INLINE uint32_t LL_RCC_PLL1_GetQ(void)
4634{
4635 return (uint32_t)((READ_BIT(RCC->PLL1DIVR, RCC_PLL1DIVR_Q1) >> RCC_PLL1DIVR_Q1_Pos) + 1UL);
4636}
4637
4643__STATIC_INLINE uint32_t LL_RCC_PLL1_GetR(void)
4644{
4645 return (uint32_t)((READ_BIT(RCC->PLL1DIVR, RCC_PLL1DIVR_R1) >> RCC_PLL1DIVR_R1_Pos) + 1UL);
4646}
4647
4653__STATIC_INLINE uint32_t LL_RCC_PLL1_GetFRACN(void)
4654{
4655 return (uint32_t)(READ_BIT(RCC->PLL1FRACR, RCC_PLL1FRACR_FRACN1) >> RCC_PLL1FRACR_FRACN1_Pos);
4656}
4657
4664__STATIC_INLINE void LL_RCC_PLL1_SetN(uint32_t N)
4665{
4666 MODIFY_REG(RCC->PLL1DIVR, RCC_PLL1DIVR_N1, (N - 1UL) << RCC_PLL1DIVR_N1_Pos);
4667}
4668
4675__STATIC_INLINE void LL_RCC_PLL1_SetM(uint32_t M)
4676{
4677 MODIFY_REG(RCC->PLLCKSELR, RCC_PLLCKSELR_DIVM1, M << RCC_PLLCKSELR_DIVM1_Pos);
4678}
4679
4688__STATIC_INLINE void LL_RCC_PLL1_SetP(uint32_t P)
4689{
4690 MODIFY_REG(RCC->PLL1DIVR, RCC_PLL1DIVR_P1, (P - 1UL) << RCC_PLL1DIVR_P1_Pos);
4691}
4692
4699__STATIC_INLINE void LL_RCC_PLL1_SetQ(uint32_t Q)
4700{
4701 MODIFY_REG(RCC->PLL1DIVR, RCC_PLL1DIVR_Q1, (Q - 1UL) << RCC_PLL1DIVR_Q1_Pos);
4702}
4703
4710__STATIC_INLINE void LL_RCC_PLL1_SetR(uint32_t R)
4711{
4712 MODIFY_REG(RCC->PLL1DIVR, RCC_PLL1DIVR_R1, (R - 1UL) << RCC_PLL1DIVR_R1_Pos);
4713}
4714
4720__STATIC_INLINE void LL_RCC_PLL1_SetFRACN(uint32_t FRACN)
4721{
4722 MODIFY_REG(RCC->PLL1FRACR, RCC_PLL1FRACR_FRACN1, FRACN << RCC_PLL1FRACR_FRACN1_Pos);
4723}
4724
4730__STATIC_INLINE void LL_RCC_PLL2_Enable(void)
4731{
4732 SET_BIT(RCC->CR, RCC_CR_PLL2ON);
4733}
4734
4741__STATIC_INLINE void LL_RCC_PLL2_Disable(void)
4742{
4743 CLEAR_BIT(RCC->CR, RCC_CR_PLL2ON);
4744}
4745
4751__STATIC_INLINE uint32_t LL_RCC_PLL2_IsReady(void)
4752{
4753 return ((READ_BIT(RCC->CR, RCC_CR_PLL2RDY) == (RCC_CR_PLL2RDY)) ? 1UL : 0UL);
4754}
4755
4762__STATIC_INLINE void LL_RCC_PLL2P_Enable(void)
4763{
4764 SET_BIT(RCC->PLLCFGR, RCC_PLLCFGR_DIVP2EN);
4765}
4766
4773__STATIC_INLINE void LL_RCC_PLL2Q_Enable(void)
4774{
4775 SET_BIT(RCC->PLLCFGR, RCC_PLLCFGR_DIVQ2EN);
4776}
4777
4784__STATIC_INLINE void LL_RCC_PLL2R_Enable(void)
4785{
4786 SET_BIT(RCC->PLLCFGR, RCC_PLLCFGR_DIVR2EN);
4787}
4788
4794__STATIC_INLINE void LL_RCC_PLL2FRACN_Enable(void)
4795{
4796 SET_BIT(RCC->PLLCFGR, RCC_PLLCFGR_PLL2FRACEN);
4797}
4798
4804__STATIC_INLINE uint32_t LL_RCC_PLL2P_IsEnabled(void)
4805{
4806 return ((READ_BIT(RCC->PLLCFGR, RCC_PLLCFGR_DIVP2EN) == RCC_PLLCFGR_DIVP2EN) ? 1UL : 0UL);
4807}
4808
4814__STATIC_INLINE uint32_t LL_RCC_PLL2Q_IsEnabled(void)
4815{
4816 return ((READ_BIT(RCC->PLLCFGR, RCC_PLLCFGR_DIVQ2EN) == RCC_PLLCFGR_DIVQ2EN) ? 1UL : 0UL);
4817}
4818
4824__STATIC_INLINE uint32_t LL_RCC_PLL2R_IsEnabled(void)
4825{
4826 return ((READ_BIT(RCC->PLLCFGR, RCC_PLLCFGR_DIVR2EN) == RCC_PLLCFGR_DIVR2EN) ? 1UL : 0UL);
4827}
4828
4834__STATIC_INLINE uint32_t LL_RCC_PLL2FRACN_IsEnabled(void)
4835{
4836 return ((READ_BIT(RCC->PLLCFGR, RCC_PLLCFGR_PLL2FRACEN) == RCC_PLLCFGR_PLL2FRACEN) ? 1UL : 0UL);
4837}
4838
4845__STATIC_INLINE void LL_RCC_PLL2P_Disable(void)
4846{
4847 CLEAR_BIT(RCC->PLLCFGR, RCC_PLLCFGR_DIVP2EN);
4848}
4849
4856__STATIC_INLINE void LL_RCC_PLL2Q_Disable(void)
4857{
4858 CLEAR_BIT(RCC->PLLCFGR, RCC_PLLCFGR_DIVQ2EN);
4859}
4860
4867__STATIC_INLINE void LL_RCC_PLL2R_Disable(void)
4868{
4869 CLEAR_BIT(RCC->PLLCFGR, RCC_PLLCFGR_DIVR2EN);
4870}
4871
4877__STATIC_INLINE void LL_RCC_PLL2FRACN_Disable(void)
4878{
4879 CLEAR_BIT(RCC->PLLCFGR, RCC_PLLCFGR_PLL2FRACEN);
4880}
4881
4891__STATIC_INLINE void LL_RCC_PLL2_SetVCOOutputRange(uint32_t VCORange)
4892{
4893 MODIFY_REG(RCC->PLLCFGR, RCC_PLLCFGR_PLL2VCOSEL, VCORange << RCC_PLLCFGR_PLL2VCOSEL_Pos);
4894}
4895
4907__STATIC_INLINE void LL_RCC_PLL2_SetVCOInputRange(uint32_t InputRange)
4908{
4909 MODIFY_REG(RCC->PLLCFGR, RCC_PLLCFGR_PLL2RGE, InputRange << RCC_PLLCFGR_PLL2RGE_Pos);
4910}
4911
4917__STATIC_INLINE uint32_t LL_RCC_PLL2_GetN(void)
4918{
4919 return (uint32_t)((READ_BIT(RCC->PLL2DIVR, RCC_PLL2DIVR_N2) >> RCC_PLL2DIVR_N2_Pos) + 1UL);
4920}
4921
4927__STATIC_INLINE uint32_t LL_RCC_PLL2_GetM(void)
4928{
4929 return (uint32_t)(READ_BIT(RCC->PLLCKSELR, RCC_PLLCKSELR_DIVM2) >> RCC_PLLCKSELR_DIVM2_Pos);
4930}
4931
4937__STATIC_INLINE uint32_t LL_RCC_PLL2_GetP(void)
4938{
4939 return (uint32_t)((READ_BIT(RCC->PLL2DIVR, RCC_PLL2DIVR_P2) >> RCC_PLL2DIVR_P2_Pos) + 1UL);
4940}
4941
4947__STATIC_INLINE uint32_t LL_RCC_PLL2_GetQ(void)
4948{
4949 return (uint32_t)((READ_BIT(RCC->PLL2DIVR, RCC_PLL2DIVR_Q2) >> RCC_PLL2DIVR_Q2_Pos) + 1UL);
4950}
4951
4957__STATIC_INLINE uint32_t LL_RCC_PLL2_GetR(void)
4958{
4959 return (uint32_t)((READ_BIT(RCC->PLL2DIVR, RCC_PLL2DIVR_R2) >> RCC_PLL2DIVR_R2_Pos) + 1UL);
4960}
4961
4967__STATIC_INLINE uint32_t LL_RCC_PLL2_GetFRACN(void)
4968{
4969 return (uint32_t)(READ_BIT(RCC->PLL2FRACR, RCC_PLL2FRACR_FRACN2) >> RCC_PLL2FRACR_FRACN2_Pos);
4970}
4971
4978__STATIC_INLINE void LL_RCC_PLL2_SetN(uint32_t N)
4979{
4980 MODIFY_REG(RCC->PLL2DIVR, RCC_PLL2DIVR_N2, (N - 1UL) << RCC_PLL2DIVR_N2_Pos);
4981}
4982
4989__STATIC_INLINE void LL_RCC_PLL2_SetM(uint32_t M)
4990{
4991 MODIFY_REG(RCC->PLLCKSELR, RCC_PLLCKSELR_DIVM2, M << RCC_PLLCKSELR_DIVM2_Pos);
4992}
4993
5000__STATIC_INLINE void LL_RCC_PLL2_SetP(uint32_t P)
5001{
5002 MODIFY_REG(RCC->PLL2DIVR, RCC_PLL2DIVR_P2, (P - 1UL) << RCC_PLL2DIVR_P2_Pos);
5003}
5004
5011__STATIC_INLINE void LL_RCC_PLL2_SetQ(uint32_t Q)
5012{
5013 MODIFY_REG(RCC->PLL2DIVR, RCC_PLL2DIVR_Q2, (Q - 1UL) << RCC_PLL2DIVR_Q2_Pos);
5014}
5015
5022__STATIC_INLINE void LL_RCC_PLL2_SetR(uint32_t R)
5023{
5024 MODIFY_REG(RCC->PLL2DIVR, RCC_PLL2DIVR_R2, (R - 1UL) << RCC_PLL2DIVR_R2_Pos);
5025}
5026
5032__STATIC_INLINE void LL_RCC_PLL2_SetFRACN(uint32_t FRACN)
5033{
5034 MODIFY_REG(RCC->PLL2FRACR, RCC_PLL2FRACR_FRACN2, FRACN << RCC_PLL2FRACR_FRACN2_Pos);
5035}
5036
5042__STATIC_INLINE void LL_RCC_PLL3_Enable(void)
5043{
5044 SET_BIT(RCC->CR, RCC_CR_PLL3ON);
5045}
5046
5053__STATIC_INLINE void LL_RCC_PLL3_Disable(void)
5054{
5055 CLEAR_BIT(RCC->CR, RCC_CR_PLL3ON);
5056}
5057
5063__STATIC_INLINE uint32_t LL_RCC_PLL3_IsReady(void)
5064{
5065 return ((READ_BIT(RCC->CR, RCC_CR_PLL3RDY) == (RCC_CR_PLL3RDY)) ? 1UL : 0UL);
5066}
5067
5074__STATIC_INLINE void LL_RCC_PLL3P_Enable(void)
5075{
5076 SET_BIT(RCC->PLLCFGR, RCC_PLLCFGR_DIVP3EN);
5077}
5078
5085__STATIC_INLINE void LL_RCC_PLL3Q_Enable(void)
5086{
5087 SET_BIT(RCC->PLLCFGR, RCC_PLLCFGR_DIVQ3EN);
5088}
5089
5096__STATIC_INLINE void LL_RCC_PLL3R_Enable(void)
5097{
5098 SET_BIT(RCC->PLLCFGR, RCC_PLLCFGR_DIVR3EN);
5099}
5100
5106__STATIC_INLINE void LL_RCC_PLL3FRACN_Enable(void)
5107{
5108 SET_BIT(RCC->PLLCFGR, RCC_PLLCFGR_PLL3FRACEN);
5109}
5110
5116__STATIC_INLINE uint32_t LL_RCC_PLL3P_IsEnabled(void)
5117{
5118 return ((READ_BIT(RCC->PLLCFGR, RCC_PLLCFGR_DIVP3EN) == RCC_PLLCFGR_DIVP3EN) ? 1UL : 0UL);
5119}
5120
5126__STATIC_INLINE uint32_t LL_RCC_PLL3Q_IsEnabled(void)
5127{
5128 return ((READ_BIT(RCC->PLLCFGR, RCC_PLLCFGR_DIVQ3EN) == RCC_PLLCFGR_DIVQ3EN) ? 1UL : 0UL);
5129}
5130
5136__STATIC_INLINE uint32_t LL_RCC_PLL3R_IsEnabled(void)
5137{
5138 return ((READ_BIT(RCC->PLLCFGR, RCC_PLLCFGR_DIVR3EN) == RCC_PLLCFGR_DIVR3EN) ? 1UL : 0UL);
5139}
5140
5146__STATIC_INLINE uint32_t LL_RCC_PLL3FRACN_IsEnabled(void)
5147{
5148 return ((READ_BIT(RCC->PLLCFGR, RCC_PLLCFGR_PLL3FRACEN) == RCC_PLLCFGR_PLL3FRACEN) ? 1UL : 0UL);
5149}
5150
5157__STATIC_INLINE void LL_RCC_PLL3P_Disable(void)
5158{
5159 CLEAR_BIT(RCC->PLLCFGR, RCC_PLLCFGR_DIVP3EN);
5160}
5161
5168__STATIC_INLINE void LL_RCC_PLL3Q_Disable(void)
5169{
5170 CLEAR_BIT(RCC->PLLCFGR, RCC_PLLCFGR_DIVQ3EN);
5171}
5172
5179__STATIC_INLINE void LL_RCC_PLL3R_Disable(void)
5180{
5181 CLEAR_BIT(RCC->PLLCFGR, RCC_PLLCFGR_DIVR3EN);
5182}
5183
5189__STATIC_INLINE void LL_RCC_PLL3FRACN_Disable(void)
5190{
5191 CLEAR_BIT(RCC->PLLCFGR, RCC_PLLCFGR_PLL3FRACEN);
5192}
5193
5203__STATIC_INLINE void LL_RCC_PLL3_SetVCOOutputRange(uint32_t VCORange)
5204{
5205 MODIFY_REG(RCC->PLLCFGR, RCC_PLLCFGR_PLL3VCOSEL, VCORange << RCC_PLLCFGR_PLL3VCOSEL_Pos);
5206}
5207
5219__STATIC_INLINE void LL_RCC_PLL3_SetVCOInputRange(uint32_t InputRange)
5220{
5221 MODIFY_REG(RCC->PLLCFGR, RCC_PLLCFGR_PLL3RGE, InputRange << RCC_PLLCFGR_PLL3RGE_Pos);
5222}
5223
5229__STATIC_INLINE uint32_t LL_RCC_PLL3_GetN(void)
5230{
5231 return (uint32_t)((READ_BIT(RCC->PLL3DIVR, RCC_PLL3DIVR_N3) >> RCC_PLL3DIVR_N3_Pos) + 1UL);
5232}
5233
5239__STATIC_INLINE uint32_t LL_RCC_PLL3_GetM(void)
5240{
5241 return (uint32_t)(READ_BIT(RCC->PLLCKSELR, RCC_PLLCKSELR_DIVM3) >> RCC_PLLCKSELR_DIVM3_Pos);
5242}
5243
5249__STATIC_INLINE uint32_t LL_RCC_PLL3_GetP(void)
5250{
5251 return (uint32_t)((READ_BIT(RCC->PLL3DIVR, RCC_PLL3DIVR_P3) >> RCC_PLL3DIVR_P3_Pos) + 1UL);
5252}
5253
5259__STATIC_INLINE uint32_t LL_RCC_PLL3_GetQ(void)
5260{
5261 return (uint32_t)((READ_BIT(RCC->PLL3DIVR, RCC_PLL3DIVR_Q3) >> RCC_PLL3DIVR_Q3_Pos) + 1UL);
5262}
5263
5269__STATIC_INLINE uint32_t LL_RCC_PLL3_GetR(void)
5270{
5271 return (uint32_t)((READ_BIT(RCC->PLL3DIVR, RCC_PLL3DIVR_R3) >> RCC_PLL3DIVR_R3_Pos) + 1UL);
5272}
5273
5279__STATIC_INLINE uint32_t LL_RCC_PLL3_GetFRACN(void)
5280{
5281 return (uint32_t)(READ_BIT(RCC->PLL3FRACR, RCC_PLL3FRACR_FRACN3) >> RCC_PLL3FRACR_FRACN3_Pos);
5282}
5283
5290__STATIC_INLINE void LL_RCC_PLL3_SetN(uint32_t N)
5291{
5292 MODIFY_REG(RCC->PLL3DIVR, RCC_PLL3DIVR_N3, (N - 1UL) << RCC_PLL3DIVR_N3_Pos);
5293}
5294
5301__STATIC_INLINE void LL_RCC_PLL3_SetM(uint32_t M)
5302{
5303 MODIFY_REG(RCC->PLLCKSELR, RCC_PLLCKSELR_DIVM3, M << RCC_PLLCKSELR_DIVM3_Pos);
5304}
5305
5312__STATIC_INLINE void LL_RCC_PLL3_SetP(uint32_t P)
5313{
5314 MODIFY_REG(RCC->PLL3DIVR, RCC_PLL3DIVR_P3, (P - 1UL) << RCC_PLL3DIVR_P3_Pos);
5315}
5316
5323__STATIC_INLINE void LL_RCC_PLL3_SetQ(uint32_t Q)
5324{
5325 MODIFY_REG(RCC->PLL3DIVR, RCC_PLL3DIVR_Q3, (Q - 1UL) << RCC_PLL3DIVR_Q3_Pos);
5326}
5327
5334__STATIC_INLINE void LL_RCC_PLL3_SetR(uint32_t R)
5335{
5336 MODIFY_REG(RCC->PLL3DIVR, RCC_PLL3DIVR_R3, (R - 1UL) << RCC_PLL3DIVR_R3_Pos);
5337}
5338
5344__STATIC_INLINE void LL_RCC_PLL3_SetFRACN(uint32_t FRACN)
5345{
5346 MODIFY_REG(RCC->PLL3FRACR, RCC_PLL3FRACR_FRACN3, FRACN << RCC_PLL3FRACR_FRACN3_Pos);
5347}
5348
5349
5365__STATIC_INLINE void LL_RCC_ClearFlag_LSIRDY(void)
5366{
5367 SET_BIT(RCC->CICR, RCC_CICR_LSIRDYC);
5368}
5369
5375__STATIC_INLINE void LL_RCC_ClearFlag_LSERDY(void)
5376{
5377 SET_BIT(RCC->CICR, RCC_CICR_LSERDYC);
5378}
5379
5385__STATIC_INLINE void LL_RCC_ClearFlag_HSIRDY(void)
5386{
5387 SET_BIT(RCC->CICR, RCC_CICR_HSIRDYC);
5388}
5389
5395__STATIC_INLINE void LL_RCC_ClearFlag_HSERDY(void)
5396{
5397 SET_BIT(RCC->CICR, RCC_CICR_HSERDYC);
5398}
5399
5405__STATIC_INLINE void LL_RCC_ClearFlag_CSIRDY(void)
5406{
5407 SET_BIT(RCC->CICR, RCC_CICR_CSIRDYC);
5408}
5409
5415__STATIC_INLINE void LL_RCC_ClearFlag_HSI48RDY(void)
5416{
5417 SET_BIT(RCC->CICR, RCC_CICR_HSI48RDYC);
5418}
5419
5425__STATIC_INLINE void LL_RCC_ClearFlag_PLL1RDY(void)
5426{
5427 SET_BIT(RCC->CICR, RCC_CICR_PLLRDYC);
5428}
5429
5435__STATIC_INLINE void LL_RCC_ClearFlag_PLL2RDY(void)
5436{
5437 SET_BIT(RCC->CICR, RCC_CICR_PLL2RDYC);
5438}
5439
5445__STATIC_INLINE void LL_RCC_ClearFlag_PLL3RDY(void)
5446{
5447 SET_BIT(RCC->CICR, RCC_CICR_PLL3RDYC);
5448}
5449
5455__STATIC_INLINE void LL_RCC_ClearFlag_LSECSS(void)
5456{
5457 SET_BIT(RCC->CICR, RCC_CICR_LSECSSC);
5458}
5459
5465__STATIC_INLINE void LL_RCC_ClearFlag_HSECSS(void)
5466{
5467 SET_BIT(RCC->CICR, RCC_CICR_HSECSSC);
5468}
5469
5475__STATIC_INLINE uint32_t LL_RCC_IsActiveFlag_LSIRDY(void)
5476{
5477 return ((READ_BIT(RCC->CIFR, RCC_CIFR_LSIRDYF) == (RCC_CIFR_LSIRDYF)) ? 1UL : 0UL);
5478}
5479
5485__STATIC_INLINE uint32_t LL_RCC_IsActiveFlag_LSERDY(void)
5486{
5487 return ((READ_BIT(RCC->CIFR, RCC_CIFR_LSERDYF) == (RCC_CIFR_LSERDYF)) ? 1UL : 0UL);
5488}
5489
5495__STATIC_INLINE uint32_t LL_RCC_IsActiveFlag_HSIRDY(void)
5496{
5497 return ((READ_BIT(RCC->CIFR, RCC_CIFR_HSIRDYF) == (RCC_CIFR_HSIRDYF)) ? 1UL : 0UL);
5498}
5499
5505__STATIC_INLINE uint32_t LL_RCC_IsActiveFlag_HSERDY(void)
5506{
5507 return ((READ_BIT(RCC->CIFR, RCC_CIFR_HSERDYF) == (RCC_CIFR_HSERDYF)) ? 1UL : 0UL);
5508}
5509
5515__STATIC_INLINE uint32_t LL_RCC_IsActiveFlag_CSIRDY(void)
5516{
5517 return ((READ_BIT(RCC->CIFR, RCC_CIFR_CSIRDYF) == (RCC_CIFR_CSIRDYF)) ? 1UL : 0UL);
5518}
5519
5525__STATIC_INLINE uint32_t LL_RCC_IsActiveFlag_HSI48RDY(void)
5526{
5527 return ((READ_BIT(RCC->CIFR, RCC_CIFR_HSI48RDYF) == (RCC_CIFR_HSI48RDYF)) ? 1UL : 0UL);
5528}
5529
5535__STATIC_INLINE uint32_t LL_RCC_IsActiveFlag_PLL1RDY(void)
5536{
5537 return ((READ_BIT(RCC->CIFR, RCC_CIFR_PLLRDYF) == (RCC_CIFR_PLLRDYF)) ? 1UL : 0UL);
5538}
5539
5545__STATIC_INLINE uint32_t LL_RCC_IsActiveFlag_PLL2RDY(void)
5546{
5547 return ((READ_BIT(RCC->CIFR, RCC_CIFR_PLL2RDYF) == (RCC_CIFR_PLL2RDYF)) ? 1UL : 0UL);
5548}
5549
5555__STATIC_INLINE uint32_t LL_RCC_IsActiveFlag_PLL3RDY(void)
5556{
5557 return ((READ_BIT(RCC->CIFR, RCC_CIFR_PLL3RDYF) == (RCC_CIFR_PLL3RDYF)) ? 1UL : 0UL);
5558}
5559
5565__STATIC_INLINE uint32_t LL_RCC_IsActiveFlag_LSECSS(void)
5566{
5567 return ((READ_BIT(RCC->CIFR, RCC_CIFR_LSECSSF) == (RCC_CIFR_LSECSSF)) ? 1UL : 0UL);
5568}
5569
5575__STATIC_INLINE uint32_t LL_RCC_IsActiveFlag_HSECSS(void)
5576{
5577 return ((READ_BIT(RCC->CIFR, RCC_CIFR_HSECSSF) == (RCC_CIFR_HSECSSF)) ? 1UL : 0UL);
5578}
5579
5589__STATIC_INLINE uint32_t LL_RCC_IsActiveFlag_LPWRRST(void)
5590{
5591#if defined(DUAL_CORE)
5592 return ((READ_BIT(RCC->RSR, RCC_RSR_LPWR1RSTF) == (RCC_RSR_LPWR1RSTF)) ? 1UL : 0UL);
5593#else
5594 return ((READ_BIT(RCC->RSR, RCC_RSR_LPWRRSTF) == (RCC_RSR_LPWRRSTF)) ? 1UL : 0UL);
5595#endif /*DUAL_CORE*/
5596}
5597
5598#if defined(DUAL_CORE)
5604__STATIC_INLINE uint32_t LL_RCC_IsActiveFlag_LPWR2RST(void)
5605{
5606 return ((READ_BIT(RCC->RSR, RCC_RSR_LPWR2RSTF) == (RCC_RSR_LPWR2RSTF)) ? 1UL : 0UL);
5607}
5608#endif /*DUAL_CORE*/
5609
5615__STATIC_INLINE uint32_t LL_RCC_IsActiveFlag_WWDG1RST(void)
5616{
5617 return ((READ_BIT(RCC->RSR, RCC_RSR_WWDG1RSTF) == (RCC_RSR_WWDG1RSTF)) ? 1UL : 0UL);
5618}
5619
5620#if defined(DUAL_CORE)
5626__STATIC_INLINE uint32_t LL_RCC_IsActiveFlag_WWDG2RST(void)
5627{
5628 return ((READ_BIT(RCC->RSR, RCC_RSR_WWDG2RSTF) == (RCC_RSR_WWDG2RSTF)) ? 1UL : 0UL);
5629}
5630#endif /*DUAL_CORE*/
5631
5637__STATIC_INLINE uint32_t LL_RCC_IsActiveFlag_IWDG1RST(void)
5638{
5639 return ((READ_BIT(RCC->RSR, RCC_RSR_IWDG1RSTF) == (RCC_RSR_IWDG1RSTF)) ? 1UL : 0UL);
5640}
5641
5642#if defined(DUAL_CORE)
5648__STATIC_INLINE uint32_t LL_RCC_IsActiveFlag_IWDG2RST(void)
5649{
5650 return ((READ_BIT(RCC->RSR, RCC_RSR_IWDG2RSTF) == (RCC_RSR_IWDG2RSTF)) ? 1UL : 0UL);
5651}
5652#endif /*DUAL_CORE*/
5653
5663__STATIC_INLINE uint32_t LL_RCC_IsActiveFlag_SFTRST(void)
5664{
5665#if defined(DUAL_CORE)
5666 return ((READ_BIT(RCC->RSR, RCC_RSR_SFT1RSTF) == (RCC_RSR_SFT1RSTF)) ? 1UL : 0UL);
5667#else
5668 return ((READ_BIT(RCC->RSR, RCC_RSR_SFTRSTF) == (RCC_RSR_SFTRSTF)) ? 1UL : 0UL);
5669#endif /*DUAL_CORE*/
5670}
5671
5672#if defined(DUAL_CORE)
5678__STATIC_INLINE uint32_t LL_RCC_IsActiveFlag_SFT2RST(void)
5679{
5680 return ((READ_BIT(RCC->RSR, RCC_RSR_SFT2RSTF) == (RCC_RSR_SFT2RSTF)) ? 1UL : 0UL);
5681}
5682#endif /*DUAL_CORE*/
5683
5689__STATIC_INLINE uint32_t LL_RCC_IsActiveFlag_PORRST(void)
5690{
5691 return ((READ_BIT(RCC->RSR, RCC_RSR_PORRSTF) == (RCC_RSR_PORRSTF)) ? 1UL : 0UL);
5692}
5693
5699__STATIC_INLINE uint32_t LL_RCC_IsActiveFlag_PINRST(void)
5700{
5701 return ((READ_BIT(RCC->RSR, RCC_RSR_PINRSTF) == (RCC_RSR_PINRSTF)) ? 1UL : 0UL);
5702}
5703
5709__STATIC_INLINE uint32_t LL_RCC_IsActiveFlag_BORRST(void)
5710{
5711 return ((READ_BIT(RCC->RSR, RCC_RSR_BORRSTF) == (RCC_RSR_BORRSTF)) ? 1UL : 0UL);
5712}
5713
5714#if defined(RCC_RSR_D1RSTF)
5720__STATIC_INLINE uint32_t LL_RCC_IsActiveFlag_D1RST(void)
5721{
5722 return ((READ_BIT(RCC->RSR, RCC_RSR_D1RSTF) == (RCC_RSR_D1RSTF)) ? 1UL : 0UL);
5723}
5724#endif /* RCC_RSR_D1RSTF */
5725
5726#if defined(RCC_RSR_CDRSTF)
5732__STATIC_INLINE uint32_t LL_RCC_IsActiveFlag_CDRST(void)
5733{
5734 return ((READ_BIT(RCC->RSR, RCC_RSR_CDRSTF) == (RCC_RSR_CDRSTF)) ? 1UL : 0UL);
5735}
5736#endif /* RCC_RSR_CDRSTF */
5737
5738#if defined(RCC_RSR_D2RSTF)
5744__STATIC_INLINE uint32_t LL_RCC_IsActiveFlag_D2RST(void)
5745{
5746 return ((READ_BIT(RCC->RSR, RCC_RSR_D2RSTF) == (RCC_RSR_D2RSTF)) ? 1UL : 0UL);
5747}
5748#endif /* RCC_RSR_D2RSTF */
5749
5750#if defined(RCC_RSR_C1RSTF) || defined(RCC_RSR_CPURSTF)
5760__STATIC_INLINE uint32_t LL_RCC_IsActiveFlag_CPURST(void)
5761{
5762#if defined(DUAL_CORE)
5763 return ((READ_BIT(RCC->RSR, RCC_RSR_C1RSTF) == (RCC_RSR_C1RSTF)) ? 1UL : 0UL);
5764#else
5765 return ((READ_BIT(RCC->RSR, RCC_RSR_CPURSTF) == (RCC_RSR_CPURSTF)) ? 1UL : 0UL);
5766#endif/*DUAL_CORE*/
5767}
5768#endif /* defined(RCC_RSR_C1RSTF) || defined(RCC_RSR_CPURSTF) */
5769
5770#if defined(DUAL_CORE)
5776__STATIC_INLINE uint32_t LL_RCC_IsActiveFlag_CPU2RST(void)
5777{
5778 return ((READ_BIT(RCC->RSR, RCC_RSR_C2RSTF) == (RCC_RSR_C2RSTF)) ? 1UL : 0UL);
5779}
5780#endif /*DUAL_CORE*/
5781
5787__STATIC_INLINE void LL_RCC_ClearResetFlags(void)
5788{
5789 SET_BIT(RCC->RSR, RCC_RSR_RMVF);
5790}
5791
5792#if defined(DUAL_CORE)
5798__STATIC_INLINE uint32_t LL_C1_RCC_IsActiveFlag_LPWRRST(void)
5799{
5800 return ((READ_BIT(RCC_C1->RSR, RCC_RSR_LPWR1RSTF) == (RCC_RSR_LPWR1RSTF)) ? 1UL : 0UL);
5801}
5802
5808__STATIC_INLINE uint32_t LL_C1_RCC_IsActiveFlag_LPWR2RST(void)
5809{
5810 return ((READ_BIT(RCC_C1->RSR, RCC_RSR_LPWR2RSTF) == (RCC_RSR_LPWR2RSTF)) ? 1UL : 0UL);
5811}
5812
5818__STATIC_INLINE uint32_t LL_C1_RCC_IsActiveFlag_WWDG1RST(void)
5819{
5820 return ((READ_BIT(RCC_C1->RSR, RCC_RSR_WWDG1RSTF) == (RCC_RSR_WWDG1RSTF)) ? 1UL : 0UL);
5821}
5822
5828__STATIC_INLINE uint32_t LL_C1_RCC_IsActiveFlag_WWDG2RST(void)
5829{
5830 return ((READ_BIT(RCC_C1->RSR, RCC_RSR_WWDG2RSTF) == (RCC_RSR_WWDG2RSTF)) ? 1UL : 0UL);
5831}
5832
5838__STATIC_INLINE uint32_t LL_C1_RCC_IsActiveFlag_IWDG1RST(void)
5839{
5840 return ((READ_BIT(RCC_C1->RSR, RCC_RSR_IWDG1RSTF) == (RCC_RSR_IWDG1RSTF)) ? 1UL : 0UL);
5841}
5842
5848__STATIC_INLINE uint32_t LL_C1_RCC_IsActiveFlag_IWDG2RST(void)
5849{
5850 return ((READ_BIT(RCC_C1->RSR, RCC_RSR_IWDG2RSTF) == (RCC_RSR_IWDG2RSTF)) ? 1UL : 0UL);
5851}
5852
5858__STATIC_INLINE uint32_t LL_C1_RCC_IsActiveFlag_SFTRST(void)
5859{
5860 return ((READ_BIT(RCC_C1->RSR, RCC_RSR_SFT1RSTF) == (RCC_RSR_SFT1RSTF)) ? 1UL : 0UL);
5861}
5862
5868__STATIC_INLINE uint32_t LL_C1_RCC_IsActiveFlag_SFT2RST(void)
5869{
5870 return ((READ_BIT(RCC_C1->RSR, RCC_RSR_SFT2RSTF) == (RCC_RSR_SFT2RSTF)) ? 1UL : 0UL);
5871}
5872
5878__STATIC_INLINE uint32_t LL_C1_RCC_IsActiveFlag_PORRST(void)
5879{
5880 return ((READ_BIT(RCC_C1->RSR, RCC_RSR_PORRSTF) == (RCC_RSR_PORRSTF)) ? 1UL : 0UL);
5881}
5882
5888__STATIC_INLINE uint32_t LL_C1_RCC_IsActiveFlag_PINRST(void)
5889{
5890 return ((READ_BIT(RCC_C1->RSR, RCC_RSR_PINRSTF) == (RCC_RSR_PINRSTF)) ? 1UL : 0UL);
5891}
5892
5898__STATIC_INLINE uint32_t LL_C1_RCC_IsActiveFlag_BORRST(void)
5899{
5900 return ((READ_BIT(RCC_C1->RSR, RCC_RSR_BORRSTF) == (RCC_RSR_BORRSTF)) ? 1UL : 0UL);
5901}
5902
5908__STATIC_INLINE uint32_t LL_C1_RCC_IsActiveFlag_D1RST(void)
5909{
5910 return ((READ_BIT(RCC_C1->RSR, RCC_RSR_D1RSTF) == (RCC_RSR_D1RSTF)) ? 1UL : 0UL);
5911}
5912
5918__STATIC_INLINE uint32_t LL_C1_RCC_IsActiveFlag_D2RST(void)
5919{
5920 return ((READ_BIT(RCC_C1->RSR, RCC_RSR_D2RSTF) == (RCC_RSR_D2RSTF)) ? 1UL : 0UL);
5921}
5922
5928__STATIC_INLINE uint32_t LL_C1_RCC_IsActiveFlag_CPURST(void)
5929{
5930 return ((READ_BIT(RCC_C1->RSR, RCC_RSR_C1RSTF) == (RCC_RSR_C1RSTF)) ? 1UL : 0UL);
5931}
5932
5938__STATIC_INLINE uint32_t LL_C1_RCC_IsActiveFlag_CPU2RST(void)
5939{
5940 return ((READ_BIT(RCC_C1->RSR, RCC_RSR_C2RSTF) == (RCC_RSR_C2RSTF)) ? 1UL : 0UL);
5941}
5942
5948__STATIC_INLINE void LL_C1_RCC_ClearResetFlags(void)
5949{
5950 SET_BIT(RCC_C1->RSR, RCC_RSR_RMVF);
5951}
5952
5958__STATIC_INLINE uint32_t LL_C2_RCC_IsActiveFlag_LPWRRST(void)
5959{
5960 return ((READ_BIT(RCC_C2->RSR, RCC_RSR_LPWR1RSTF) == (RCC_RSR_LPWR1RSTF)) ? 1UL : 0UL);
5961}
5962
5968__STATIC_INLINE uint32_t LL_C2_RCC_IsActiveFlag_LPWR2RST(void)
5969{
5970 return ((READ_BIT(RCC_C2->RSR, RCC_RSR_LPWR2RSTF) == (RCC_RSR_LPWR2RSTF)) ? 1UL : 0UL);
5971}
5972
5978__STATIC_INLINE uint32_t LL_C2_RCC_IsActiveFlag_WWDG1RST(void)
5979{
5980 return ((READ_BIT(RCC_C2->RSR, RCC_RSR_WWDG1RSTF) == (RCC_RSR_WWDG1RSTF)) ? 1UL : 0UL);
5981}
5982
5988__STATIC_INLINE uint32_t LL_C2_RCC_IsActiveFlag_WWDG2RST(void)
5989{
5990 return ((READ_BIT(RCC_C2->RSR, RCC_RSR_WWDG2RSTF) == (RCC_RSR_WWDG2RSTF)) ? 1UL : 0UL);
5991}
5992
5998__STATIC_INLINE uint32_t LL_C2_RCC_IsActiveFlag_IWDG1RST(void)
5999{
6000 return ((READ_BIT(RCC_C2->RSR, RCC_RSR_IWDG1RSTF) == (RCC_RSR_IWDG1RSTF)) ? 1UL : 0UL);
6001}
6002
6008__STATIC_INLINE uint32_t LL_C2_RCC_IsActiveFlag_IWDG2RST(void)
6009{
6010 return ((READ_BIT(RCC_C2->RSR, RCC_RSR_IWDG2RSTF) == (RCC_RSR_IWDG2RSTF)) ? 1UL : 0UL);
6011}
6012
6018__STATIC_INLINE uint32_t LL_C2_RCC_IsActiveFlag_SFTRST(void)
6019{
6020 return ((READ_BIT(RCC_C2->RSR, RCC_RSR_SFT1RSTF) == (RCC_RSR_SFT1RSTF)) ? 1UL : 0UL);
6021}
6022
6028__STATIC_INLINE uint32_t LL_C2_RCC_IsActiveFlag_SFT2RST(void)
6029{
6030 return ((READ_BIT(RCC_C2->RSR, RCC_RSR_SFT2RSTF) == (RCC_RSR_SFT2RSTF)) ? 1UL : 0UL);
6031}
6032
6038__STATIC_INLINE uint32_t LL_C2_RCC_IsActiveFlag_PORRST(void)
6039{
6040 return ((READ_BIT(RCC_C2->RSR, RCC_RSR_PORRSTF) == (RCC_RSR_PORRSTF)) ? 1UL : 0UL);
6041}
6042
6048__STATIC_INLINE uint32_t LL_C2_RCC_IsActiveFlag_PINRST(void)
6049{
6050 return ((READ_BIT(RCC_C2->RSR, RCC_RSR_PINRSTF) == (RCC_RSR_PINRSTF)) ? 1UL : 0UL);
6051}
6052
6058__STATIC_INLINE uint32_t LL_C2_RCC_IsActiveFlag_BORRST(void)
6059{
6060 return ((READ_BIT(RCC_C2->RSR, RCC_RSR_BORRSTF) == (RCC_RSR_BORRSTF)) ? 1UL : 0UL);
6061}
6062
6068__STATIC_INLINE uint32_t LL_C2_RCC_IsActiveFlag_D1RST(void)
6069{
6070 return ((READ_BIT(RCC_C2->RSR, RCC_RSR_D1RSTF) == (RCC_RSR_D1RSTF)) ? 1UL : 0UL);
6071}
6072
6078__STATIC_INLINE uint32_t LL_C2_RCC_IsActiveFlag_D2RST(void)
6079{
6080 return ((READ_BIT(RCC_C2->RSR, RCC_RSR_D2RSTF) == (RCC_RSR_D2RSTF)) ? 1UL : 0UL);
6081}
6082
6088__STATIC_INLINE uint32_t LL_C2_RCC_IsActiveFlag_CPURST(void)
6089{
6090 return ((READ_BIT(RCC_C2->RSR, RCC_RSR_C1RSTF) == (RCC_RSR_C1RSTF)) ? 1UL : 0UL);
6091}
6092
6098__STATIC_INLINE uint32_t LL_C2_RCC_IsActiveFlag_CPU2RST(void)
6099{
6100 return ((READ_BIT(RCC_C2->RSR, RCC_RSR_C2RSTF) == (RCC_RSR_C2RSTF)) ? 1UL : 0UL);
6101}
6102
6108__STATIC_INLINE void LL_C2_RCC_ClearResetFlags(void)
6109{
6110 SET_BIT(RCC_C2->RSR, RCC_RSR_RMVF);
6111}
6112#endif /*DUAL_CORE*/
6113
6128__STATIC_INLINE void LL_RCC_EnableIT_LSIRDY(void)
6129{
6130 SET_BIT(RCC->CIER, RCC_CIER_LSIRDYIE);
6131}
6132
6138__STATIC_INLINE void LL_RCC_EnableIT_LSERDY(void)
6139{
6140 SET_BIT(RCC->CIER, RCC_CIER_LSERDYIE);
6141}
6142
6148__STATIC_INLINE void LL_RCC_EnableIT_HSIRDY(void)
6149{
6150 SET_BIT(RCC->CIER, RCC_CIER_HSIRDYIE);
6151}
6152
6158__STATIC_INLINE void LL_RCC_EnableIT_HSERDY(void)
6159{
6160 SET_BIT(RCC->CIER, RCC_CIER_HSERDYIE);
6161}
6162
6168__STATIC_INLINE void LL_RCC_EnableIT_CSIRDY(void)
6169{
6170 SET_BIT(RCC->CIER, RCC_CIER_CSIRDYIE);
6171}
6172
6178__STATIC_INLINE void LL_RCC_EnableIT_HSI48RDY(void)
6179{
6180 SET_BIT(RCC->CIER, RCC_CIER_HSI48RDYIE);
6181}
6182
6188__STATIC_INLINE void LL_RCC_EnableIT_PLL1RDY(void)
6189{
6190 SET_BIT(RCC->CIER, RCC_CIER_PLL1RDYIE);
6191}
6192
6198__STATIC_INLINE void LL_RCC_EnableIT_PLL2RDY(void)
6199{
6200 SET_BIT(RCC->CIER, RCC_CIER_PLL2RDYIE);
6201}
6202
6208__STATIC_INLINE void LL_RCC_EnableIT_PLL3RDY(void)
6209{
6210 SET_BIT(RCC->CIER, RCC_CIER_PLL3RDYIE);
6211}
6212
6218__STATIC_INLINE void LL_RCC_EnableIT_LSECSS(void)
6219{
6220 SET_BIT(RCC->CIER, RCC_CIER_LSECSSIE);
6221}
6222
6228__STATIC_INLINE void LL_RCC_DisableIT_LSIRDY(void)
6229{
6230 CLEAR_BIT(RCC->CIER, RCC_CIER_LSIRDYIE);
6231}
6232
6238__STATIC_INLINE void LL_RCC_DisableIT_LSERDY(void)
6239{
6240 CLEAR_BIT(RCC->CIER, RCC_CIER_LSERDYIE);
6241}
6242
6248__STATIC_INLINE void LL_RCC_DisableIT_HSIRDY(void)
6249{
6250 CLEAR_BIT(RCC->CIER, RCC_CIER_HSIRDYIE);
6251}
6252
6258__STATIC_INLINE void LL_RCC_DisableIT_HSERDY(void)
6259{
6260 CLEAR_BIT(RCC->CIER, RCC_CIER_HSERDYIE);
6261}
6262
6268__STATIC_INLINE void LL_RCC_DisableIT_CSIRDY(void)
6269{
6270 CLEAR_BIT(RCC->CIER, RCC_CIER_CSIRDYIE);
6271}
6272
6278__STATIC_INLINE void LL_RCC_DisableIT_HSI48RDY(void)
6279{
6280 CLEAR_BIT(RCC->CIER, RCC_CIER_HSI48RDYIE);
6281}
6282
6288__STATIC_INLINE void LL_RCC_DisableIT_PLL1RDY(void)
6289{
6290 CLEAR_BIT(RCC->CIER, RCC_CIER_PLL1RDYIE);
6291}
6292
6298__STATIC_INLINE void LL_RCC_DisableIT_PLL2RDY(void)
6299{
6300 CLEAR_BIT(RCC->CIER, RCC_CIER_PLL2RDYIE);
6301}
6302
6308__STATIC_INLINE void LL_RCC_DisableIT_PLL3RDY(void)
6309{
6310 CLEAR_BIT(RCC->CIER, RCC_CIER_PLL3RDYIE);
6311}
6312
6318__STATIC_INLINE void LL_RCC_DisableIT_LSECSS(void)
6319{
6320 CLEAR_BIT(RCC->CIER, RCC_CIER_LSECSSIE);
6321}
6322
6328__STATIC_INLINE uint32_t LL_RCC_IsEnableIT_LSIRDY(void)
6329{
6330 return ((READ_BIT(RCC->CIER, RCC_CIER_LSIRDYIE) == RCC_CIER_LSIRDYIE) ? 1UL : 0UL);
6331}
6332
6338__STATIC_INLINE uint32_t LL_RCC_IsEnableIT_LSERDY(void)
6339{
6340 return ((READ_BIT(RCC->CIER, RCC_CIER_LSERDYIE) == RCC_CIER_LSERDYIE) ? 1UL : 0UL);
6341}
6342
6348__STATIC_INLINE uint32_t LL_RCC_IsEnableIT_HSIRDY(void)
6349{
6350 return ((READ_BIT(RCC->CIER, RCC_CIER_HSIRDYIE) == RCC_CIER_HSIRDYIE) ? 1UL : 0UL);
6351}
6352
6358__STATIC_INLINE uint32_t LL_RCC_IsEnableIT_HSERDY(void)
6359{
6360 return ((READ_BIT(RCC->CIER, RCC_CIER_HSERDYIE) == RCC_CIER_HSERDYIE) ? 1UL : 0UL);
6361}
6362
6368__STATIC_INLINE uint32_t LL_RCC_IsEnableIT_CSIRDY(void)
6369{
6370 return ((READ_BIT(RCC->CIER, RCC_CIER_CSIRDYIE) == RCC_CIER_CSIRDYIE) ? 1UL : 0UL);
6371}
6372
6378__STATIC_INLINE uint32_t LL_RCC_IsEnableIT_HSI48RDY(void)
6379{
6380 return ((READ_BIT(RCC->CIER, RCC_CIER_HSI48RDYIE) == RCC_CIER_HSI48RDYIE) ? 1UL : 0UL);
6381}
6382
6388__STATIC_INLINE uint32_t LL_RCC_IsEnableIT_PLL1RDY(void)
6389{
6390 return ((READ_BIT(RCC->CIER, RCC_CIER_PLL1RDYIE) == RCC_CIER_PLL1RDYIE) ? 1UL : 0UL);
6391}
6392
6398__STATIC_INLINE uint32_t LL_RCC_IsEnableIT_PLL2RDY(void)
6399{
6400 return ((READ_BIT(RCC->CIER, RCC_CIER_PLL2RDYIE) == RCC_CIER_PLL2RDYIE) ? 1UL : 0UL);
6401}
6402
6408__STATIC_INLINE uint32_t LL_RCC_IsEnableIT_PLL3RDY(void)
6409{
6410 return ((READ_BIT(RCC->CIER, RCC_CIER_PLL3RDYIE) == RCC_CIER_PLL3RDYIE) ? 1UL : 0UL);
6411}
6412
6418__STATIC_INLINE uint32_t LL_RCC_IsEnableIT_LSECSS(void)
6419{
6420 return ((READ_BIT(RCC->CIER, RCC_CIER_LSECSSIE) == RCC_CIER_LSECSSIE) ? 1UL : 0UL);
6421}
6426#if defined(USE_FULL_LL_DRIVER) || defined(__rtems__)
6431void LL_RCC_DeInit(void);
6440uint32_t LL_RCC_CalcPLLClockFreq(uint32_t PLLInputFreq, uint32_t M, uint32_t N, uint32_t FRACN, uint32_t PQR);
6441
6442void LL_RCC_GetPLL1ClockFreq(LL_PLL_ClocksTypeDef *PLL_Clocks);
6443void LL_RCC_GetPLL2ClockFreq(LL_PLL_ClocksTypeDef *PLL_Clocks);
6444void LL_RCC_GetPLL3ClockFreq(LL_PLL_ClocksTypeDef *PLL_Clocks);
6445void LL_RCC_GetSystemClocksFreq(LL_RCC_ClocksTypeDef *RCC_Clocks);
6446
6447uint32_t LL_RCC_GetUSARTClockFreq(uint32_t USARTxSource);
6448uint32_t LL_RCC_GetLPUARTClockFreq(uint32_t LPUARTxSource);
6449uint32_t LL_RCC_GetI2CClockFreq(uint32_t I2CxSource);
6450uint32_t LL_RCC_GetLPTIMClockFreq(uint32_t LPTIMxSource);
6451uint32_t LL_RCC_GetSAIClockFreq(uint32_t SAIxSource);
6452uint32_t LL_RCC_GetADCClockFreq(uint32_t ADCxSource);
6453uint32_t LL_RCC_GetSDMMCClockFreq(uint32_t SDMMCxSource);
6454uint32_t LL_RCC_GetRNGClockFreq(uint32_t RNGxSource);
6455uint32_t LL_RCC_GetCECClockFreq(uint32_t CECxSource);
6456uint32_t LL_RCC_GetUSBClockFreq(uint32_t USBxSource);
6457uint32_t LL_RCC_GetDFSDMClockFreq(uint32_t DFSDMxSource);
6458#if defined(DFSDM2_BASE)
6459uint32_t LL_RCC_GetDFSDM2ClockFreq(uint32_t DFSDMxSource);
6460#endif /* DFSDM2_BASE */
6461#if defined(DSI)
6462uint32_t LL_RCC_GetDSIClockFreq(uint32_t DSIxSource);
6463#endif /* DSI */
6464uint32_t LL_RCC_GetSPDIFClockFreq(uint32_t SPDIFxSource);
6465uint32_t LL_RCC_GetSPIClockFreq(uint32_t SPIxSource);
6466uint32_t LL_RCC_GetSWPClockFreq(uint32_t SWPxSource);
6467uint32_t LL_RCC_GetFDCANClockFreq(uint32_t FDCANxSource);
6468uint32_t LL_RCC_GetFMCClockFreq(uint32_t FMCxSource);
6469#if defined(QUADSPI)
6470uint32_t LL_RCC_GetQSPIClockFreq(uint32_t QSPIxSource);
6471#endif /* QUADSPI */
6472#if defined(OCTOSPI1) || defined(OCTOSPI2)
6473uint32_t LL_RCC_GetOSPIClockFreq(uint32_t OSPIxSource);
6474#endif /* defined(OCTOSPI1) || defined(OCTOSPI2) */
6475uint32_t LL_RCC_GetCLKPClockFreq(uint32_t CLKPxSource);
6476
6477
6481#endif /* USE_FULL_LL_DRIVER */
6482
6491#endif /* defined(RCC) */
6492
6497#ifdef __cplusplus
6498}
6499#endif
6500
6501#endif /* STM32H7xx_LL_RCC_H */
6502
#define RCC_CR_CPUCKRDY
Definition: stm32h7a3xx.h:12539
#define RCC_CR_CSIRDY
Definition: stm32h723xx.h:14377
#define RCC_CDCFGR1_CDPPRE
Definition: stm32h7a3xx.h:12784
#define RCC_D1CFGR_D1PPRE
Definition: stm32h723xx.h:14633
#define RCC_CDCFGR2_CDPPRE1
Definition: stm32h7a3xx.h:12841
#define RCC_CR_HSIDIV
Definition: stm32h723xx.h:14363
#define RCC_CR_PLL2RDY
Definition: stm32h723xx.h:14420
#define RCC_CR_PLL2ON
Definition: stm32h723xx.h:14417
#define RCC_D1CFGR_D1CPRE
Definition: stm32h723xx.h:14654
#define RCC_CR_PLL1RDY
Definition: stm32h723xx.h:14414
#define RCC_CFGR_HRTIMSEL
Definition: stm32h742xx.h:13892
#define RCC_CR_PLL3RDY
Definition: stm32h723xx.h:14426
#define RCC_HSICFGR_HSITRIM
Definition: stm32h723xx.h:14457
#define RCC_CDCFGR2_CDPPRE2
Definition: stm32h7a3xx.h:12863
#define RCC_CR_PLL1ON
Definition: stm32h723xx.h:14411
#define RCC_CR_CDCKRDY
Definition: stm32h7a3xx.h:12542
#define RCC_CSICFGR_CSICAL_Pos
Definition: stm32h723xx.h:14487
#define RCC_CRRCR_HSI48CAL_Pos
Definition: stm32h723xx.h:14470
#define RCC_CFGR_STOPWUCK
Definition: stm32h723xx.h:14539
#define RCC_CR_D1CKRDY
Definition: stm32h723xx.h:14390
#define RCC_CFGR_TIMPRE
Definition: stm32h723xx.h:14560
#define RCC_CR_D2CKRDY
Definition: stm32h723xx.h:14393
#define RCC_CDCFGR1_HPRE
Definition: stm32h7a3xx.h:12749
#define RCC_CRRCR_HSI48CAL
Definition: stm32h723xx.h:14472
#define RCC_CR_PLL3ON
Definition: stm32h723xx.h:14423
#define RCC_CSICFGR_CSITRIM
Definition: stm32h723xx.h:14502
#define RCC_HSICFGR_HSICAL
Definition: stm32h723xx.h:14440
#define RCC_HSICFGR_HSICAL_Pos
Definition: stm32h723xx.h:14438
#define RCC_D3CFGR_D3PPRE
Definition: stm32h723xx.h:14735
#define RCC_D1CFGR_HPRE
Definition: stm32h723xx.h:14597
#define RCC_CR_HSIKERON
Definition: stm32h723xx.h:14357
#define RCC_D2CFGR_D2PPRE2
Definition: stm32h723xx.h:14712
#define RCC_CSICFGR_CSICAL
Definition: stm32h723xx.h:14489
#define RCC_CFGR_STOPKERWUCK
Definition: stm32h723xx.h:14543
#define RCC_SRDCFGR_SRDPPRE
Definition: stm32h7a3xx.h:12886
#define RCC_CR_CSSHSEON
Definition: stm32h723xx.h:14406
#define RCC_CR_HSI48ON
Definition: stm32h723xx.h:14383
#define RCC_CDCFGR1_CDCPRE
Definition: stm32h7a3xx.h:12805
#define RCC_CR_HSI48RDY
Definition: stm32h723xx.h:14386
#define RCC_D2CFGR_D2PPRE1
Definition: stm32h723xx.h:14690
#define RCC_CR_CSION
Definition: stm32h723xx.h:14374
#define RCC_CR_HSEEXT
Definition: stm32h7a3xx.h:12559
#define RCC_CR_CSIKERON
Definition: stm32h723xx.h:14380
#define RCC_CR_HSIDIVF
Definition: stm32h723xx.h:14371
CMSIS STM32H7xx Device Peripheral Access Layer Header File.