Skip to content

Commit

Permalink
Fixes to UPLL enablement
Browse files Browse the repository at this point in the history
  • Loading branch information
compenguy committed Sep 9, 2020
1 parent 437ec8f commit 79168e4
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion hal/src/clock.rs
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,12 @@ pub struct UPllClockConfig {
pub count: u8,
}

impl From<u8> for UPllClockConfig {
fn from(count: u8) -> Self {
Self { count }
}
}

/// Identifier used for enabling/disabling the clock to that peripheral, as
/// well as for controlling the peripher interrupt in the NVIC. Peripherals
/// 0-8, and 10 are always clocked.
Expand Down Expand Up @@ -245,7 +251,7 @@ impl SystemClocks {
clk.set_master_clock_source_and_prescaler(ClockSource::PLLA_CLK, None, true);

#[cfg(feature = "usb")]
clk.enable_upll();
clk.enable_upll(3);

clk
}
Expand Down

0 comments on commit 79168e4

Please sign in to comment.