aboutsummaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authorbors[bot] <26634292+bors[bot]@users.noreply.github.com>2022-04-12 21:42:36 +0000
committerGitHub <[email protected]>2022-04-12 21:42:36 +0000
commit6d0e6d563dfd900a56ee6b6b3cf48a2af53c6cd4 (patch)
treeb92b609e8a6323a3d4c88cd4eef6b2ff22e313df /examples
parent5d48153bd752af283ced3621aa7e75ed6a67a0a2 (diff)
parent8f6fccf012f76ba264042381b351f874735ca35e (diff)
Merge #714
714: add more clock options for l4 and l5 r=Dirbaio a=ant32 - added an assert so it panics if pll48div is not 48Mhz - added MSI as a clock source for PLL - removed hsi48 option for MCUs mentioned in l4 rcc presentation - copied some code from l4 to l5, but don't have a way of testing it. Co-authored-by: Philip A Reimer <[email protected]>
Diffstat (limited to 'examples')
-rw-r--r--examples/stm32l4/src/bin/rng.rs7
1 files changed, 4 insertions, 3 deletions
diff --git a/examples/stm32l4/src/bin/rng.rs b/examples/stm32l4/src/bin/rng.rs
index 5f75c1ff1..03773e61b 100644
--- a/examples/stm32l4/src/bin/rng.rs
+++ b/examples/stm32l4/src/bin/rng.rs
@@ -12,12 +12,13 @@ use panic_probe as _;
12 12
13fn config() -> Config { 13fn config() -> Config {
14 let mut config = Config::default(); 14 let mut config = Config::default();
15 // 72Mhz clock (16 / 1 * 18 / 4)
15 config.rcc.mux = ClockSrc::PLL( 16 config.rcc.mux = ClockSrc::PLL(
16 PLLSource::HSI16, 17 PLLSource::HSI16,
17 PLLClkDiv::Div2, 18 PLLClkDiv::Div4,
18 PLLSrcDiv::Div1, 19 PLLSrcDiv::Div1,
19 PLLMul::Mul8, 20 PLLMul::Mul18,
20 Some(PLLClkDiv::Div2), 21 Some(PLLClkDiv::Div6), // 48Mhz (16 / 1 * 18 / 6)
21 ); 22 );
22 config 23 config
23} 24}