aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDario Nieuwenhuis <[email protected]>2021-08-19 22:51:41 +0200
committerDario Nieuwenhuis <[email protected]>2021-08-19 22:51:41 +0200
commit9f51f9a1704033c1d0be9544f5312aeff67cce88 (patch)
tree6a4a2e51ee78ea1ed8f13e1ba073fd0100adecf9
parent637fcdd316b062915667c454ee32fa50184f5321 (diff)
stm32/wl: add stub APB3 to get it to build.
Completely untested.
-rw-r--r--embassy-stm32/src/rcc/mod.rs2
-rw-r--r--embassy-stm32/src/rcc/wl5x/mod.rs4
-rw-r--r--examples/stm32wl55/Cargo.toml2
m---------stm32-data0
4 files changed, 7 insertions, 1 deletions
diff --git a/embassy-stm32/src/rcc/mod.rs b/embassy-stm32/src/rcc/mod.rs
index cfa9444a8..9c8da4a98 100644
--- a/embassy-stm32/src/rcc/mod.rs
+++ b/embassy-stm32/src/rcc/mod.rs
@@ -10,6 +10,8 @@ pub struct Clocks {
10 pub sys: Hertz, 10 pub sys: Hertz,
11 pub apb1: Hertz, 11 pub apb1: Hertz,
12 pub apb2: Hertz, 12 pub apb2: Hertz,
13 #[cfg(rcc_wl5)]
14 pub apb3: Hertz,
13 15
14 pub apb1_tim: Hertz, 16 pub apb1_tim: Hertz,
15 pub apb2_tim: Hertz, 17 pub apb2_tim: Hertz,
diff --git a/embassy-stm32/src/rcc/wl5x/mod.rs b/embassy-stm32/src/rcc/wl5x/mod.rs
index 72caad2ec..e1e001c7b 100644
--- a/embassy-stm32/src/rcc/wl5x/mod.rs
+++ b/embassy-stm32/src/rcc/wl5x/mod.rs
@@ -190,6 +190,9 @@ impl RccExt for RCC {
190 } 190 }
191 }; 191 };
192 192
193 // TODO: completely untested
194 let apb3_freq = ahb_freq;
195
193 Clocks { 196 Clocks {
194 sys: sys_clk.hz(), 197 sys: sys_clk.hz(),
195 ahb1: ahb_freq.hz(), 198 ahb1: ahb_freq.hz(),
@@ -197,6 +200,7 @@ impl RccExt for RCC {
197 ahb3: ahb_freq.hz(), 200 ahb3: ahb_freq.hz(),
198 apb1: apb1_freq.hz(), 201 apb1: apb1_freq.hz(),
199 apb2: apb2_freq.hz(), 202 apb2: apb2_freq.hz(),
203 apb3: apb3_freq.hz(),
200 apb1_tim: apb1_tim_freq.hz(), 204 apb1_tim: apb1_tim_freq.hz(),
201 apb2_tim: apb2_tim_freq.hz(), 205 apb2_tim: apb2_tim_freq.hz(),
202 } 206 }
diff --git a/examples/stm32wl55/Cargo.toml b/examples/stm32wl55/Cargo.toml
index ebbe8b847..a7313e33f 100644
--- a/examples/stm32wl55/Cargo.toml
+++ b/examples/stm32wl55/Cargo.toml
@@ -26,7 +26,7 @@ defmt = "0.2.0"
26defmt-rtt = "0.2.0" 26defmt-rtt = "0.2.0"
27 27
28cortex-m = "0.7.1" 28cortex-m = "0.7.1"
29cortex-m-rt = "0.6.14" 29cortex-m-rt = "0.7.0"
30embedded-hal = { version = "0.2.4" } 30embedded-hal = { version = "0.2.4" }
31panic-probe = { version = "0.2.0", features= ["print-defmt"] } 31panic-probe = { version = "0.2.0", features= ["print-defmt"] }
32futures = { version = "0.3.8", default-features = false, features = ["async-await"] } 32futures = { version = "0.3.8", default-features = false, features = ["async-await"] }
diff --git a/stm32-data b/stm32-data
Subproject f56c24e9995fd7ff1182d936073f1fd4fde3283 Subproject d3c03a41de925d07e26a5f6157eb85307692a65