From 8cfaef7fb6196d9d89ffca6c3713c5c77f03ec60 Mon Sep 17 00:00:00 2001 From: Karl Palsson Date: Wed, 29 May 2013 14:45:37 +0000 Subject: [PATCH] [stm32l1] Don't use an intermediate clock in setup This switch to HSI was an attempt to run the setup code faster. However, there's no real need for this, and it just confuses things by switching first to one clock, and then to another. Just keep running on the existing clock until switching to the clock actually chosen by the user's arguments. --- lib/stm32/l1/rcc.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/lib/stm32/l1/rcc.c b/lib/stm32/l1/rcc.c index 106032a3..559711d3 100644 --- a/lib/stm32/l1/rcc.c +++ b/lib/stm32/l1/rcc.c @@ -515,9 +515,6 @@ void rcc_clock_setup_pll(const clock_scale_t *clock) rcc_osc_on(HSI); rcc_wait_for_osc_ready(HSI); - /* Select HSI as SYSCLK source. */ - rcc_set_sysclk_source(RCC_CFGR_SW_SYSCLKSEL_HSICLK); - /* * Set prescalers for AHB, ADC, ABP1, ABP2. * Do this before touching the PLL (TODO: why?).