Lines Matching +full:sysclk +full:- +full:prescaler
7 * SPDX-License-Identifier: Apache-2.0
22 /* Macros to fill up prescaler values */
42 static uint32_t get_bus_clock(uint32_t clock, uint32_t prescaler) in get_bus_clock() argument
44 return clock / prescaler; in get_bus_clock()
112 __ASSERT(0, "No SYSCLK Source configured"); in get_sysclk_frequency()
144 return -ENOTSUP; in enabled_clock()
155 if (IN_RANGE(pclken->bus, STM32_PERIPH_BUS_MIN, STM32_PERIPH_BUS_MAX) == 0) { in stm32_clock_control_on()
157 return -ENOTSUP; in stm32_clock_control_on()
160 sys_set_bits(DT_REG_ADDR(DT_NODELABEL(rcc)) + pclken->bus, in stm32_clock_control_on()
161 pclken->enr); in stm32_clock_control_on()
163 temp = sys_read32(DT_REG_ADDR(DT_NODELABEL(rcc)) + pclken->bus); in stm32_clock_control_on()
176 if (IN_RANGE(pclken->bus, STM32_PERIPH_BUS_MIN, STM32_PERIPH_BUS_MAX) == 0) { in stm32_clock_control_off()
178 return -ENOTSUP; in stm32_clock_control_off()
181 sys_clear_bits(DT_REG_ADDR(DT_NODELABEL(rcc)) + pclken->bus, in stm32_clock_control_off()
182 pclken->enr); in stm32_clock_control_off()
197 err = enabled_clock(pclken->bus); in stm32_clock_control_configure()
203 sys_set_bits(DT_REG_ADDR(DT_NODELABEL(rcc)) + STM32_CLOCK_REG_GET(pclken->enr), in stm32_clock_control_configure()
204 STM32_CLOCK_VAL_GET(pclken->enr) << STM32_CLOCK_SHIFT_GET(pclken->enr)); in stm32_clock_control_configure()
216 * Get AHB Clock (= SystemCoreClock = SYSCLK/prescaler) in stm32_clock_control_get_subsys_rate()
228 switch (pclken->bus) { in stm32_clock_control_get_subsys_rate()
342 return -ENOTSUP; in stm32_clock_control_get_subsys_rate()
345 if (pclken->div) { in stm32_clock_control_get_subsys_rate()
346 *rate /= (pclken->div + 1); in stm32_clock_control_get_subsys_rate()
375 return -ERANGE; in get_vco_input_range()
440 * (Switching to HSI makes sure we have a SYSCLK source in in set_up_plls()
461 return -ENOTSUP; in set_up_plls()
514 return -ENOTSUP; in set_up_plls()
568 return -ENOTSUP; in set_up_plls()
763 return -ENOTSUP; in stm32_clock_control_init()