stm32: Add comments on PLL frequency requirements to clock setup code

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
This commit is contained in:
Kevin O'Connor 2025-05-31 17:00:18 -04:00
parent c0ca4c5cc7
commit 105ce35e1b
9 changed files with 22 additions and 0 deletions

View File

@ -97,6 +97,8 @@ get_pclock_frequency(uint32_t reset_bit)
return FREQ_SYS;
}
// PLL (rp2xxx) input: 5 to 100Mhz, vco: 750 to 1600Mhz
static void
xosc_setup(void)
{

View File

@ -52,6 +52,8 @@ gpio_clock_enable(GPIO_TypeDef *regs)
RCC->AHBENR;
}
// PLL (f0) input: 1 to 24Mhz, output: 16 to 48Mhz
#if !CONFIG_STM32_CLOCK_REF_INTERNAL
DECL_CONSTANT_STR("RESERVE_PINS_crystal", "PF0,PF1");
#endif

View File

@ -51,6 +51,8 @@ gpio_clock_enable(GPIO_TypeDef *regs)
RCC->APB2ENR;
}
// PLL (f103) input: 1 to 25Mhz, output: 16 to 72Mhz
// Main clock setup called at chip startup
static void
clock_setup(void)

View File

@ -57,6 +57,11 @@ gpio_clock_enable(GPIO_TypeDef *regs)
RCC->AHB1ENR;
}
// PLL (f207) input: 0.95 to 2.1Mhz, vco: 192 to 432Mhz, output: 24 to 120Mhz
// PLL (f401) input: 0.95 to 2.1Mhz, vco: 192 to 432Mhz, output: 24 to 84Mhz
// PLL (f405/7) input: 0.95 to 2.1Mhz, vco: 100 to 432Mhz, output: 24 to 168Mhz
// PLL (f446) input: 0.95 to 2.1Mhz, vco: 100 to 432Mhz, output: 12.5 to 180Mhz
#if !CONFIG_STM32_CLOCK_REF_INTERNAL
DECL_CONSTANT_STR("RESERVE_PINS_crystal", "PH0,PH1");
#endif

View File

@ -57,6 +57,8 @@ gpio_clock_enable(GPIO_TypeDef *regs)
RCC->AHB1ENR;
}
// PLL (f765) input: 0.95 to 2.1Mhz, vco: 100 to 432Mhz, output: 24 to 216Mhz
#if !CONFIG_STM32_CLOCK_REF_INTERNAL
DECL_CONSTANT_STR("RESERVE_PINS_crystal", "PH0,PH1");
#endif

View File

@ -97,6 +97,8 @@ gpio_clock_enable(GPIO_TypeDef *regs)
RCC->IOPENR;
}
// PLL (g0) input: 2.66 to 16Mhz, vco: 96 to 344Mhz, output: 12 to 64Mhz
#if !CONFIG_STM32_CLOCK_REF_INTERNAL
DECL_CONSTANT_STR("RESERVE_PINS_crystal", "PF0,PF1");
#endif

View File

@ -76,6 +76,8 @@ gpio_clock_enable(GPIO_TypeDef *regs)
RCC->AHB2ENR;
}
// PLL (g4) input: 2.66 to 16Mhz, vco: 96 to 344Mhz, output: 2.06 to 170Mhz
#if !CONFIG_STM32_CLOCK_REF_INTERNAL
DECL_CONSTANT_STR("RESERVE_PINS_crystal", "PF0,PF1");
#endif

View File

@ -82,6 +82,9 @@ gpio_clock_enable(GPIO_TypeDef *regs)
RCC->AHB4ENR;
}
// PLL1 (h723) input: 2 to 16Mhz, vco: 192 to 836Mhz, output: 1.5 to 550Mhz
// PLL1 (h743v) input: 2 to 16Mhz, vco: 192 to 960Mhz, output: 1.5 to 480Mhz
#if !CONFIG_STM32_CLOCK_REF_INTERNAL
DECL_CONSTANT_STR("RESERVE_PINS_crystal", "PH0,PH1");
#endif

View File

@ -68,6 +68,8 @@ gpio_clock_enable(GPIO_TypeDef *regs)
RCC->AHB2ENR;
}
// PLL (L412) input: 4 to 16Mhz, vco: 96 to 344Mhz, output: 12 to 80Mhz
#if !CONFIG_STM32_CLOCK_REF_INTERNAL
DECL_CONSTANT_STR("RESERVE_PINS_crystal", "PC14,PC15");
#endif