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_ethernet.rs | |
| parent | 870dcc5970cbd043049e0ce2c9cde208c11a7d32 (diff) | |
stm32/rcc: unify L4 and L5.
Diffstat (limited to 'examples/stm32l5/src/bin/usb_ethernet.rs')
| -rw-r--r-- | examples/stm32l5/src/bin/usb_ethernet.rs | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/examples/stm32l5/src/bin/usb_ethernet.rs b/examples/stm32l5/src/bin/usb_ethernet.rs index 498147f9d..baa86640e 100644 --- a/examples/stm32l5/src/bin/usb_ethernet.rs +++ b/examples/stm32l5/src/bin/usb_ethernet.rs | |||
| @@ -45,8 +45,17 @@ async fn net_task(stack: &'static Stack<Device<'static, MTU>>) -> ! { | |||
| 45 | #[embassy_executor::main] | 45 | #[embassy_executor::main] |
| 46 | async fn main(spawner: Spawner) { | 46 | async fn main(spawner: Spawner) { |
| 47 | let mut config = Config::default(); | 47 | let mut config = Config::default(); |
| 48 | config.rcc.mux = ClockSrc::PLL(PLLSource::HSI16, PllRDiv::DIV2, PllPreDiv::DIV1, PllMul::MUL10, None); | 48 | config.rcc.hsi16 = true; |
| 49 | config.rcc.hsi48 = true; | 49 | config.rcc.mux = ClockSrc::PLL; |
| 50 | config.rcc.pll = Some(Pll { | ||
| 51 | // 80Mhz clock (16 / 1 * 10 / 2) | ||
| 52 | source: PLLSource::HSI16, | ||
| 53 | prediv: PllPreDiv::DIV1, | ||
| 54 | mul: PllMul::MUL10, | ||
| 55 | divp: None, | ||
| 56 | divq: None, | ||
| 57 | divr: Some(PllRDiv::DIV2), | ||
| 58 | }); | ||
| 50 | let p = embassy_stm32::init(config); | 59 | let p = embassy_stm32::init(config); |
| 51 | 60 | ||
| 52 | // Create the driver, from the HAL. | 61 | // Create the driver, from the HAL. |
