stm32: pll: disable before configuring
This commit is contained in:
parent
8b13977ea0
commit
f0e5c73d98
@ -355,6 +355,10 @@ void rcc_clock_setup_hse_3v3(const struct rcc_clock_scale *clock)
|
||||
rcc_set_ppre1(clock->ppre1);
|
||||
rcc_set_ppre2(clock->ppre2);
|
||||
|
||||
/* Disable PLL oscillator before changing its configuration. */
|
||||
rcc_osc_off(RCC_PLL);
|
||||
|
||||
/* Configure the PLL oscillator. */
|
||||
rcc_set_main_pll_hse(clock->pllm, clock->plln,
|
||||
clock->pllp, clock->pllq);
|
||||
|
||||
|
@ -709,6 +709,10 @@ void rcc_clock_setup_hse_3v3(const struct rcc_clock_scale *clock)
|
||||
rcc_set_ppre1(clock->ppre1);
|
||||
rcc_set_ppre2(clock->ppre2);
|
||||
|
||||
/* Disable PLL oscillator before changing its configuration. */
|
||||
rcc_osc_off(RCC_PLL);
|
||||
|
||||
/* Configure the PLL oscillator. */
|
||||
rcc_set_main_pll_hse(clock->pllm, clock->plln,
|
||||
clock->pllp, clock->pllq, clock->pllr);
|
||||
|
||||
|
@ -392,6 +392,10 @@ void rcc_clock_setup_hse(const struct rcc_clock_scale *clock, uint32_t hse_mhz)
|
||||
rcc_set_ppre1(clock->ppre1);
|
||||
rcc_set_ppre2(clock->ppre2);
|
||||
|
||||
/* Disable PLL oscillator before changing its configuration. */
|
||||
rcc_osc_off(RCC_PLL);
|
||||
|
||||
/* Configure the PLL oscillator. */
|
||||
rcc_set_main_pll_hse(pllm, clock->plln,
|
||||
clock->pllp, clock->pllq);
|
||||
|
||||
|
@ -535,6 +535,10 @@ void rcc_clock_setup_pll(const struct rcc_clock_scale *clock)
|
||||
flash_prefetch_enable();
|
||||
flash_set_ws(clock->flash_waitstates);
|
||||
|
||||
/* Disable PLL oscillator before changing its configuration. */
|
||||
rcc_osc_off(RCC_PLL);
|
||||
|
||||
/* Configure the PLL oscillator. */
|
||||
rcc_set_pll_configuration(clock->pll_source, clock->pll_mul,
|
||||
clock->pll_div);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user