aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthias P. Braendli <matthias.braendli@mpb.li>2021-05-25 17:27:09 +0200
committerMatthias P. Braendli <matthias.braendli@mpb.li>2021-05-25 17:27:09 +0200
commitddfefa0ee832cce107de4201844282e6109ed7b6 (patch)
treece40f66a9295064c5d883b8f0abbb39c80efdfac
parent68696180686d00bbc35a1299f787a944d426e99f (diff)
downloadpicardy-ddfefa0ee832cce107de4201844282e6109ed7b6.tar.gz
picardy-ddfefa0ee832cce107de4201844282e6109ed7b6.tar.bz2
picardy-ddfefa0ee832cce107de4201844282e6109ed7b6.zip
Setup clocks properly
-rw-r--r--sw/picardy/src/main.rs4
1 files changed, 3 insertions, 1 deletions
diff --git a/sw/picardy/src/main.rs b/sw/picardy/src/main.rs
index 3a2e500..d354fbc 100644
--- a/sw/picardy/src/main.rs
+++ b/sw/picardy/src/main.rs
@@ -97,7 +97,9 @@ fn main() -> ! {
let mut rcc = dp.RCC.constrain();
let mut afio = dp.AFIO.constrain(&mut rcc.apb2);
let clocks = rcc.cfgr
- // TODO .use_hse(8.mhz())
+ .use_hse(16.mhz())
+ .sysclk(48.mhz())
+ .pclk1(24.mhz())
.adcclk(2.mhz())
.freeze(&mut flash.acr);
let mut delay = Delay::new(cp.SYST, clocks);