H7 RCC: Fix off by one error
This commit is contained in:
parent
f5860c3c4c
commit
2605dabca3
1 changed files with 1 additions and 2 deletions
|
@ -83,7 +83,6 @@ impl<'d> Rcc<'d> {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO: FLASH and PWR
|
|
||||||
/// Freeze the core clocks, returning a Core Clocks Distribution
|
/// Freeze the core clocks, returning a Core Clocks Distribution
|
||||||
/// and Reset (CCDR) structure. The actual frequency of the clocks
|
/// and Reset (CCDR) structure. The actual frequency of the clocks
|
||||||
/// configured is returned in the `clocks` member of the CCDR
|
/// configured is returned in the `clocks` member of the CCDR
|
||||||
|
@ -419,7 +418,7 @@ impl<'d> Rcc<'d> {
|
||||||
_ => (0b111, 16),
|
_ => (0b111, 16),
|
||||||
};
|
};
|
||||||
let real_pclk = hclk / u32::from(ppre);
|
let real_pclk = hclk / u32::from(ppre);
|
||||||
assert!(real_pclk < max_pclk);
|
assert!(real_pclk <= max_pclk);
|
||||||
|
|
||||||
let tim_ker_clk = if let Some(tim_pre) = tim_pre {
|
let tim_ker_clk = if let Some(tim_pre) = tim_pre {
|
||||||
let clk = match (bits, tim_pre) {
|
let clk = match (bits, tim_pre) {
|
||||||
|
|
Loading…
Reference in a new issue