diff options
| author | Dario Nieuwenhuis <[email protected]> | 2023-10-16 03:09:33 +0200 |
|---|---|---|
| committer | Dario Nieuwenhuis <[email protected]> | 2023-10-16 03:23:43 +0200 |
| commit | 5c5e6818195b364199e583eb559b0042d392b3e7 (patch) | |
| tree | 3f397b190810b92564bc6e416f9f591b85c03748 /examples | |
| parent | f54753beaade16a5c56c27c70b51adaac175e0ae (diff) | |
stm32/rcc: add better support for L4/L4+ differences.
Diffstat (limited to 'examples')
| -rw-r--r-- | examples/stm32l4/src/bin/adc.rs | 2 | ||||
| -rw-r--r-- | examples/stm32l4/src/bin/rng.rs | 2 | ||||
| -rw-r--r-- | examples/stm32l4/src/bin/rtc.rs | 2 | ||||
| -rw-r--r-- | examples/stm32l4/src/bin/spe_adin1110_http_server.rs | 2 | ||||
| -rw-r--r-- | examples/stm32l4/src/bin/usb_serial.rs | 2 |
5 files changed, 5 insertions, 5 deletions
diff --git a/examples/stm32l4/src/bin/adc.rs b/examples/stm32l4/src/bin/adc.rs index 1771e5202..3d0c623fd 100644 --- a/examples/stm32l4/src/bin/adc.rs +++ b/examples/stm32l4/src/bin/adc.rs | |||
| @@ -13,7 +13,7 @@ fn main() -> ! { | |||
| 13 | info!("Hello World!"); | 13 | info!("Hello World!"); |
| 14 | 14 | ||
| 15 | pac::RCC.ccipr().modify(|w| { | 15 | pac::RCC.ccipr().modify(|w| { |
| 16 | w.set_adcsel(0b11); | 16 | w.set_adcsel(pac::rcc::vals::Adcsel::SYSCLK); |
| 17 | }); | 17 | }); |
| 18 | pac::RCC.ahb2enr().modify(|w| w.set_adcen(true)); | 18 | pac::RCC.ahb2enr().modify(|w| w.set_adcen(true)); |
| 19 | 19 | ||
diff --git a/examples/stm32l4/src/bin/rng.rs b/examples/stm32l4/src/bin/rng.rs index 94251c12c..d184bcf77 100644 --- a/examples/stm32l4/src/bin/rng.rs +++ b/examples/stm32l4/src/bin/rng.rs | |||
| @@ -18,8 +18,8 @@ async fn main(_spawner: Spawner) { | |||
| 18 | let mut config = Config::default(); | 18 | let mut config = Config::default(); |
| 19 | config.rcc.mux = ClockSrc::PLL; | 19 | config.rcc.mux = ClockSrc::PLL; |
| 20 | config.rcc.hsi16 = true; | 20 | config.rcc.hsi16 = true; |
| 21 | config.rcc.pll_src = PLLSource::HSI16; | ||
| 22 | config.rcc.pll = Some(Pll { | 21 | config.rcc.pll = Some(Pll { |
| 22 | source: PLLSource::HSI16, | ||
| 23 | prediv: PllPreDiv::DIV1, | 23 | prediv: PllPreDiv::DIV1, |
| 24 | mul: PllMul::MUL18, | 24 | mul: PllMul::MUL18, |
| 25 | divp: None, | 25 | divp: None, |
diff --git a/examples/stm32l4/src/bin/rtc.rs b/examples/stm32l4/src/bin/rtc.rs index cd9f72ff3..a1b41f84a 100644 --- a/examples/stm32l4/src/bin/rtc.rs +++ b/examples/stm32l4/src/bin/rtc.rs | |||
| @@ -17,8 +17,8 @@ async fn main(_spawner: Spawner) { | |||
| 17 | let mut config = Config::default(); | 17 | let mut config = Config::default(); |
| 18 | config.rcc.mux = ClockSrc::PLL; | 18 | config.rcc.mux = ClockSrc::PLL; |
| 19 | config.rcc.hse = Some(Hertz::mhz(8)); | 19 | config.rcc.hse = Some(Hertz::mhz(8)); |
| 20 | config.rcc.pll_src = PLLSource::HSE; | ||
| 21 | config.rcc.pll = Some(Pll { | 20 | config.rcc.pll = Some(Pll { |
| 21 | source: PLLSource::HSE, | ||
| 22 | prediv: PllPreDiv::DIV1, | 22 | prediv: PllPreDiv::DIV1, |
| 23 | mul: PllMul::MUL20, | 23 | mul: PllMul::MUL20, |
| 24 | divp: None, | 24 | divp: None, |
diff --git a/examples/stm32l4/src/bin/spe_adin1110_http_server.rs b/examples/stm32l4/src/bin/spe_adin1110_http_server.rs index c1a27cf83..278d65438 100644 --- a/examples/stm32l4/src/bin/spe_adin1110_http_server.rs +++ b/examples/stm32l4/src/bin/spe_adin1110_http_server.rs | |||
| @@ -79,8 +79,8 @@ async fn main(spawner: Spawner) { | |||
| 79 | // 80MHz highest frequency for flash 0 wait. | 79 | // 80MHz highest frequency for flash 0 wait. |
| 80 | config.rcc.mux = ClockSrc::PLL; | 80 | config.rcc.mux = ClockSrc::PLL; |
| 81 | config.rcc.hse = Some(Hertz::mhz(8)); | 81 | config.rcc.hse = Some(Hertz::mhz(8)); |
| 82 | config.rcc.pll_src = PLLSource::HSE; | ||
| 83 | config.rcc.pll = Some(Pll { | 82 | config.rcc.pll = Some(Pll { |
| 83 | source: PLLSource::HSE, | ||
| 84 | prediv: PllPreDiv::DIV1, | 84 | prediv: PllPreDiv::DIV1, |
| 85 | mul: PllMul::MUL20, | 85 | mul: PllMul::MUL20, |
| 86 | divp: None, | 86 | divp: None, |
diff --git a/examples/stm32l4/src/bin/usb_serial.rs b/examples/stm32l4/src/bin/usb_serial.rs index 8f6eeef32..3785c6898 100644 --- a/examples/stm32l4/src/bin/usb_serial.rs +++ b/examples/stm32l4/src/bin/usb_serial.rs | |||
| @@ -26,8 +26,8 @@ async fn main(_spawner: Spawner) { | |||
| 26 | config.rcc.hsi48 = true; | 26 | config.rcc.hsi48 = true; |
| 27 | config.rcc.mux = ClockSrc::PLL; | 27 | config.rcc.mux = ClockSrc::PLL; |
| 28 | config.rcc.hsi16 = true; | 28 | config.rcc.hsi16 = true; |
| 29 | config.rcc.pll_src = PLLSource::HSI16; | ||
| 30 | config.rcc.pll = Some(Pll { | 29 | config.rcc.pll = Some(Pll { |
| 30 | source: PLLSource::HSI16, | ||
| 31 | prediv: PllPreDiv::DIV1, | 31 | prediv: PllPreDiv::DIV1, |
| 32 | mul: PllMul::MUL10, | 32 | mul: PllMul::MUL10, |
| 33 | divp: None, | 33 | divp: None, |
