diff options
| author | Dario Nieuwenhuis <[email protected]> | 2023-10-16 03:47:54 +0200 |
|---|---|---|
| committer | Dario Nieuwenhuis <[email protected]> | 2023-10-16 04:00:51 +0200 |
| commit | 18e96898eab47840951305481cc669b8b221bdda (patch) | |
| tree | 2a7629edc797c850a69d66728f8a9e7d168c2d8d /examples/stm32l5/src/bin/usb_hid_mouse.rs | |
| parent | 870dcc5970cbd043049e0ce2c9cde208c11a7d32 (diff) | |
stm32/rcc: unify L4 and L5.
Diffstat (limited to 'examples/stm32l5/src/bin/usb_hid_mouse.rs')
| -rw-r--r-- | examples/stm32l5/src/bin/usb_hid_mouse.rs | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/examples/stm32l5/src/bin/usb_hid_mouse.rs b/examples/stm32l5/src/bin/usb_hid_mouse.rs index 0d06c94a2..1ce7e3e49 100644 --- a/examples/stm32l5/src/bin/usb_hid_mouse.rs +++ b/examples/stm32l5/src/bin/usb_hid_mouse.rs | |||
| @@ -22,8 +22,17 @@ bind_interrupts!(struct Irqs { | |||
| 22 | #[embassy_executor::main] | 22 | #[embassy_executor::main] |
| 23 | async fn main(_spawner: Spawner) { | 23 | async fn main(_spawner: Spawner) { |
| 24 | let mut config = Config::default(); | 24 | let mut config = Config::default(); |
| 25 | config.rcc.mux = ClockSrc::PLL(PLLSource::HSI16, PllRDiv::DIV2, PllPreDiv::DIV1, PllMul::MUL10, None); | 25 | config.rcc.hsi16 = true; |
| 26 | config.rcc.hsi48 = true; | 26 | config.rcc.mux = ClockSrc::PLL; |
| 27 | config.rcc.pll = Some(Pll { | ||
| 28 | // 80Mhz clock (16 / 1 * 10 / 2) | ||
| 29 | source: PLLSource::HSI16, | ||
| 30 | prediv: PllPreDiv::DIV1, | ||
| 31 | mul: PllMul::MUL10, | ||
| 32 | divp: None, | ||
| 33 | divq: None, | ||
| 34 | divr: Some(PllRDiv::DIV2), | ||
| 35 | }); | ||
| 27 | let p = embassy_stm32::init(config); | 36 | let p = embassy_stm32::init(config); |
| 28 | 37 | ||
| 29 | // Create the driver, from the HAL. | 38 | // Create the driver, from the HAL. |
