mirror of
https://github.com/andreili/klipper.git
synced 2025-08-24 03:44:06 +02:00
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:
parent
c0ca4c5cc7
commit
105ce35e1b
@ -97,6 +97,8 @@ get_pclock_frequency(uint32_t reset_bit)
|
|||||||
return FREQ_SYS;
|
return FREQ_SYS;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// PLL (rp2xxx) input: 5 to 100Mhz, vco: 750 to 1600Mhz
|
||||||
|
|
||||||
static void
|
static void
|
||||||
xosc_setup(void)
|
xosc_setup(void)
|
||||||
{
|
{
|
||||||
|
@ -52,6 +52,8 @@ gpio_clock_enable(GPIO_TypeDef *regs)
|
|||||||
RCC->AHBENR;
|
RCC->AHBENR;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// PLL (f0) input: 1 to 24Mhz, output: 16 to 48Mhz
|
||||||
|
|
||||||
#if !CONFIG_STM32_CLOCK_REF_INTERNAL
|
#if !CONFIG_STM32_CLOCK_REF_INTERNAL
|
||||||
DECL_CONSTANT_STR("RESERVE_PINS_crystal", "PF0,PF1");
|
DECL_CONSTANT_STR("RESERVE_PINS_crystal", "PF0,PF1");
|
||||||
#endif
|
#endif
|
||||||
|
@ -51,6 +51,8 @@ gpio_clock_enable(GPIO_TypeDef *regs)
|
|||||||
RCC->APB2ENR;
|
RCC->APB2ENR;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// PLL (f103) input: 1 to 25Mhz, output: 16 to 72Mhz
|
||||||
|
|
||||||
// Main clock setup called at chip startup
|
// Main clock setup called at chip startup
|
||||||
static void
|
static void
|
||||||
clock_setup(void)
|
clock_setup(void)
|
||||||
|
@ -57,6 +57,11 @@ gpio_clock_enable(GPIO_TypeDef *regs)
|
|||||||
RCC->AHB1ENR;
|
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
|
#if !CONFIG_STM32_CLOCK_REF_INTERNAL
|
||||||
DECL_CONSTANT_STR("RESERVE_PINS_crystal", "PH0,PH1");
|
DECL_CONSTANT_STR("RESERVE_PINS_crystal", "PH0,PH1");
|
||||||
#endif
|
#endif
|
||||||
|
@ -57,6 +57,8 @@ gpio_clock_enable(GPIO_TypeDef *regs)
|
|||||||
RCC->AHB1ENR;
|
RCC->AHB1ENR;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// PLL (f765) input: 0.95 to 2.1Mhz, vco: 100 to 432Mhz, output: 24 to 216Mhz
|
||||||
|
|
||||||
#if !CONFIG_STM32_CLOCK_REF_INTERNAL
|
#if !CONFIG_STM32_CLOCK_REF_INTERNAL
|
||||||
DECL_CONSTANT_STR("RESERVE_PINS_crystal", "PH0,PH1");
|
DECL_CONSTANT_STR("RESERVE_PINS_crystal", "PH0,PH1");
|
||||||
#endif
|
#endif
|
||||||
|
@ -97,6 +97,8 @@ gpio_clock_enable(GPIO_TypeDef *regs)
|
|||||||
RCC->IOPENR;
|
RCC->IOPENR;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// PLL (g0) input: 2.66 to 16Mhz, vco: 96 to 344Mhz, output: 12 to 64Mhz
|
||||||
|
|
||||||
#if !CONFIG_STM32_CLOCK_REF_INTERNAL
|
#if !CONFIG_STM32_CLOCK_REF_INTERNAL
|
||||||
DECL_CONSTANT_STR("RESERVE_PINS_crystal", "PF0,PF1");
|
DECL_CONSTANT_STR("RESERVE_PINS_crystal", "PF0,PF1");
|
||||||
#endif
|
#endif
|
||||||
|
@ -76,6 +76,8 @@ gpio_clock_enable(GPIO_TypeDef *regs)
|
|||||||
RCC->AHB2ENR;
|
RCC->AHB2ENR;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// PLL (g4) input: 2.66 to 16Mhz, vco: 96 to 344Mhz, output: 2.06 to 170Mhz
|
||||||
|
|
||||||
#if !CONFIG_STM32_CLOCK_REF_INTERNAL
|
#if !CONFIG_STM32_CLOCK_REF_INTERNAL
|
||||||
DECL_CONSTANT_STR("RESERVE_PINS_crystal", "PF0,PF1");
|
DECL_CONSTANT_STR("RESERVE_PINS_crystal", "PF0,PF1");
|
||||||
#endif
|
#endif
|
||||||
|
@ -82,6 +82,9 @@ gpio_clock_enable(GPIO_TypeDef *regs)
|
|||||||
RCC->AHB4ENR;
|
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
|
#if !CONFIG_STM32_CLOCK_REF_INTERNAL
|
||||||
DECL_CONSTANT_STR("RESERVE_PINS_crystal", "PH0,PH1");
|
DECL_CONSTANT_STR("RESERVE_PINS_crystal", "PH0,PH1");
|
||||||
#endif
|
#endif
|
||||||
|
@ -68,6 +68,8 @@ gpio_clock_enable(GPIO_TypeDef *regs)
|
|||||||
RCC->AHB2ENR;
|
RCC->AHB2ENR;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// PLL (L412) input: 4 to 16Mhz, vco: 96 to 344Mhz, output: 12 to 80Mhz
|
||||||
|
|
||||||
#if !CONFIG_STM32_CLOCK_REF_INTERNAL
|
#if !CONFIG_STM32_CLOCK_REF_INTERNAL
|
||||||
DECL_CONSTANT_STR("RESERVE_PINS_crystal", "PC14,PC15");
|
DECL_CONSTANT_STR("RESERVE_PINS_crystal", "PC14,PC15");
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
x
Reference in New Issue
Block a user