Lines Matching full:rcc
32 #define DT_RCC_CLOCKS_CTRL DT_CLOCKS_CTLR(DT_NODELABEL(rcc))
96 RCC->CTLR &= ~RCC_PLLON; in clock_control_wch_rcc_init()
100 RCC->RSTSCKR |= RCC_LSION; in clock_control_wch_rcc_init()
101 while ((RCC->RSTSCKR & RCC_LSIRDY) == 0) { in clock_control_wch_rcc_init()
105 RCC->CTLR |= RCC_HSION; in clock_control_wch_rcc_init()
106 while ((RCC->CTLR & RCC_HSIRDY) == 0) { in clock_control_wch_rcc_init()
111 RCC->CTLR |= RCC_HSEON; in clock_control_wch_rcc_init()
112 while ((RCC->CTLR & RCC_HSERDY) == 0) { in clock_control_wch_rcc_init()
118 RCC->CFGR0 |= RCC_PLLSRC; in clock_control_wch_rcc_init()
120 RCC->CFGR0 &= ~RCC_PLLSRC; in clock_control_wch_rcc_init()
122 RCC->CTLR |= RCC_PLLON; in clock_control_wch_rcc_init()
123 while ((RCC->CTLR & RCC_PLLRDY) == 0) { in clock_control_wch_rcc_init()
128 RCC->CFGR0 = (RCC->CFGR0 & ~RCC_SW) | RCC_SW_HSI; in clock_control_wch_rcc_init()
130 RCC->CFGR0 = (RCC->CFGR0 & ~RCC_SW) | RCC_SW_HSE; in clock_control_wch_rcc_init()
132 RCC->CFGR0 = (RCC->CFGR0 & ~RCC_SW) | RCC_SW_PLL; in clock_control_wch_rcc_init()
134 RCC->CTLR |= RCC_CSSON; in clock_control_wch_rcc_init()
137 RCC->INTR = RCC_CSSC | RCC_PLLRDYC | RCC_HSERDYC | RCC_LSIRDYC; in clock_control_wch_rcc_init()
139 RCC->CFGR0 = (RCC->CFGR0 & ~RCC_HPRE) | RCC_HPRE_DIV1; in clock_control_wch_rcc_init()