aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorshakencodes <[email protected]>2023-11-01 12:48:08 -0700
committershakencodes <[email protected]>2023-11-01 13:22:50 -0700
commitb4a82b7ed44cfbb9929d4c1a6357aaf6ec177ac2 (patch)
treeefe1a07e1535b0cf8c2893f84415f7e1061d042f
parente2688dda22a813fdcf7938ef7ca003be4c94c0c2 (diff)
Correct adc_clock_source for all µprocs in l4l5.rs
-rw-r--r--embassy-stm32/Cargo.toml4
-rw-r--r--embassy-stm32/src/rcc/l4l5.rs5
2 files changed, 6 insertions, 3 deletions
diff --git a/embassy-stm32/Cargo.toml b/embassy-stm32/Cargo.toml
index ffb709342..bc79ab7a2 100644
--- a/embassy-stm32/Cargo.toml
+++ b/embassy-stm32/Cargo.toml
@@ -58,7 +58,7 @@ rand_core = "0.6.3"
58sdio-host = "0.5.0" 58sdio-host = "0.5.0"
59embedded-sdmmc = { git = "https://github.com/embassy-rs/embedded-sdmmc-rs", rev = "a4f293d3a6f72158385f79c98634cb8a14d0d2fc", optional = true } 59embedded-sdmmc = { git = "https://github.com/embassy-rs/embedded-sdmmc-rs", rev = "a4f293d3a6f72158385f79c98634cb8a14d0d2fc", optional = true }
60critical-section = "1.1" 60critical-section = "1.1"
61stm32-metapac = { git = "https://github.com/embassy-rs/stm32-data-generated", tag = "stm32-data-bcc9b6bf9fa195e91625849efc4ba473d9ace4e9" } 61stm32-metapac = { git = "https://github.com/embassy-rs/stm32-data-generated", tag = "stm32-data-73b8c37ae74fc28b247188c989fd99400611bd6b" }
62vcell = "0.1.3" 62vcell = "0.1.3"
63bxcan = "0.7.0" 63bxcan = "0.7.0"
64nb = "1.0.0" 64nb = "1.0.0"
@@ -76,7 +76,7 @@ critical-section = { version = "1.1", features = ["std"] }
76[build-dependencies] 76[build-dependencies]
77proc-macro2 = "1.0.36" 77proc-macro2 = "1.0.36"
78quote = "1.0.15" 78quote = "1.0.15"
79stm32-metapac = { git = "https://github.com/embassy-rs/stm32-data-generated", tag = "stm32-data-bcc9b6bf9fa195e91625849efc4ba473d9ace4e9", default-features = false, features = ["metadata"]} 79stm32-metapac = { git = "https://github.com/embassy-rs/stm32-data-generated", tag = "stm32-data-73b8c37ae74fc28b247188c989fd99400611bd6b", default-features = false, features = ["metadata"]}
80 80
81 81
82[features] 82[features]
diff --git a/embassy-stm32/src/rcc/l4l5.rs b/embassy-stm32/src/rcc/l4l5.rs
index 78b8e0606..d855d4779 100644
--- a/embassy-stm32/src/rcc/l4l5.rs
+++ b/embassy-stm32/src/rcc/l4l5.rs
@@ -113,7 +113,7 @@ impl Default for Config {
113 #[cfg(any(stm32l4, stm32l5, stm32wb))] 113 #[cfg(any(stm32l4, stm32l5, stm32wb))]
114 clk48_src: Clk48Src::HSI48, 114 clk48_src: Clk48Src::HSI48,
115 ls: Default::default(), 115 ls: Default::default(),
116 adc_clock_source: AdcClockSource::HSI, 116 adc_clock_source: AdcClockSource::SYS,
117 } 117 }
118 } 118 }
119} 119}
@@ -347,6 +347,9 @@ pub(crate) unsafe fn init(config: Config) {
347 }); 347 });
348 while RCC.cfgr().read().sws() != config.mux {} 348 while RCC.cfgr().read().sws() != config.mux {}
349 349
350 #[cfg(stm32l5)]
351 RCC.ccipr1().modify(|w| w.set_adcsel(config.adc_clock_source));
352 #[cfg(not(stm32l5))]
350 RCC.ccipr().modify(|w| w.set_adcsel(config.adc_clock_source)); 353 RCC.ccipr().modify(|w| w.set_adcsel(config.adc_clock_source));
351 354
352 #[cfg(any(stm32wl, stm32wb))] 355 #[cfg(any(stm32wl, stm32wb))]