Skip to content

Commit 41f9469

Browse files
committed
Set sys_ck frequency to pll1_p_ck when this is used. Closes #105
1 parent 99fe504 commit 41f9469

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/rcc/mod.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -566,6 +566,12 @@ impl Rcc {
566566
let (pll3_p_ck, pll3_q_ck, pll3_r_ck) =
567567
self.pll3_setup(rcc, &self.config.pll3);
568568

569+
let sys_ck = if sys_use_pll1_p {
570+
pll1_p_ck.unwrap() // Must have been set by sys_ck_setup
571+
} else {
572+
sys_ck
573+
};
574+
569575
// hsi_ck = HSI. This routine does not support HSIDIV != 1. To
570576
// do so it would need to ensure all PLLxON bits are clear
571577
// before changing the value of HSIDIV

0 commit comments

Comments
 (0)