diff --git a/boards/arm/blackpill_f401ce/blackpill_f401ce.dts b/boards/arm/blackpill_f401ce/blackpill_f401ce.dts index ed875b4639d..29dd9627d36 100644 --- a/boards/arm/blackpill_f401ce/blackpill_f401ce.dts +++ b/boards/arm/blackpill_f401ce/blackpill_f401ce.dts @@ -115,3 +115,25 @@ pinctrl-0 = <&adc1_in1_pa1>; status = "okay"; }; + +&clk_hse { + clock-frequency = ; + status = "okay"; +}; + +&pll { + div-m = <25>; + mul-n = <336>; + div-p = <4>; + div-q = <7>; + clocks = <&clk_hse>; + status = "okay"; +}; + +&rcc { + clocks = <&pll>; + clock-frequency = ; + ahb-prescaler = <1>; + apb1-prescaler = <2>; + apb2-prescaler = <1>; +}; diff --git a/boards/arm/blackpill_f401ce/blackpill_f401ce_defconfig b/boards/arm/blackpill_f401ce/blackpill_f401ce_defconfig index f69969a9569..14f574f20ad 100644 --- a/boards/arm/blackpill_f401ce/blackpill_f401ce_defconfig +++ b/boards/arm/blackpill_f401ce/blackpill_f401ce_defconfig @@ -2,8 +2,6 @@ CONFIG_SOC_SERIES_STM32F4X=y CONFIG_SOC_STM32F401XE=y -# 84MHz system clock (highest value to get a precise USB clock should be 84MHz) -CONFIG_SYS_CLOCK_HW_CYCLES_PER_SEC=84000000 # Enable MPU CONFIG_ARM_MPU=y @@ -25,18 +23,3 @@ CONFIG_GPIO=y # Clock configuration CONFIG_CLOCK_CONTROL=y -# SYSCLK selection -CONFIG_CLOCK_STM32_SYSCLK_SRC_PLL=y -# HSE configuration -CONFIG_CLOCK_STM32_HSE_CLOCK=25000000 -# use HSE as PLL input -CONFIG_CLOCK_STM32_PLL_SRC_HSE=y -# Produce 84MHz clock at PLL output -CONFIG_CLOCK_STM32_PLL_M_DIVISOR=25 -CONFIG_CLOCK_STM32_PLL_N_MULTIPLIER=336 -CONFIG_CLOCK_STM32_PLL_P_DIVISOR=4 -# Produce 42 MHz clock for USB -CONFIG_CLOCK_STM32_PLL_Q_DIVISOR=7 -CONFIG_CLOCK_STM32_AHB_PRESCALER=1 -CONFIG_CLOCK_STM32_APB1_PRESCALER=2 -CONFIG_CLOCK_STM32_APB2_PRESCALER=1