Skip to content

Commit ec9534f

Browse files
authored
Merge pull request #50 from davidlattimore/pll-freq
rcc: Use pll_freq not base freq when computing q and p
2 parents d1ad94f + 21fb0db commit ec9534f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/rcc/mod.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -235,7 +235,7 @@ impl Rcc {
235235
self.rb
236236
.pllsyscfgr
237237
.write(move |w| unsafe { w.pllq().bits(div - 1) });
238-
let req = freq / div as u32;
238+
let req = pll_freq / div as u32;
239239
Some(req.hz())
240240
}
241241
_ => None,
@@ -246,7 +246,7 @@ impl Rcc {
246246
self.rb
247247
.pllsyscfgr
248248
.write(move |w| unsafe { w.pllp().bits(div - 1) });
249-
let req = freq / div as u32;
249+
let req = pll_freq / div as u32;
250250
Some(req.hz())
251251
}
252252
_ => None,

0 commit comments

Comments
 (0)