40#ifndef LIBOPENCM3_RCC_H
41#define LIBOPENCM3_RCC_H
49#define RCC_CR MMIO32(RCC_BASE + 0x00)
50#define RCC_ICSCR MMIO32(RCC_BASE + 0x04)
51#define RCC_CRRCR MMIO32(RCC_BASE + 0x08)
52#define RCC_CFGR MMIO32(RCC_BASE + 0x0c)
53#define RCC_CIER MMIO32(RCC_BASE + 0x10)
54#define RCC_CIFR MMIO32(RCC_BASE + 0x14)
55#define RCC_CICR MMIO32(RCC_BASE + 0x18)
56#define RCC_IOPRSTR MMIO32(RCC_BASE + 0x1c)
57#define RCC_AHBRSTR MMIO32(RCC_BASE + 0x20)
58#define RCC_APB2RSTR MMIO32(RCC_BASE + 0x24)
59#define RCC_APB1RSTR MMIO32(RCC_BASE + 0x28)
60#define RCC_IOPENR MMIO32(RCC_BASE + 0x2c)
61#define RCC_AHBENR MMIO32(RCC_BASE + 0x30)
62#define RCC_APB2ENR MMIO32(RCC_BASE + 0x34)
63#define RCC_APB1ENR MMIO32(RCC_BASE + 0x38)
64#define RCC_IOPSMEN MMIO32(RCC_BASE + 0x3c)
65#define RCC_AHBSMENR MMIO32(RCC_BASE + 0x40)
66#define RCC_APB2SMENR MMIO32(RCC_BASE + 0x44)
67#define RCC_APB1SMENR MMIO32(RCC_BASE + 0x48)
68#define RCC_CCIPR MMIO32(RCC_BASE + 0x4c)
69#define RCC_CSR MMIO32(RCC_BASE + 0x50)
73#define RCC_CR_PLLRDY (1 << 25)
74#define RCC_CR_PLLON (1 << 24)
75#define RCC_CR_RTCPRE_SHIFT 20
76#define RCC_CR_RTCPRE_MASK 0x3
77#define RCC_CR_RTCPRE_DIV2 0
78#define RCC_CR_RTCPRE_DIV4 1
79#define RCC_CR_RTCPRE_DIV8 2
80#define RCC_CR_RTCPRE_DIV16 3
81#define RCC_CR_CSSHSEON (1 << 19)
82#define RCC_CR_HSEBYP (1 << 18)
83#define RCC_CR_HSERDY (1 << 17)
84#define RCC_CR_HSEON (1 << 16)
85#define RCC_CR_MSIRDY (1 << 9)
86#define RCC_CR_MSION (1 << 8)
87#define RCC_CR_HSI16DIVF (1 << 4)
88#define RCC_CR_HSI16DIVEN (1 << 3)
89#define RCC_CR_HSI16RDY (1 << 2)
90#define RCC_CR_HSI16KERON (1 << 1)
91#define RCC_CR_HSI16ON (1 << 0)
96#define RCC_ICSCR_MSITRIM_SHIFT 24
97#define RCC_ICSCR_MSITRIM_MASK 0xff
98#define RCC_ICSCR_MSICAL_SHIFT 16
99#define RCC_ICSCR_MSICAL_MASK 0xff
101#define RCC_ICSCR_MSIRANGE_SHIFT 13
102#define RCC_ICSCR_MSIRANGE_MASK 0x7
103#define RCC_ICSCR_MSIRANGE_65KHZ 0x0
104#define RCC_ICSCR_MSIRANGE_131KHZ 0x1
105#define RCC_ICSCR_MSIRANGE_262KHZ 0x2
106#define RCC_ICSCR_MSIRANGE_524KHZ 0x3
107#define RCC_ICSCR_MSIRANGE_1MHZ 0x4
108#define RCC_ICSCR_MSIRANGE_2MHZ 0x5
109#define RCC_ICSCR_MSIRANGE_4MHZ 0x6
111#define RCC_ICSCR_HSI16TRIM_SHIFT 8
112#define RCC_ICSCR_HSI16TRIM_MASK 0x1f
113#define RCC_ICSCR_HSI16CAL_SHIFT 0
114#define RCC_ICSCR_HSI16CAL_MASK 0xff
118#define RCC_CRRCR_HSI48CAL_SHIFT 8
119#define RCC_CRRCR_HSI48CAL_MASK 0xff
120#define RCC_CRRCR_HSI48RDY (1<<1)
121#define RCC_CRRCR_HSI48ON (1<<0)
126#define RCC_CFGR_MCOPRE_DIV1 0
127#define RCC_CFGR_MCOPRE_DIV2 1
128#define RCC_CFGR_MCOPRE_DIV4 2
129#define RCC_CFGR_MCOPRE_DIV8 3
130#define RCC_CFGR_MCOPRE_DIV16 4
133#define RCC_CFGR_MCO_NOCLK 0x0
134#define RCC_CFGR_MCO_SYSCLK 0x1
135#define RCC_CFGR_MCO_HSI16 0x2
136#define RCC_CFGR_MCO_MSI 0x3
137#define RCC_CFGR_MCO_HSE 0x4
138#define RCC_CFGR_MCO_PLL 0x5
139#define RCC_CFGR_MCO_LSI 0x6
140#define RCC_CFGR_MCO_LSE 0x7
141#define RCC_CFGR_MCO_HSI48 0x8
142#define RCC_CFGR_MCO_SHIFT 24
143#define RCC_CFGR_MCO_MASK 0xf
147#define RCC_CFGR_PLLDIV_DIV2 0x1
148#define RCC_CFGR_PLLDIV_DIV3 0x2
149#define RCC_CFGR_PLLDIV_DIV4 0x3
151#define RCC_CFGR_PLLDIV_SHIFT 22
152#define RCC_CFGR_PLLDIV_MASK 0x3
156#define RCC_CFGR_PLLMUL_MUL3 0x0
157#define RCC_CFGR_PLLMUL_MUL4 0x1
158#define RCC_CFGR_PLLMUL_MUL6 0x2
159#define RCC_CFGR_PLLMUL_MUL8 0x3
160#define RCC_CFGR_PLLMUL_MUL12 0x4
161#define RCC_CFGR_PLLMUL_MUL16 0x5
162#define RCC_CFGR_PLLMUL_MUL24 0x6
163#define RCC_CFGR_PLLMUL_MUL32 0x7
164#define RCC_CFGR_PLLMUL_MUL48 0x8
166#define RCC_CFGR_PLLMUL_SHIFT 18
167#define RCC_CFGR_PLLMUL_MASK 0xf
170#define RCC_CFGR_PLLSRC_HSI16_CLK 0x0
171#define RCC_CFGR_PLLSRC_HSE_CLK 0x1
174#define RCC_CFGR_STOPWUCK_MSI (0<<15)
175#define RCC_CFGR_STOPWUCK_HSI16 (1<<15)
177#define RCC_CFGR_PPRE2_SHIFT 11
178#define RCC_CFGR_PPRE2_MASK 0x7
179#define RCC_CFGR_PPRE1_SHIFT 8
180#define RCC_CFGR_PPRE1_MASK 0x7
185#define RCC_CFGR_PPRE_NODIV 0x0
186#define RCC_CFGR_PPRE_DIV2 0x4
187#define RCC_CFGR_PPRE_DIV4 0x5
188#define RCC_CFGR_PPRE_DIV8 0x6
189#define RCC_CFGR_PPRE_DIV16 0x7
195#define RCC_CFGR_HPRE_NODIV 0x0
196#define RCC_CFGR_HPRE_DIV2 0x8
197#define RCC_CFGR_HPRE_DIV4 0x9
198#define RCC_CFGR_HPRE_DIV8 0xa
199#define RCC_CFGR_HPRE_DIV16 0xb
200#define RCC_CFGR_HPRE_DIV64 0xc
201#define RCC_CFGR_HPRE_DIV128 0xd
202#define RCC_CFGR_HPRE_DIV256 0xe
203#define RCC_CFGR_HPRE_DIV512 0xf
205#define RCC_CFGR_HPRE_MASK 0xf
206#define RCC_CFGR_HPRE_SHIFT 4
209#define RCC_CFGR_SWS_MSI 0x0
210#define RCC_CFGR_SWS_HSI16 0x1
211#define RCC_CFGR_SWS_HSE 0x2
212#define RCC_CFGR_SWS_PLL 0x3
213#define RCC_CFGR_SWS_MASK 0x3
214#define RCC_CFGR_SWS_SHIFT 2
217#define RCC_CFGR_SW_MSI 0x0
218#define RCC_CFGR_SW_HSI16 0x1
219#define RCC_CFGR_SW_HSE 0x2
220#define RCC_CFGR_SW_PLL 0x3
221#define RCC_CFGR_SW_MASK 0x3
222#define RCC_CFGR_SW_SHIFT 0
229#define RCC_CFGR_PPRE2_NODIV 0x0
230#define RCC_CFGR_PPRE2_DIV2 0x4
231#define RCC_CFGR_PPRE2_DIV4 0x5
232#define RCC_CFGR_PPRE2_DIV8 0x6
233#define RCC_CFGR_PPRE2_DIV16 0x7
235#define RCC_CFGR_PPRE1_NODIV 0x0
236#define RCC_CFGR_PPRE1_DIV2 0x4
237#define RCC_CFGR_PPRE1_DIV4 0x5
238#define RCC_CFGR_PPRE1_DIV8 0x6
239#define RCC_CFGR_PPRE1_DIV16 0x7
244#define RCC_CIER_CSSLSE (1 << 7)
246#define RCC_CIER_HSI48RDYIE (1 << 6)
247#define RCC_CIER_MSIRDYIE (1 << 5)
248#define RCC_CIER_PLLRDYIE (1 << 4)
249#define RCC_CIER_HSERDYIE (1 << 3)
250#define RCC_CIER_HSI16RDYIE (1 << 2)
251#define RCC_CIER_LSERDYIE (1 << 1)
252#define RCC_CIER_LSIRDYIE (1 << 0)
256#define RCC_CIFR_CSSHSEF (1 << 8)
257#define RCC_CIFR_CSSLSEF (1 << 7)
258#define RCC_CIFR_HSI48RDYF (1 << 6)
259#define RCC_CIFR_MSIRDYF (1 << 5)
260#define RCC_CIFR_PLLRDYF (1 << 4)
261#define RCC_CIFR_HSERDYF (1 << 3)
262#define RCC_CIFR_HSI16RDYF (1 << 2)
263#define RCC_CIFR_LSERDYF (1 << 1)
264#define RCC_CIFR_LSIRDYF (1 << 0)
268#define RCC_CICR_CSSHSEC (1 << 8)
269#define RCC_CICR_CSSLSEC (1 << 7)
270#define RCC_CICR_HSI48RDYC (1 << 6)
271#define RCC_CICR_MSIRDYC (1 << 5)
272#define RCC_CICR_PLLRDYC (1 << 4)
273#define RCC_CICR_HSERDYC (1 << 3)
274#define RCC_CICR_HSI16RDYC (1 << 2)
275#define RCC_CICR_LSERDYC (1 << 1)
276#define RCC_CICR_LSIRDYC (1 << 0)
280#define RCC_IOPPRSTR_IOPHRST (1<<7)
281#define RCC_IOPPRSTR_IOPERST (1<<4)
282#define RCC_IOPPRSTR_IOPDRST (1<<3)
283#define RCC_IOPPRSTR_IOPCRST (1<<2)
284#define RCC_IOPPRSTR_IOPBRST (1<<1)
285#define RCC_IOPPRSTR_IOPARST (1<<0)
289#define RCC_AHBRSTR_CRYPRST (1 << 24)
290#define RCC_AHBRSTR_RNGRST (1 << 20)
291#define RCC_AHBRSTR_TSCRST (1 << 16)
292#define RCC_AHBRSTR_CRCRST (1 << 12)
293#define RCC_AHBRSTR_MIFRST (1 << 8)
294#define RCC_AHBRSTR_DMARST (1 << 0)
299#define RCC_APB2RSTR_DBGRST (1 << 22)
300#define RCC_APB2RSTR_USART1RST (1 << 14)
301#define RCC_APB2RSTR_SPI1RST (1 << 12)
302#define RCC_APB2RSTR_ADC1RST (1 << 9)
303#define RCC_APB2RSTR_TIM22RST (1 << 5)
304#define RCC_APB2RSTR_TIM21RST (1 << 2)
305#define RCC_APB2RSTR_SYSCFGRST (1 << 0)
310#define RCC_APB1RSTR_LPTIM1RST (1 << 31)
311#define RCC_APB1RSTR_I2C3RST (1 << 30)
312#define RCC_APB1RSTR_DACRST (1 << 29)
313#define RCC_APB1RSTR_PWRRST (1 << 28)
314#define RCC_APB1RSTR_CRSRST (1 << 27)
315#define RCC_APB1RSTR_USBRST (1 << 23)
316#define RCC_APB1RSTR_I2C2RST (1 << 22)
317#define RCC_APB1RSTR_I2C1RST (1 << 21)
318#define RCC_APB1RSTR_USART5RST (1 << 20)
319#define RCC_APB1RSTR_USART4RST (1 << 19)
320#define RCC_APB1RSTR_LPUART1RST (1 << 18)
321#define RCC_APB1RSTR_USART2RST (1 << 17)
322#define RCC_APB1RSTR_SPI2RST (1 << 14)
323#define RCC_APB1RSTR_WWDGRST (1 << 11)
324#define RCC_APB1RSTR_LCDRST (1 << 9)
325#define RCC_APB1RSTR_TIM7RST (1 << 5)
326#define RCC_APB1RSTR_TIM6RST (1 << 4)
327#define RCC_APB1RSTR_TIM3RST (1 << 1)
328#define RCC_APB1RSTR_TIM2RST (1 << 0)
333#define RCC_IOPENR_IOPHEN (1<<7)
334#define RCC_IOPENR_IOPEEN (1<<4)
335#define RCC_IOPENR_IOPDEN (1<<3)
336#define RCC_IOPENR_IOPCEN (1<<2)
337#define RCC_IOPENR_IOPBEN (1<<1)
338#define RCC_IOPENR_IOPAEN (1<<0)
342#define RCC_AHBENR_CRYPEN (1 << 24)
343#define RCC_AHBENR_RNGEN (1 << 20)
344#define RCC_AHBENR_TSCEN (1 << 16)
345#define RCC_AHBENR_CRCEN (1 << 12)
346#define RCC_AHBENR_MIFEN (1 << 8)
347#define RCC_AHBENR_DMAEN (1 << 0)
352#define RCC_APB2ENR_DBGEN (1 << 22)
353#define RCC_APB2ENR_USART1EN (1 << 14)
354#define RCC_APB2ENR_SPI1EN (1 << 12)
355#define RCC_APB2ENR_ADC1EN (1 << 9)
356#define RCC_APB2ENR_MIFEN (1 << 7)
357#define RCC_APB2ENR_TIM22EN (1 << 5)
358#define RCC_APB2ENR_TIM21EN (1 << 2)
359#define RCC_APB2ENR_SYSCFGEN (1 << 0)
364#define RCC_APB1ENR_LPTIM1EN (1 << 31)
365#define RCC_APB1ENR_DACEN (1 << 29)
366#define RCC_APB1ENR_PWREN (1 << 28)
367#define RCC_APB1ENR_CRSEN (1 << 27)
368#define RCC_APB1ENR_USBEN (1 << 23)
369#define RCC_APB1ENR_I2C2EN (1 << 22)
370#define RCC_APB1ENR_I2C1EN (1 << 21)
371#define RCC_APB1ENR_USART5EN (1 << 20)
372#define RCC_APB1ENR_USART4EN (1 << 19)
373#define RCC_APB1ENR_LPUART1EN (1 << 18)
374#define RCC_APB1ENR_USART2EN (1 << 17)
375#define RCC_APB1ENR_SPI2EN (1 << 14)
376#define RCC_APB1ENR_WWDGEN (1 << 11)
377#define RCC_APB1ENR_LCDEN (1 << 9)
378#define RCC_APB1ENR_TIM7EN (1 << 5)
379#define RCC_APB1ENR_TIM6EN (1 << 4)
380#define RCC_APB1ENR_TIM3EN (1 << 1)
381#define RCC_APB1ENR_TIM2EN (1 << 0)
386#define RCC_IOPSMENR_IOPHSMEN (1<<7)
387#define RCC_IOPSMENR_IOPESMEN (1<<4)
388#define RCC_IOPSMENR_IOPDSMEN (1<<3)
389#define RCC_IOPSMENR_IOPCSMEN (1<<2)
390#define RCC_IOPSMENR_IOPBSMEN (1<<1)
391#define RCC_IOPSMENR_IOPASMEN (1<<0)
395#define RCC_AHBSMENR_CRYPSMEN (1 << 24)
396#define RCC_AHBSMENR_RNGSMEN (1 << 20)
397#define RCC_AHBSMENR_TSCSMEN (1 << 16)
398#define RCC_AHBSMENR_CRCSMEN (1 << 12)
399#define RCC_AHBSMENR_MIFSMEN (1 << 8)
400#define RCC_AHBSMENR_DMASMEN (1 << 0)
404#define RCC_APB2SMENR_DBGSMEN (1 << 22)
405#define RCC_APB2SMENR_USART1SMEN (1 << 14)
406#define RCC_APB2SMENR_SPI1SMEN (1 << 12)
407#define RCC_APB2SMENR_ADC1SMEN (1 << 9)
408#define RCC_APB2SMENR_MIFSMEN (1 << 7)
409#define RCC_APB2SMENR_TIM22SMEN (1 << 5)
410#define RCC_APB2SMENR_TIM21SMEN (1 << 2)
411#define RCC_APB2SMENR_SYSCFGSMEN (1 << 0)
415#define RCC_APB1SMENR_LPTIM1SMEN (1 << 31)
416#define RCC_APB1SMENR_I2C3SMEN (1 << 30)
417#define RCC_APB1SMENR_DACSMEN (1 << 29)
418#define RCC_APB1SMENR_PWRSMEN (1 << 28)
419#define RCC_APB1SMENR_CRSSMEN (1 << 27)
420#define RCC_APB1SMENR_USBSMEN (1 << 23)
421#define RCC_APB1SMENR_I2C2SMEN (1 << 22)
422#define RCC_APB1SMENR_I2C1SMEN (1 << 21)
423#define RCC_APB1SMENR_USART5SMEN (1 << 20)
424#define RCC_APB1SMENR_USART4SMEN (1 << 19)
425#define RCC_APB1SMENR_LPUART1SMEN (1 << 18)
426#define RCC_APB1SMENR_USART2SMEN (1 << 17)
427#define RCC_APB1SMENR_SPI2SMEN (1 << 14)
428#define RCC_APB1SMENR_WWDGSMEN (1 << 11)
429#define RCC_APB1SMENR_LCDSMEN (1 << 9)
430#define RCC_APB1SMENR_TIM7SMEN (1 << 5)
431#define RCC_APB1SMENR_TIM6SMEN (1 << 4)
432#define RCC_APB1SMENR_TIM3SMEN (1 << 1)
433#define RCC_APB1SMENR_TIM2SMEN (1 << 0)
437#define RCC_CCIPR_HSI48SEL (1<<26)
439#define RCC_CCIPR_LPTIM1SEL_APB 0
440#define RCC_CCIPR_LPTIM1SEL_LSI 1
441#define RCC_CCIPR_LPTIM1SEL_HSI16 2
442#define RCC_CCIPR_LPTIM1SEL_LSE 3
443#define RCC_CCIPR_LPTIM1SEL_SHIFT 18
444#define RCC_CCIPR_LPTIM1SEL_MASK 0x3
449#define RCC_CCIPR_I2CxSEL_PCLK 0
450#define RCC_CCIPR_I2CxSEL_SYSCLK 1
451#define RCC_CCIPR_I2CxSEL_HSI 2
453#define RCC_CCIPR_I2CxSEL_MASK 0x3
459#define RCC_CCIPR_I2C3SEL_SHIFT 16
460#define RCC_CCIPR_I2C1SEL_SHIFT 12
466#define RCC_CCIPR_USARTxSEL_PCLK 0
467#define RCC_CCIPR_USARTxSEL_SYSCLK 1
468#define RCC_CCIPR_USARTxSEL_HSI 2
469#define RCC_CCIPR_USARTxSEL_LSE 3
472#define RCC_CCIPR_LPUARTxSEL_PCLK RCC_CCIPR_USARTxSEL_PCLK
473#define RCC_CCIPR_LPUARTxSEL_SYSCK RCC_CCIPR_USARTxSEL_SYSCLK
474#define RCC_CCIPR_LPUARTxSEL_HSI RCC_CCIPR_USARTxSEL_HSI
475#define RCC_CCIPR_LPUARTxSEL_LSE RCC_CCIPR_USARTxSEL_LSE
477#define RCC_CCIPR_LPUARTxSEL_MASK 0x3
478#define RCC_CCIPR_USARTxSEL_MASK RCC_CCIPR_LPUARTxSEL_MASK
484#define RCC_CCIPR_LPUART1SEL_SHIFT 10
485#define RCC_CCIPR_USART2SEL_SHIFT 2
486#define RCC_CCIPR_USART1SEL_SHIFT 0
491#define RCC_CSR_LPWRRSTF (1 << 31)
492#define RCC_CSR_WWDGRSTF (1 << 30)
493#define RCC_CSR_IWDGRSTF (1 << 29)
494#define RCC_CSR_SFTRSTF (1 << 28)
495#define RCC_CSR_PORRSTF (1 << 27)
496#define RCC_CSR_PINRSTF (1 << 26)
497#define RCC_CSR_OBLRSTF (1 << 25)
498#define RCC_CSR_FWRSTF (1 << 24)
499#define RCC_CSR_RMVF (1 << 23)
500#define RCC_CSR_RESET_FLAGS (RCC_CSR_LPWRRSTF | RCC_CSR_WWDGRSTF |\
501 RCC_CSR_IWDGRSTF | RCC_CSR_SFTRSTF | RCC_CSR_PORRSTF |\
502 RCC_CSR_PINRSTF | RCC_CSR_OBLRSTF | RCC_CSR_FWRSTF)
503#define RCC_CSR_RTCRST (1 << 19)
504#define RCC_CSR_RTCEN (1 << 18)
505#define RCC_CSR_RTCSEL_SHIFT (16)
506#define RCC_CSR_RTCSEL_MASK (0x3)
507#define RCC_CSR_RTCSEL_NONE (0x0)
508#define RCC_CSR_RTCSEL_LSE (0x1)
509#define RCC_CSR_RTCSEL_LSI (0x2)
510#define RCC_CSR_RTCSEL_HSE (0x3)
511#define RCC_CSR_CSSLSED (1 << 14)
512#define RCC_CSR_CSSLSEON (1 << 13)
513#define RCC_CSR_LSEDRV_SHIFT 11
514#define RCC_CSR_LSEDRV_MASK 0x3
515#define RCC_CSR_LSEDRV_LOWEST 0
516#define RCC_CSR_LSEDRV_MLOW 1
517#define RCC_CSR_LSEDRV_MHIGH 2
518#define RCC_CSR_LSEDRV_HIGHEST 3
519#define RCC_CSR_LSEBYP (1 << 10)
520#define RCC_CSR_LSERDY (1 << 9)
521#define RCC_CSR_LSEON (1 << 8)
522#define RCC_CSR_LSIRDY (1 << 1)
523#define RCC_CSR_LSION (1 << 0)
553#define _REG_BIT(base, bit) (((base) << 5) + (bit))
void rcc_set_pll_divider(uint32_t factor)
RCC Set the PLL Division Factor.
int rcc_osc_ready_int_flag(enum rcc_osc osc)
RCC Read the Oscillator Ready Interrupt Flag.
void rcc_set_msi_range(uint32_t msi_range)
Set the range of the MSI oscillator.
void rcc_osc_ready_int_clear(enum rcc_osc osc)
RCC Clear the Oscillator Ready Interrupt Flag.
uint32_t rcc_get_spi_clk_freq(uint32_t spi)
Get the peripheral clock speed for the SPI device at base specified.
uint32_t rcc_apb2_frequency
void rcc_set_pll_source(uint32_t pllsrc)
Set the pll source.
uint32_t rcc_get_timer_clk_freq(uint32_t timer)
Get the peripheral clock speed for the Timer at base specified.
uint32_t rcc_get_usart_clk_freq(uint32_t usart)
Get the peripheral clock speed for the USART at base specified.
void rcc_clock_setup_pll(const struct rcc_clock_scale *clock)
RCC Setup PLL and use it as Sysclk source.
void rcc_osc_ready_int_enable(enum rcc_osc osc)
RCC Enable the Oscillator Ready Interrupt.
void rcc_set_usart1_sel(uint32_t usart1_sel)
Set the USART1 clock source.
void rcc_set_usart2_sel(uint32_t usart2_sel)
Set the USART2 clock source.
void rcc_set_hsi48_source_pll(void)
RCC Set HSI48 clock source to the PLL.
void rcc_set_peripheral_clk_sel(uint32_t periph, uint32_t sel)
Set the peripheral clock source.
void rcc_osc_ready_int_disable(enum rcc_osc osc)
RCC Disable the Oscillator Ready Interrupt.
void rcc_osc_on(enum rcc_osc osc)
#define _REG_BIT(base, bit)
uint32_t rcc_ahb_frequency
void rcc_osc_off(enum rcc_osc osc)
uint32_t rcc_get_i2c_clk_freq(uint32_t i2c)
Get the peripheral clock speed for the I2C device at base specified.
void rcc_set_lpuart1_sel(uint32_t lpupart1_sel)
Set the LPUART1 clock source.
uint32_t rcc_apb1_frequency
void rcc_set_ppre1(uint32_t ppre1)
RCC Set the APB1 Prescale Factor.
void rcc_set_lptim1_sel(uint32_t lptim1_sel)
Set the LPTIM1 clock source.
void rcc_set_ppre2(uint32_t ppre2)
RCC Set the APB2 Prescale Factor.
void rcc_set_hsi48_source_rc48(void)
RCC Set HSI48 clock source to the RC48 (CRS)
void rcc_set_hpre(uint32_t hpre)
RCC Set the AHB Prescale Factor.
void rcc_set_pll_multiplier(uint32_t factor)
RCC Set the PLL Multiplication Factor.
void rcc_set_sysclk_source(enum rcc_osc osc)
RCC Set the Source for the System Clock.
pwr_vos_scale
Voltage scales for internal regulator.
enum pwr_vos_scale voltage_scale