20#define RCC_BASE (0x40023800UL)
28 volatile uint32_t
CIR;
51 volatile uint32_t
CSR;
61#define RCC ((RccRegisters_t *)RCC_BASE)
65#define RCC_CR_HSION_Pos (0U)
67#define RCC_CR_HSION ((uint32_t)1U << RCC_CR_HSION_Pos)
68#define RCC_CR_HSIRDY_Pos (1U)
70#define RCC_CR_HSIRDY ((uint32_t)1U << RCC_CR_HSIRDY_Pos)
71#define RCC_CR_HSEON_Pos (16U)
73#define RCC_CR_HSEON ((uint32_t)1U << RCC_CR_HSEON_Pos)
74#define RCC_CR_HSERDY_Pos (17U)
76#define RCC_CR_HSERDY ((uint32_t)1U << RCC_CR_HSERDY_Pos)
77#define RCC_CR_HSEBYP_Pos (18U)
79#define RCC_CR_HSEBYP ((uint32_t)1U << RCC_CR_HSEBYP_Pos)
80#define RCC_CR_CSSON_Pos (19U)
82#define RCC_CR_CSSON ((uint32_t)1U << RCC_CR_CSSON_Pos)
83#define RCC_CR_PLLON_Pos (24U)
85#define RCC_CR_PLLON ((uint32_t)1U << RCC_CR_PLLON_Pos)
86#define RCC_CR_PLLRDY_Pos (25U)
88#define RCC_CR_PLLRDY ((uint32_t)1U << RCC_CR_PLLRDY_Pos)
94#define RCC_PLLCFGR_PLLM_Pos (0U)
96#define RCC_PLLCFGR_PLLM_Msk ((uint32_t)0x3FU << RCC_PLLCFGR_PLLM_Pos)
97#define RCC_PLLCFGR_PLLN_Pos (6U)
99#define RCC_PLLCFGR_PLLN_Msk ((uint32_t)0x1FFU << RCC_PLLCFGR_PLLN_Pos)
100#define RCC_PLLCFGR_PLLP_Pos (16U)
102#define RCC_PLLCFGR_PLLP_Msk ((uint32_t)0x3U << RCC_PLLCFGR_PLLP_Pos)
103#define RCC_PLLCFGR_PLLSRC_Pos (22U)
105#define RCC_PLLCFGR_PLLSRC ((uint32_t)1U << RCC_PLLCFGR_PLLSRC_Pos)
111#define RCC_PLLCFGR_PLLSRC_HSI (0x0U)
112#define RCC_PLLCFGR_PLLSRC_HSE (RCC_PLLCFGR_PLLSRC)
117#define RCC_PLLCFGR_PLLP_DIV2 (0x0U)
118#define RCC_PLLCFGR_PLLP_DIV4 (0x1U)
119#define RCC_PLLCFGR_PLLP_DIV6 (0x2U)
120#define RCC_PLLCFGR_PLLP_DIV8 (0x3U)
125#define RCC_CFGR_SW_Pos (0U)
127#define RCC_CFGR_SW_Msk ((uint32_t)0x3U << RCC_CFGR_SW_Pos)
128#define RCC_CFGR_SWS_Pos (2U)
130#define RCC_CFGR_SWS_Msk ((uint32_t)0x3U << RCC_CFGR_SWS_Pos)
131#define RCC_CFGR_HPRE_Pos (4U)
133#define RCC_CFGR_HPRE_Msk ((uint32_t)0xFU << RCC_CFGR_HPRE_Pos)
134#define RCC_CFGR_PPRE1_Pos (10U)
136#define RCC_CFGR_PPRE1_Msk ((uint32_t)0x7U << RCC_CFGR_PPRE1_Pos)
137#define RCC_CFGR_PPRE2_Pos (13U)
139#define RCC_CFGR_PPRE2_Msk ((uint32_t)0x7U << RCC_CFGR_PPRE2_Pos)
145#define RCC_CFGR_SYSCLK_HSI (0x0U)
146#define RCC_CFGR_SYSCLK_HSE (0x1U)
147#define RCC_CFGR_SYSCLK_PLL (0x2U)
153#define RCC_CFGR_HPRE_DIV1 (0x0U)
154#define RCC_CFGR_HPRE_DIV2 (0x8U)
155#define RCC_CFGR_HPRE_DIV4 (0x9U)
156#define RCC_CFGR_HPRE_DIV8 (0xAU)
157#define RCC_CFGR_HPRE_DIV16 (0xBU)
158#define RCC_CFGR_HPRE_DIV64 (0xCU)
159#define RCC_CFGR_HPRE_DIV128 (0xDU)
160#define RCC_CFGR_HPRE_DIV256 (0xEU)
161#define RCC_CFGR_HPRE_DIV512 (0xFU)
167#define RCC_CFGR_PPRE_DIV1 (0x0U)
168#define RCC_CFGR_PPRE_DIV2 (0x4U)
169#define RCC_CFGR_PPRE_DIV4 (0x5U)
170#define RCC_CFGR_PPRE_DIV8 (0x6U)
171#define RCC_CFGR_PPRE_DIV16 (0x7U)
176#define RCC_CIR_CSSF_Pos (7U)
178#define RCC_CIR_CSSF ((uint32_t)1U << RCC_CIR_CSSF_Pos)
179#define RCC_CIR_CSSC_Pos (23U)
181#define RCC_CIR_CSSC ((uint32_t)1U << RCC_CIR_CSSC_Pos)
187#define RCC_AHB1RSTR_GPIOARST_Pos (0U)
188#define RCC_AHB1RSTR_GPIOARST ((uint32_t)1U << RCC_AHB1RSTR_GPIOARST_Pos)
189#define RCC_AHB1RSTR_GPIOBRST_Pos (1U)
190#define RCC_AHB1RSTR_GPIOBRST ((uint32_t)1U << RCC_AHB1RSTR_GPIOBRST_Pos)
191#define RCC_AHB1RSTR_GPIOCRST_Pos (2U)
192#define RCC_AHB1RSTR_GPIOCRST ((uint32_t)1U << RCC_AHB1RSTR_GPIOCRST_Pos)
193#define RCC_AHB1RSTR_GPIODRST_Pos (3U)
194#define RCC_AHB1RSTR_GPIODRST ((uint32_t)1U << RCC_AHB1RSTR_GPIODRST_Pos)
195#define RCC_AHB1RSTR_GPIOERST_Pos (4U)
196#define RCC_AHB1RSTR_GPIOERST ((uint32_t)1U << RCC_AHB1RSTR_GPIOERST_Pos)
197#define RCC_AHB1RSTR_GPIOFRST_Pos (5U)
198#define RCC_AHB1RSTR_GPIOFRST ((uint32_t)1U << RCC_AHB1RSTR_GPIOFRST_Pos)
199#define RCC_AHB1RSTR_GPIOGRST_Pos (6U)
200#define RCC_AHB1RSTR_GPIOGRST ((uint32_t)1U << RCC_AHB1RSTR_GPIOGRST_Pos)
201#define RCC_AHB1RSTR_GPIOHRST_Pos (7U)
202#define RCC_AHB1RSTR_GPIOHRST ((uint32_t)1U << RCC_AHB1RSTR_GPIOHRST_Pos)
209#define RCC_AHB1ENR_GPIOAEN_Pos (0U)
210#define RCC_AHB1ENR_GPIOAEN ((uint32_t)1U << RCC_AHB1ENR_GPIOAEN_Pos)
211#define RCC_AHB1ENR_GPIOBEN_Pos (1U)
212#define RCC_AHB1ENR_GPIOBEN ((uint32_t)1U << RCC_AHB1ENR_GPIOBEN_Pos)
213#define RCC_AHB1ENR_GPIOCEN_Pos (2U)
214#define RCC_AHB1ENR_GPIOCEN ((uint32_t)1U << RCC_AHB1ENR_GPIOCEN_Pos)
215#define RCC_AHB1ENR_GPIODEN_Pos (3U)
216#define RCC_AHB1ENR_GPIODEN ((uint32_t)1U << RCC_AHB1ENR_GPIODEN_Pos)
217#define RCC_AHB1ENR_GPIOEEN_Pos (4U)
218#define RCC_AHB1ENR_GPIOEEN ((uint32_t)1U << RCC_AHB1ENR_GPIOEEN_Pos)
219#define RCC_AHB1ENR_GPIOFEN_Pos (5U)
220#define RCC_AHB1ENR_GPIOFEN ((uint32_t)1U << RCC_AHB1ENR_GPIOFEN_Pos)
221#define RCC_AHB1ENR_GPIOGEN_Pos (6U)
222#define RCC_AHB1ENR_GPIOGEN ((uint32_t)1U << RCC_AHB1ENR_GPIOGEN_Pos)
223#define RCC_AHB1ENR_GPIOHEN_Pos (7U)
224#define RCC_AHB1ENR_GPIOHEN ((uint32_t)1U << RCC_AHB1ENR_GPIOHEN_Pos)
230#define RCC_APB1RSTR_USART2RST_Pos (17U)
232#define RCC_APB1RSTR_USART2RST ((uint32_t)1U << RCC_APB1RSTR_USART2RST_Pos)
233#define RCC_APB1RSTR_PWRRST_Pos (28U)
234#define RCC_APB1RSTR_PWRRST ((uint32_t)1U << RCC_APB1RSTR_PWRRST_Pos)
240#define RCC_APB1ENR_WWDGEN_Pos (11U)
242#define RCC_APB1ENR_WWDGEN ((uint32_t)1U << RCC_APB1ENR_WWDGEN_Pos)
243#define RCC_APB1ENR_USART2EN_Pos (17U)
245#define RCC_APB1ENR_USART2EN ((uint32_t)1U << RCC_APB1ENR_USART2EN_Pos)
246#define RCC_APB1ENR_PWREN_Pos (28U)
248#define RCC_APB1ENR_PWREN ((uint32_t)1U << RCC_APB1ENR_PWREN_Pos)
253#define RCC_APB2RSTR_SYSCFGRST_Pos (14U)
255#define RCC_APB2RSTR_SYSCFGRST ((uint32_t)1U << RCC_APB2RSTR_SYSCFGRST_Pos)
260#define RCC_APB2ENR_SYSCFGEN_Pos (14U)
262#define RCC_APB2ENR_SYSCFGEN ((uint32_t)1U << RCC_APB2ENR_SYSCFGEN_Pos)
268#define RCC_CSR_LSION_Pos (0U)
270#define RCC_CSR_LSION ((uint32_t)1U << RCC_CSR_LSION_Pos)
271#define RCC_CSR_LSIRDY_Pos (1U)
273#define RCC_CSR_LSIRDY ((uint32_t)1U << RCC_CSR_LSIRDY_Pos)
274#define RCC_CSR_RMVF_Pos (24U)
276#define RCC_CSR_RMVF ((uint32_t)1U << RCC_CSR_RMVF_Pos)
277#define RCC_CSR_BORRSTF_Pos (25U)
279#define RCC_CSR_BORRSTF ((uint32_t)1U << RCC_CSR_BORRSTF_Pos)
280#define RCC_CSR_PINRSTF_Pos (26U)
282#define RCC_CSR_PINRSTF ((uint32_t)1U << RCC_CSR_PINRSTF_Pos)
283#define RCC_CSR_PORRSTF_Pos (27U)
285#define RCC_CSR_PORRSTF ((uint32_t)1U << RCC_CSR_PORRSTF_Pos)
286#define RCC_CSR_SFTRSTF_Pos (28U)
288#define RCC_CSR_SFTRSTF ((uint32_t)1U << RCC_CSR_SFTRSTF_Pos)
289#define RCC_CSR_IWDGRSTF_Pos (29U)
291#define RCC_CSR_IWDGRSTF ((uint32_t)1U << RCC_CSR_IWDGRSTF_Pos)
292#define RCC_CSR_WWDGRSTF_Pos (30U)
294#define RCC_CSR_WWDGRSTF ((uint32_t)1U << RCC_CSR_WWDGRSTF_Pos)
295#define RCC_CSR_LPWRRSTF_Pos (31U)
297#define RCC_CSR_LPWRRSTF ((uint32_t)1U << RCC_CSR_LPWRRSTF_Pos)
volatile uint32_t CFGR
0x08: clock configuration
volatile uint32_t SSCGR
0x80: spread-spectrum clock generation
volatile uint32_t DCKCFGR
0x8C: dedicated clock configuration
volatile uint32_t RESERVED6[2]
0x78-0x7C: reserved
volatile uint32_t CKGATENR
0x90: clock gating enable
volatile uint32_t AHB2ENR
0x34: AHB2 clock enable
volatile uint32_t APB2LPENR
0x64: APB2 clock enable in low-power mode
volatile uint32_t RESERVED4
0x5C: reserved
volatile uint32_t RESERVED2
0x3C: reserved
volatile uint32_t RESERVED0
0x1C: reserved
volatile uint32_t APB2RSTR
0x24: APB2 peripheral reset
volatile uint32_t CIR
0x0C: clock interrupt
volatile uint32_t AHB1RSTR
0x10: AHB1 peripheral reset
volatile uint32_t AHB3ENR
0x38: AHB3 clock enable
volatile uint32_t AHB2LPENR
0x54: AHB2 clock enable in low-power mode
volatile uint32_t APB2ENR
0x44: APB2 clock enable
volatile uint32_t RESERVED3[2]
0x48-0x4C: reserved
volatile uint32_t AHB1LPENR
0x50: AHB1 clock enable in low-power mode
volatile uint32_t CR
0x00: clock control
volatile uint32_t RESERVED1[2]
0x28-0x2C: reserved
volatile uint32_t AHB3LPENR
0x58: AHB3 clock enable in low-power mode
volatile uint32_t AHB1ENR
0x30: AHB1 clock enable
volatile uint32_t RESERVED5[2]
0x68-0x6C: reserved
volatile uint32_t APB1RSTR
0x20: APB1 peripheral reset
volatile uint32_t PLLCFGR
0x04: PLL configuration
volatile uint32_t CSR
0x74: clock control and status
volatile uint32_t BDCR
0x70: backup domain control
volatile uint32_t APB1LPENR
0x60: APB1 clock enable in low-power mode
volatile uint32_t APB1ENR
0x40: APB1 clock enable
volatile uint32_t DCKCFGR2
0x94: dedicated clock configuration 2
volatile uint32_t AHB2RSTR
0x14: AHB2 peripheral reset
volatile uint32_t AHB3RSTR
0x18: AHB3 peripheral reset
volatile uint32_t PLLI2SCFGR
0x84: PLLI2S configuration
volatile uint32_t PLLSAICFGR
0x88: PLLSAI configuration