diff options
| author | Philip A Reimer <[email protected]> | 2022-04-11 21:06:22 -0600 |
|---|---|---|
| committer | Philip A Reimer <[email protected]> | 2022-04-11 21:06:22 -0600 |
| commit | 8f6fccf012f76ba264042381b351f874735ca35e (patch) | |
| tree | 54870af453e351351bfddae95c10cd001c669f83 /examples | |
| parent | d90ecbbe406641d8193afe6bb77c51fb97edfd68 (diff) | |
fix clock in l4 rng example
Diffstat (limited to 'examples')
| -rw-r--r-- | examples/stm32l4/src/bin/rng.rs | 7 |
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 | ||
| 13 | fn config() -> Config { | 13 | fn 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 | } |
