aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDario Nieuwenhuis <[email protected]>2025-05-18 21:20:11 +0200
committerGitHub <[email protected]>2025-05-18 21:20:11 +0200
commit41263587dfec4d326336dc9a5e01aadb89e96572 (patch)
tree9b567f8a24b349a3be96cca27d6883ce40540439
parent06585e754ed1bd166e39e58d07fbea0634a775da (diff)
parentf41e8c45f68ca31819ea1b1eae5fbd019bf8f318 (diff)
Merge pull request #4194 from i509VCB/update-metapac2
mspm0: generate features per chip + package
-rwxr-xr-xci.sh10
-rw-r--r--embassy-mspm0/Cargo.toml140
-rw-r--r--embassy-mspm0/README.md28
-rw-r--r--embassy-mspm0/build.rs87
-rw-r--r--embassy-mspm0/src/gpio.rs4
-rw-r--r--embassy-mspm0/src/int_group/g150x.rs51
-rw-r--r--embassy-mspm0/src/lib.rs17
-rw-r--r--examples/mspm0c1104/Cargo.toml2
-rw-r--r--examples/mspm0c1104/README.md4
-rw-r--r--examples/mspm0g3507/Cargo.toml2
-rw-r--r--examples/mspm0g3507/README.md4
-rw-r--r--examples/mspm0g3519/Cargo.toml2
-rw-r--r--examples/mspm0g3519/README.md4
-rw-r--r--examples/mspm0l1306/Cargo.toml2
-rw-r--r--examples/mspm0l1306/README.md4
-rw-r--r--examples/mspm0l2228/Cargo.toml2
-rw-r--r--examples/mspm0l2228/README.md4
-rw-r--r--tests/mspm0/Cargo.toml2
18 files changed, 326 insertions, 43 deletions
diff --git a/ci.sh b/ci.sh
index f2d461c1a..2f4164998 100755
--- a/ci.sh
+++ b/ci.sh
@@ -174,11 +174,11 @@ cargo batch \
174 --- build --release --manifest-path embassy-stm32/Cargo.toml --target thumbv6m-none-eabi --features stm32u073mb,defmt,exti,time-driver-any,time \ 174 --- build --release --manifest-path embassy-stm32/Cargo.toml --target thumbv6m-none-eabi --features stm32u073mb,defmt,exti,time-driver-any,time \
175 --- build --release --manifest-path embassy-stm32/Cargo.toml --target thumbv6m-none-eabi --features stm32u083rc,defmt,exti,time-driver-any,time \ 175 --- build --release --manifest-path embassy-stm32/Cargo.toml --target thumbv6m-none-eabi --features stm32u083rc,defmt,exti,time-driver-any,time \
176 --- build --release --manifest-path embassy-nxp/Cargo.toml --target thumbv8m.main-none-eabihf \ 176 --- build --release --manifest-path embassy-nxp/Cargo.toml --target thumbv8m.main-none-eabihf \
177 --- build --release --manifest-path embassy-mspm0/Cargo.toml --target thumbv6m-none-eabi --features mspm0c110x,defmt,time-driver-any \ 177 --- build --release --manifest-path embassy-mspm0/Cargo.toml --target thumbv6m-none-eabi --features mspm0c1104dgs20,defmt,time-driver-any \
178 --- build --release --manifest-path embassy-mspm0/Cargo.toml --target thumbv6m-none-eabi --features mspm0g350x,defmt,time-driver-any \ 178 --- build --release --manifest-path embassy-mspm0/Cargo.toml --target thumbv6m-none-eabi --features mspm0g3507pm,defmt,time-driver-any \
179 --- build --release --manifest-path embassy-mspm0/Cargo.toml --target thumbv6m-none-eabi --features mspm0g351x,defmt,time-driver-any \ 179 --- build --release --manifest-path embassy-mspm0/Cargo.toml --target thumbv6m-none-eabi --features mspm0g3519pz,defmt,time-driver-any \
180 --- build --release --manifest-path embassy-mspm0/Cargo.toml --target thumbv6m-none-eabi --features mspm0l130x,defmt,time-driver-any \ 180 --- build --release --manifest-path embassy-mspm0/Cargo.toml --target thumbv6m-none-eabi --features mspm0l1306rhb,defmt,time-driver-any \
181 --- build --release --manifest-path embassy-mspm0/Cargo.toml --target thumbv6m-none-eabi --features mspm0l222x,defmt,time-driver-any \ 181 --- build --release --manifest-path embassy-mspm0/Cargo.toml --target thumbv6m-none-eabi --features mspm0l2228pn,defmt,time-driver-any \
182 --- build --release --manifest-path cyw43/Cargo.toml --target thumbv6m-none-eabi --features ''\ 182 --- build --release --manifest-path cyw43/Cargo.toml --target thumbv6m-none-eabi --features ''\
183 --- build --release --manifest-path cyw43/Cargo.toml --target thumbv6m-none-eabi --features 'log' \ 183 --- build --release --manifest-path cyw43/Cargo.toml --target thumbv6m-none-eabi --features 'log' \
184 --- build --release --manifest-path cyw43/Cargo.toml --target thumbv6m-none-eabi --features 'defmt' \ 184 --- build --release --manifest-path cyw43/Cargo.toml --target thumbv6m-none-eabi --features 'defmt' \
diff --git a/embassy-mspm0/Cargo.toml b/embassy-mspm0/Cargo.toml
index 877d1ae18..1b189e05a 100644
--- a/embassy-mspm0/Cargo.toml
+++ b/embassy-mspm0/Cargo.toml
@@ -46,14 +46,14 @@ cortex-m = "0.7.6"
46critical-section = "1.2.0" 46critical-section = "1.2.0"
47 47
48# mspm0-metapac = { version = "" } 48# mspm0-metapac = { version = "" }
49mspm0-metapac = { git = "https://github.com/mspm0-rs/mspm0-data-generated/", tag = "mspm0-data-119240dd23ef5748d2a7bef219ca298d37ba604a" } 49mspm0-metapac = { git = "https://github.com/mspm0-rs/mspm0-data-generated/", tag = "mspm0-data-66a55c7bf38a2201ff48c299843e741f2d537f0b" }
50 50
51[build-dependencies] 51[build-dependencies]
52proc-macro2 = "1.0.94" 52proc-macro2 = "1.0.94"
53quote = "1.0.40" 53quote = "1.0.40"
54 54
55# mspm0-metapac = { version = "", default-features = false, features = ["metadata"] } 55# mspm0-metapac = { version = "", default-features = false, features = ["metadata"] }
56mspm0-metapac = { git = "https://github.com/mspm0-rs/mspm0-data-generated/", tag = "mspm0-data-119240dd23ef5748d2a7bef219ca298d37ba604a", default-features = false, features = ["metadata"] } 56mspm0-metapac = { git = "https://github.com/mspm0-rs/mspm0-data-generated/", tag = "mspm0-data-66a55c7bf38a2201ff48c299843e741f2d537f0b", default-features = false, features = ["metadata"] }
57 57
58[features] 58[features]
59default = ["rt"] 59default = ["rt"]
@@ -120,14 +120,138 @@ time-driver-tima0 = ["_time-driver"]
120time-driver-tima1 = ["_time-driver"] 120time-driver-tima1 = ["_time-driver"]
121 121
122#! ## Chip-selection features 122#! ## Chip-selection features
123#! Select your chip by specifying the model as a feature, e.g. `mspm0g350x`. 123#! Select your chip by specifying the model as a feature, e.g. `mspm0g3507pm`.
124#! Check the `Cargo.toml` for the latest list of supported chips. 124#! Check the `Cargo.toml` for the latest list of supported chips.
125#! 125#!
126#! **Important:** Do not forget to adapt the target chip in your toolchain, 126#! **Important:** Do not forget to adapt the target chip in your toolchain,
127#! e.g. in `.cargo/config.toml`. 127#! e.g. in `.cargo/config.toml`.
128 128
129mspm0c110x = [ "mspm0-metapac/mspm0c110x" ] 129mspm0c1103dgs20 = ["mspm0-metapac/mspm0c1103dgs20"]
130mspm0g350x = [ "mspm0-metapac/mspm0g350x" ] 130mspm0c1103dsg = ["mspm0-metapac/mspm0c1103dsg"]
131mspm0g351x = [ "mspm0-metapac/mspm0g351x" ] 131mspm0c1103dyy = ["mspm0-metapac/mspm0c1103dyy"]
132mspm0l130x = [ "mspm0-metapac/mspm0l130x" ] 132mspm0c1103ruk = ["mspm0-metapac/mspm0c1103ruk"]
133mspm0l222x = [ "mspm0-metapac/mspm0l222x" ] 133mspm0c1104dgs20 = ["mspm0-metapac/mspm0c1104dgs20"]
134mspm0c1104dsg = ["mspm0-metapac/mspm0c1104dsg"]
135mspm0c1104dyy = ["mspm0-metapac/mspm0c1104dyy"]
136mspm0c1104ruk = ["mspm0-metapac/mspm0c1104ruk"]
137mspm0c1104ycj = ["mspm0-metapac/mspm0c1104ycj"]
138mspm0g1105dgs28 = ["mspm0-metapac/mspm0g1105dgs28"]
139mspm0g1105pm = ["mspm0-metapac/mspm0g1105pm"]
140mspm0g1105pt = ["mspm0-metapac/mspm0g1105pt"]
141mspm0g1105rge = ["mspm0-metapac/mspm0g1105rge"]
142mspm0g1105rgz = ["mspm0-metapac/mspm0g1105rgz"]
143mspm0g1105rhb = ["mspm0-metapac/mspm0g1105rhb"]
144mspm0g1106dgs28 = ["mspm0-metapac/mspm0g1106dgs28"]
145mspm0g1106pm = ["mspm0-metapac/mspm0g1106pm"]
146mspm0g1106pt = ["mspm0-metapac/mspm0g1106pt"]
147mspm0g1106rge = ["mspm0-metapac/mspm0g1106rge"]
148mspm0g1106rgz = ["mspm0-metapac/mspm0g1106rgz"]
149mspm0g1106rhb = ["mspm0-metapac/mspm0g1106rhb"]
150mspm0g1107dgs28 = ["mspm0-metapac/mspm0g1107dgs28"]
151mspm0g1107pm = ["mspm0-metapac/mspm0g1107pm"]
152mspm0g1107pt = ["mspm0-metapac/mspm0g1107pt"]
153mspm0g1107rge = ["mspm0-metapac/mspm0g1107rge"]
154mspm0g1107rgz = ["mspm0-metapac/mspm0g1107rgz"]
155mspm0g1107rhb = ["mspm0-metapac/mspm0g1107rhb"]
156mspm0g1107ycj = ["mspm0-metapac/mspm0g1107ycj"]
157mspm0g1505pm = ["mspm0-metapac/mspm0g1505pm"]
158mspm0g1505pt = ["mspm0-metapac/mspm0g1505pt"]
159mspm0g1505rge = ["mspm0-metapac/mspm0g1505rge"]
160mspm0g1505rgz = ["mspm0-metapac/mspm0g1505rgz"]
161mspm0g1505rhb = ["mspm0-metapac/mspm0g1505rhb"]
162mspm0g1506pm = ["mspm0-metapac/mspm0g1506pm"]
163mspm0g1506pt = ["mspm0-metapac/mspm0g1506pt"]
164mspm0g1506rge = ["mspm0-metapac/mspm0g1506rge"]
165mspm0g1506rgz = ["mspm0-metapac/mspm0g1506rgz"]
166mspm0g1506rhb = ["mspm0-metapac/mspm0g1506rhb"]
167mspm0g1507pm = ["mspm0-metapac/mspm0g1507pm"]
168mspm0g1507pt = ["mspm0-metapac/mspm0g1507pt"]
169mspm0g1507rge = ["mspm0-metapac/mspm0g1507rge"]
170mspm0g1507rgz = ["mspm0-metapac/mspm0g1507rgz"]
171mspm0g1507rhb = ["mspm0-metapac/mspm0g1507rhb"]
172mspm0g1507ycj = ["mspm0-metapac/mspm0g1507ycj"]
173mspm0g1519rgz = ["mspm0-metapac/mspm0g1519rgz"]
174mspm0g1519rhb = ["mspm0-metapac/mspm0g1519rhb"]
175mspm0g3105dgs20 = ["mspm0-metapac/mspm0g3105dgs20"]
176mspm0g3105dgs28 = ["mspm0-metapac/mspm0g3105dgs28"]
177mspm0g3105rhb = ["mspm0-metapac/mspm0g3105rhb"]
178mspm0g3106dgs20 = ["mspm0-metapac/mspm0g3106dgs20"]
179mspm0g3106dgs28 = ["mspm0-metapac/mspm0g3106dgs28"]
180mspm0g3106rhb = ["mspm0-metapac/mspm0g3106rhb"]
181mspm0g3107dgs20 = ["mspm0-metapac/mspm0g3107dgs20"]
182mspm0g3107dgs28 = ["mspm0-metapac/mspm0g3107dgs28"]
183mspm0g3107rhb = ["mspm0-metapac/mspm0g3107rhb"]
184mspm0g3505dgs28 = ["mspm0-metapac/mspm0g3505dgs28"]
185mspm0g3505pm = ["mspm0-metapac/mspm0g3505pm"]
186mspm0g3505pt = ["mspm0-metapac/mspm0g3505pt"]
187mspm0g3505rgz = ["mspm0-metapac/mspm0g3505rgz"]
188mspm0g3505rhb = ["mspm0-metapac/mspm0g3505rhb"]
189mspm0g3506dgs28 = ["mspm0-metapac/mspm0g3506dgs28"]
190mspm0g3506pm = ["mspm0-metapac/mspm0g3506pm"]
191mspm0g3506pt = ["mspm0-metapac/mspm0g3506pt"]
192mspm0g3506rgz = ["mspm0-metapac/mspm0g3506rgz"]
193mspm0g3506rhb = ["mspm0-metapac/mspm0g3506rhb"]
194mspm0g3507dgs28 = ["mspm0-metapac/mspm0g3507dgs28"]
195mspm0g3507pm = ["mspm0-metapac/mspm0g3507pm"]
196mspm0g3507pt = ["mspm0-metapac/mspm0g3507pt"]
197mspm0g3507rgz = ["mspm0-metapac/mspm0g3507rgz"]
198mspm0g3507rhb = ["mspm0-metapac/mspm0g3507rhb"]
199mspm0g3519pm = ["mspm0-metapac/mspm0g3519pm"]
200mspm0g3519pn = ["mspm0-metapac/mspm0g3519pn"]
201mspm0g3519pz = ["mspm0-metapac/mspm0g3519pz"]
202mspm0g3519rgz = ["mspm0-metapac/mspm0g3519rgz"]
203mspm0g3519rhb = ["mspm0-metapac/mspm0g3519rhb"]
204mspm0l1105dgs20 = ["mspm0-metapac/mspm0l1105dgs20"]
205mspm0l1105dgs28 = ["mspm0-metapac/mspm0l1105dgs28"]
206mspm0l1105dyy = ["mspm0-metapac/mspm0l1105dyy"]
207mspm0l1105rge = ["mspm0-metapac/mspm0l1105rge"]
208mspm0l1105rtr = ["mspm0-metapac/mspm0l1105rtr"]
209mspm0l1106dgs20 = ["mspm0-metapac/mspm0l1106dgs20"]
210mspm0l1106dgs28 = ["mspm0-metapac/mspm0l1106dgs28"]
211mspm0l1106dyy = ["mspm0-metapac/mspm0l1106dyy"]
212mspm0l1106rge = ["mspm0-metapac/mspm0l1106rge"]
213mspm0l1106rhb = ["mspm0-metapac/mspm0l1106rhb"]
214mspm0l1106rtr = ["mspm0-metapac/mspm0l1106rtr"]
215mspm0l1227pm = ["mspm0-metapac/mspm0l1227pm"]
216mspm0l1227pn = ["mspm0-metapac/mspm0l1227pn"]
217mspm0l1227pt = ["mspm0-metapac/mspm0l1227pt"]
218mspm0l1227rge = ["mspm0-metapac/mspm0l1227rge"]
219mspm0l1227rgz = ["mspm0-metapac/mspm0l1227rgz"]
220mspm0l1227rhb = ["mspm0-metapac/mspm0l1227rhb"]
221mspm0l1228pm = ["mspm0-metapac/mspm0l1228pm"]
222mspm0l1228pn = ["mspm0-metapac/mspm0l1228pn"]
223mspm0l1228pt = ["mspm0-metapac/mspm0l1228pt"]
224mspm0l1228rge = ["mspm0-metapac/mspm0l1228rge"]
225mspm0l1228rgz = ["mspm0-metapac/mspm0l1228rgz"]
226mspm0l1228rhb = ["mspm0-metapac/mspm0l1228rhb"]
227mspm0l1303rge = ["mspm0-metapac/mspm0l1303rge"]
228mspm0l1304dgs20 = ["mspm0-metapac/mspm0l1304dgs20"]
229mspm0l1304dgs28 = ["mspm0-metapac/mspm0l1304dgs28"]
230mspm0l1304dyy = ["mspm0-metapac/mspm0l1304dyy"]
231mspm0l1304rge = ["mspm0-metapac/mspm0l1304rge"]
232mspm0l1304rhb = ["mspm0-metapac/mspm0l1304rhb"]
233mspm0l1304rtr = ["mspm0-metapac/mspm0l1304rtr"]
234mspm0l1305dgs20 = ["mspm0-metapac/mspm0l1305dgs20"]
235mspm0l1305dgs28 = ["mspm0-metapac/mspm0l1305dgs28"]
236mspm0l1305dyy = ["mspm0-metapac/mspm0l1305dyy"]
237mspm0l1305rge = ["mspm0-metapac/mspm0l1305rge"]
238mspm0l1305rtr = ["mspm0-metapac/mspm0l1305rtr"]
239mspm0l1306dgs20 = ["mspm0-metapac/mspm0l1306dgs20"]
240mspm0l1306dgs28 = ["mspm0-metapac/mspm0l1306dgs28"]
241mspm0l1306dyy = ["mspm0-metapac/mspm0l1306dyy"]
242mspm0l1306rge = ["mspm0-metapac/mspm0l1306rge"]
243mspm0l1306rhb = ["mspm0-metapac/mspm0l1306rhb"]
244mspm0l1343dgs20 = ["mspm0-metapac/mspm0l1343dgs20"]
245mspm0l1344dgs20 = ["mspm0-metapac/mspm0l1344dgs20"]
246mspm0l1345dgs28 = ["mspm0-metapac/mspm0l1345dgs28"]
247mspm0l1346dgs28 = ["mspm0-metapac/mspm0l1346dgs28"]
248mspm0l2227pm = ["mspm0-metapac/mspm0l2227pm"]
249mspm0l2227pn = ["mspm0-metapac/mspm0l2227pn"]
250mspm0l2227pt = ["mspm0-metapac/mspm0l2227pt"]
251mspm0l2227rgz = ["mspm0-metapac/mspm0l2227rgz"]
252mspm0l2228pm = ["mspm0-metapac/mspm0l2228pm"]
253mspm0l2228pn = ["mspm0-metapac/mspm0l2228pn"]
254mspm0l2228pt = ["mspm0-metapac/mspm0l2228pt"]
255mspm0l2228rgz = ["mspm0-metapac/mspm0l2228rgz"]
256msps003f3pw20 = ["mspm0-metapac/msps003f3pw20"]
257msps003f4pw20 = ["mspm0-metapac/msps003f4pw20"]
diff --git a/embassy-mspm0/README.md b/embassy-mspm0/README.md
new file mode 100644
index 000000000..b2b8934aa
--- /dev/null
+++ b/embassy-mspm0/README.md
@@ -0,0 +1,28 @@
1# Embassy MSPM0 HAL
2
3The embassy-mspm0 HAL aims to provide a safe, idiomatic hardware abstraction layer for all MSPM0 and MSPS003 chips.
4
5* [Documentation](https://docs.embassy.dev/embassy-mspm0/) (**Important:** use docs.embassy.dev rather than docs.rs to see the specific docs for the chip you’re using!)
6* [Source](https://github.com/embassy-rs/embassy/tree/main/embassy-mspm0)
7* [Examples](https://github.com/embassy-rs/embassy/tree/main/examples)
8
9## Embedded-hal
10
11The `embassy-mspm0` HAL implements the traits from [embedded-hal](https://crates.io/crates/embedded-hal) (1.0) and [embedded-hal-async](https://crates.io/crates/embedded-hal-async), as well as [embedded-io](https://crates.io/crates/embedded-io) and [embedded-io-async](https://crates.io/crates/embedded-io-async).
12
13## A note on feature flag names
14
15Feature flag names for chips do not include temperature rating or distribution format.
16
17Usually chapter 10 of your device's datasheet will explain the device nomenclature and how to decode it. Feature names in embassy-mspm0 only use the following from device nomenclature:
18- MCU platform
19- Product family
20- Device subfamily
21- Flash memory
22- Package type
23
24This means for a part such as `MSPM0G3507SPMR`, the feature name is `mspm0g3507pm`. This also means that `MSPM0G3507QPMRQ1` uses the feature `mspm0g3507pm`, since the Q1 parts are just qualified variants of the base G3507 with a PM (QFP-64) package.
25
26## Interoperability
27
28This crate can run on any executor.
diff --git a/embassy-mspm0/build.rs b/embassy-mspm0/build.rs
index 08209df2a..409ce0621 100644
--- a/embassy-mspm0/build.rs
+++ b/embassy-mspm0/build.rs
@@ -7,7 +7,7 @@ use std::sync::LazyLock;
7use std::{env, fs}; 7use std::{env, fs};
8 8
9use common::CfgSet; 9use common::CfgSet;
10use mspm0_metapac::metadata::METADATA; 10use mspm0_metapac::metadata::{ALL_CHIPS, METADATA};
11use proc_macro2::{Ident, Literal, Span, TokenStream}; 11use proc_macro2::{Ident, Literal, Span, TokenStream};
12use quote::{format_ident, quote}; 12use quote::{format_ident, quote};
13 13
@@ -24,6 +24,27 @@ fn generate_code() {
24 24
25 cfgs.declare_all(&["gpio_pb", "gpio_pc", "int_group1"]); 25 cfgs.declare_all(&["gpio_pb", "gpio_pc", "int_group1"]);
26 26
27 let chip_name = match env::vars()
28 .map(|(a, _)| a)
29 .filter(|x| x.starts_with("CARGO_FEATURE_MSPM0") || x.starts_with("CARGO_FEATURE_MSPS"))
30 .get_one()
31 {
32 Ok(x) => x,
33 Err(GetOneError::None) => panic!("No mspm0xx/mspsxx Cargo feature enabled"),
34 Err(GetOneError::Multiple) => panic!("Multiple mspm0xx/mspsxx Cargo features enabled"),
35 }
36 .strip_prefix("CARGO_FEATURE_")
37 .unwrap()
38 .to_ascii_lowercase()
39 .replace('_', "-");
40
41 eprintln!("chip: {chip_name}");
42
43 cfgs.enable_all(&get_chip_cfgs(&chip_name));
44 for chip in ALL_CHIPS {
45 cfgs.declare_all(&get_chip_cfgs(&chip));
46 }
47
27 let mut singletons = get_singletons(&mut cfgs); 48 let mut singletons = get_singletons(&mut cfgs);
28 49
29 time_driver(&mut singletons, &mut cfgs); 50 time_driver(&mut singletons, &mut cfgs);
@@ -44,6 +65,60 @@ fn generate_code() {
44 rustfmt(&out_file); 65 rustfmt(&out_file);
45} 66}
46 67
68fn get_chip_cfgs(chip_name: &str) -> Vec<String> {
69 let mut cfgs = Vec::new();
70
71 // GPIO on C110x is special as it does not belong to an interrupt group.
72 if chip_name.starts_with("mspm0c110") || chip_name.starts_with("msps003f") {
73 cfgs.push("mspm0c110x".to_string());
74 }
75
76 // Family ranges (temporary until int groups are generated)
77 //
78 // TODO: Remove this once int group stuff is generated.
79 if chip_name.starts_with("mspm0g110") {
80 cfgs.push("mspm0g110x".to_string());
81 }
82
83 if chip_name.starts_with("mspm0g150") {
84 cfgs.push("mspm0g150x".to_string());
85 }
86
87 if chip_name.starts_with("mspm0g310") {
88 cfgs.push("mspm0g310x".to_string());
89 }
90
91 if chip_name.starts_with("mspm0g350") {
92 cfgs.push("mspm0g350x".to_string());
93 }
94
95 if chip_name.starts_with("mspm0g351") {
96 cfgs.push("mspm0g351x".to_string());
97 }
98
99 if chip_name.starts_with("mspm0l110") {
100 cfgs.push("mspm0l110x".to_string());
101 }
102
103 if chip_name.starts_with("mspm0l122") {
104 cfgs.push("mspm0l122x".to_string());
105 }
106
107 if chip_name.starts_with("mspm0l130") {
108 cfgs.push("mspm0l130x".to_string());
109 }
110
111 if chip_name.starts_with("mspm0l134") {
112 cfgs.push("mspm0l134x".to_string());
113 }
114
115 if chip_name.starts_with("mspm0l222") {
116 cfgs.push("mspm0l222x".to_string());
117 }
118
119 cfgs
120}
121
47#[derive(Debug, Clone)] 122#[derive(Debug, Clone)]
48struct Singleton { 123struct Singleton {
49 name: String, 124 name: String,
@@ -146,7 +221,7 @@ fn make_valid_identifier(s: &str) -> Singleton {
146} 221}
147 222
148fn generate_pincm_mapping() -> TokenStream { 223fn generate_pincm_mapping() -> TokenStream {
149 let pincms = METADATA.pincm_mappings.iter().map(|mapping| { 224 let pincms = METADATA.pins.iter().map(|mapping| {
150 let port_letter = mapping.pin.strip_prefix("P").unwrap(); 225 let port_letter = mapping.pin.strip_prefix("P").unwrap();
151 let port_base = (port_letter.chars().next().unwrap() as u8 - b'A') * 32; 226 let port_base = (port_letter.chars().next().unwrap() as u8 - b'A') * 32;
152 // This assumes all ports are single letter length. 227 // This assumes all ports are single letter length.
@@ -174,11 +249,11 @@ fn generate_pincm_mapping() -> TokenStream {
174} 249}
175 250
176fn generate_pin() -> TokenStream { 251fn generate_pin() -> TokenStream {
177 let pin_impls = METADATA.pincm_mappings.iter().map(|pincm_mapping| { 252 let pin_impls = METADATA.pins.iter().map(|pin| {
178 let name = Ident::new(&pincm_mapping.pin, Span::call_site()); 253 let name = Ident::new(&pin.pin, Span::call_site());
179 let port_letter = pincm_mapping.pin.strip_prefix("P").unwrap(); 254 let port_letter = pin.pin.strip_prefix("P").unwrap();
180 let port_letter = port_letter.chars().next().unwrap(); 255 let port_letter = port_letter.chars().next().unwrap();
181 let pin_number = Literal::u8_unsuffixed(pincm_mapping.pin[2..].parse::<u8>().unwrap()); 256 let pin_number = Literal::u8_unsuffixed(pin.pin[2..].parse::<u8>().unwrap());
182 257
183 let port = Ident::new(&format!("Port{}", port_letter), Span::call_site()); 258 let port = Ident::new(&format!("Port{}", port_letter), Span::call_site());
184 259
diff --git a/embassy-mspm0/src/gpio.rs b/embassy-mspm0/src/gpio.rs
index 3f895d962..3c824b0e6 100644
--- a/embassy-mspm0/src/gpio.rs
+++ b/embassy-mspm0/src/gpio.rs
@@ -10,7 +10,7 @@ use embassy_sync::waitqueue::AtomicWaker;
10 10
11use crate::pac::gpio::vals::*; 11use crate::pac::gpio::vals::*;
12use crate::pac::gpio::{self}; 12use crate::pac::gpio::{self};
13#[cfg(all(feature = "rt", feature = "mspm0c110x"))] 13#[cfg(all(feature = "rt", mspm0c110x))]
14use crate::pac::interrupt; 14use crate::pac::interrupt;
15use crate::pac::{self}; 15use crate::pac::{self};
16 16
@@ -1120,7 +1120,7 @@ impl Iterator for BitIter {
1120} 1120}
1121 1121
1122// C110x has a dedicated interrupt just for GPIOA, as it does not have a GROUP1 interrupt. 1122// C110x has a dedicated interrupt just for GPIOA, as it does not have a GROUP1 interrupt.
1123#[cfg(all(feature = "rt", feature = "mspm0c110x"))] 1123#[cfg(all(feature = "rt", mspm0c110x))]
1124#[interrupt] 1124#[interrupt]
1125fn GPIOA() { 1125fn GPIOA() {
1126 gpioa_interrupt(); 1126 gpioa_interrupt();
diff --git a/embassy-mspm0/src/int_group/g150x.rs b/embassy-mspm0/src/int_group/g150x.rs
new file mode 100644
index 000000000..706ba2078
--- /dev/null
+++ b/embassy-mspm0/src/int_group/g150x.rs
@@ -0,0 +1,51 @@
1use crate::pac;
2use crate::pac::interrupt;
3
4#[cfg(feature = "rt")]
5#[interrupt]
6fn GROUP0() {
7 use mspm0_metapac::Group0;
8
9 let group = pac::CPUSS.int_group(0);
10
11 // Must subtract by 1 since NO_INTR is value 0
12 let iidx = group.iidx().read().stat().to_bits() - 1;
13
14 let Ok(group) = pac::Group0::try_from(iidx as u8) else {
15 debug!("Invalid IIDX for group 0: {}", iidx);
16 return;
17 };
18
19 match group {
20 Group0::WWDT0 => todo!("implement WWDT0"),
21 Group0::WWDT1 => todo!("implement WWDT1"),
22 Group0::DEBUGSS => todo!("implement DEBUGSS"),
23 Group0::FLASHCTL => todo!("implement FLASHCTL"),
24 Group0::SYSCTL => todo!("implement SYSCTL"),
25 }
26}
27
28#[cfg(feature = "rt")]
29#[interrupt]
30fn GROUP1() {
31 use mspm0_metapac::Group1;
32
33 let group = pac::CPUSS.int_group(1);
34
35 // Must subtract by 1 since NO_INTR is value 0
36 let iidx = group.iidx().read().stat().to_bits() - 1;
37
38 let Ok(group) = pac::Group1::try_from(iidx as u8) else {
39 debug!("Invalid IIDX for group 1: {}", iidx);
40 return;
41 };
42
43 match group {
44 Group1::GPIOA => crate::gpio::gpioa_interrupt(),
45 Group1::GPIOB => crate::gpio::gpiob_interrupt(),
46 Group1::COMP0 => todo!("implement COMP0"),
47 Group1::COMP1 => todo!("implement COMP1"),
48 Group1::COMP2 => todo!("implement COMP2"),
49 Group1::TRNG => todo!("implement TRNG"),
50 }
51}
diff --git a/embassy-mspm0/src/lib.rs b/embassy-mspm0/src/lib.rs
index e8f5971d5..df2d83cc0 100644
--- a/embassy-mspm0/src/lib.rs
+++ b/embassy-mspm0/src/lib.rs
@@ -1,6 +1,11 @@
1#![no_std] 1#![no_std]
2// Doc feature labels can be tested locally by running RUSTDOCFLAGS="--cfg=docsrs" cargo +nightly doc 2// Doc feature labels can be tested locally by running RUSTDOCFLAGS="--cfg=docsrs" cargo +nightly doc
3#![cfg_attr(docsrs, feature(doc_auto_cfg, doc_cfg_hide), doc(cfg_hide(doc, docsrs)))] 3#![cfg_attr(docsrs, feature(doc_auto_cfg, doc_cfg_hide), doc(cfg_hide(doc, docsrs)))]
4#![cfg_attr(
5 docsrs,
6 doc = "<div style='padding:30px;background:#810;color:#fff;text-align:center;'><p>You might want to <a href='https://docs.embassy.dev/embassy-mspm0'>browse the `embassy-mspm0` documentation on the Embassy website</a> instead.</p><p>The documentation here on `docs.rs` is built for a single chip only, while on the Embassy website you can pick your exact chip from the top menu. Available peripherals and their APIs change depending on the chip.</p></div>\n\n"
7)]
8#![doc = include_str!("../README.md")]
4 9
5// This mod MUST go first, so that the others see its macros. 10// This mod MUST go first, so that the others see its macros.
6pub(crate) mod fmt; 11pub(crate) mod fmt;
@@ -35,11 +40,11 @@ pub mod mode {
35mod time_driver; 40mod time_driver;
36 41
37// Interrupt group handlers. 42// Interrupt group handlers.
38#[cfg_attr(feature = "mspm0c110x", path = "int_group/c110x.rs")] 43#[cfg_attr(mspm0c110x, path = "int_group/c110x.rs")]
39#[cfg_attr(feature = "mspm0g350x", path = "int_group/g350x.rs")] 44#[cfg_attr(mspm0g350x, path = "int_group/g350x.rs")]
40#[cfg_attr(feature = "mspm0g351x", path = "int_group/g351x.rs")] 45#[cfg_attr(mspm0g351x, path = "int_group/g351x.rs")]
41#[cfg_attr(feature = "mspm0l130x", path = "int_group/l130x.rs")] 46#[cfg_attr(mspm0l130x, path = "int_group/l130x.rs")]
42#[cfg_attr(feature = "mspm0l222x", path = "int_group/l222x.rs")] 47#[cfg_attr(mspm0l222x, path = "int_group/l222x.rs")]
43mod int_group; 48mod int_group;
44 49
45pub(crate) mod _generated { 50pub(crate) mod _generated {
@@ -109,7 +114,7 @@ pub fn init(_config: Config) -> Peripherals {
109 114
110 _generated::enable_group_interrupts(cs); 115 _generated::enable_group_interrupts(cs);
111 116
112 #[cfg(feature = "mspm0c110x")] 117 #[cfg(mspm0c110x)]
113 unsafe { 118 unsafe {
114 use crate::_generated::interrupt::typelevel::Interrupt; 119 use crate::_generated::interrupt::typelevel::Interrupt;
115 crate::interrupt::typelevel::GPIOA::enable(); 120 crate::interrupt::typelevel::GPIOA::enable();
diff --git a/examples/mspm0c1104/Cargo.toml b/examples/mspm0c1104/Cargo.toml
index 1498b599d..7d419af51 100644
--- a/examples/mspm0c1104/Cargo.toml
+++ b/examples/mspm0c1104/Cargo.toml
@@ -5,7 +5,7 @@ version = "0.1.0"
5license = "MIT OR Apache-2.0" 5license = "MIT OR Apache-2.0"
6 6
7[dependencies] 7[dependencies]
8embassy-mspm0 = { version = "0.1.0", path = "../../embassy-mspm0", features = ["mspm0c110x", "defmt", "rt", "time-driver-any"] } 8embassy-mspm0 = { version = "0.1.0", path = "../../embassy-mspm0", features = ["mspm0c1104dgs20", "defmt", "rt", "time-driver-any"] }
9embassy-executor = { version = "0.7.0", path = "../../embassy-executor", features = ["arch-cortex-m", "executor-thread", "executor-interrupt"] } 9embassy-executor = { version = "0.7.0", path = "../../embassy-executor", features = ["arch-cortex-m", "executor-thread", "executor-interrupt"] }
10embassy-sync = { version = "0.6.2", path = "../../embassy-sync", features = ["defmt"] } 10embassy-sync = { version = "0.6.2", path = "../../embassy-sync", features = ["defmt"] }
11embassy-time = { version = "0.4.0", path = "../../embassy-time", features = ["defmt"] } 11embassy-time = { version = "0.4.0", path = "../../embassy-time", features = ["defmt"] }
diff --git a/examples/mspm0c1104/README.md b/examples/mspm0c1104/README.md
index e5c9f961d..86b6c3918 100644
--- a/examples/mspm0c1104/README.md
+++ b/examples/mspm0c1104/README.md
@@ -1,4 +1,4 @@
1# Examples for MSPM0C110x family 1# Examples for MSPM0C1104
2 2
3Run individual examples with 3Run individual examples with
4``` 4```
@@ -15,7 +15,7 @@ A large number of the examples are written for the [LP-MSPM0C1104](https://www.t
15You might need to adjust `.cargo/config.toml`, `Cargo.toml` and possibly update pin numbers or peripherals to match the specific MCU or board you are using. 15You might need to adjust `.cargo/config.toml`, `Cargo.toml` and possibly update pin numbers or peripherals to match the specific MCU or board you are using.
16 16
17* [ ] Update .cargo/config.toml with the correct probe-rs command to use your specific MCU. For example for C1104 it should be `probe-rs run --chip MSPM0C1104`. (use `probe-rs chip list` to find your chip) 17* [ ] Update .cargo/config.toml with the correct probe-rs command to use your specific MCU. For example for C1104 it should be `probe-rs run --chip MSPM0C1104`. (use `probe-rs chip list` to find your chip)
18* [ ] Update Cargo.toml to have the correct `embassy-mspm0` feature. For example for C1104 it should be `mspm0c1104`. Look in the `Cargo.toml` file of the `embassy-mspm0` project to find the correct feature flag for your chip. 18* [ ] Update Cargo.toml to have the correct `embassy-mspm0` feature. For the LP-MSPM0C1104 it should be `mspm0c1104dgs20`. Look in the `Cargo.toml` file of the `embassy-mspm0` project to find the correct feature flag for your chip.
19* [ ] If your board has a special clock or power configuration, make sure that it is set up appropriately. 19* [ ] If your board has a special clock or power configuration, make sure that it is set up appropriately.
20* [ ] If your board has different pin mapping, update any pin numbers or peripherals in the given example code to match your schematic 20* [ ] If your board has different pin mapping, update any pin numbers or peripherals in the given example code to match your schematic
21 21
diff --git a/examples/mspm0g3507/Cargo.toml b/examples/mspm0g3507/Cargo.toml
index 78c4b3f5a..5a02b7249 100644
--- a/examples/mspm0g3507/Cargo.toml
+++ b/examples/mspm0g3507/Cargo.toml
@@ -5,7 +5,7 @@ version = "0.1.0"
5license = "MIT OR Apache-2.0" 5license = "MIT OR Apache-2.0"
6 6
7[dependencies] 7[dependencies]
8embassy-mspm0 = { version = "0.1.0", path = "../../embassy-mspm0", features = ["mspm0g350x", "defmt", "rt", "time-driver-any"] } 8embassy-mspm0 = { version = "0.1.0", path = "../../embassy-mspm0", features = ["mspm0g3507pm", "defmt", "rt", "time-driver-any"] }
9embassy-executor = { version = "0.7.0", path = "../../embassy-executor", features = ["arch-cortex-m", "executor-thread", "executor-interrupt"] } 9embassy-executor = { version = "0.7.0", path = "../../embassy-executor", features = ["arch-cortex-m", "executor-thread", "executor-interrupt"] }
10embassy-sync = { version = "0.6.2", path = "../../embassy-sync", features = ["defmt"] } 10embassy-sync = { version = "0.6.2", path = "../../embassy-sync", features = ["defmt"] }
11embassy-time = { version = "0.4.0", path = "../../embassy-time", features = ["defmt"] } 11embassy-time = { version = "0.4.0", path = "../../embassy-time", features = ["defmt"] }
diff --git a/examples/mspm0g3507/README.md b/examples/mspm0g3507/README.md
index 5e8a83212..be91dc5a0 100644
--- a/examples/mspm0g3507/README.md
+++ b/examples/mspm0g3507/README.md
@@ -1,4 +1,4 @@
1# Examples for MSPM0C350x family 1# Examples for MSPM0M3507
2 2
3Run individual examples with 3Run individual examples with
4``` 4```
@@ -15,7 +15,7 @@ A large number of the examples are written for the [LP-MSPM0G3507](https://www.t
15You might need to adjust `.cargo/config.toml`, `Cargo.toml` and possibly update pin numbers or peripherals to match the specific MCU or board you are using. 15You might need to adjust `.cargo/config.toml`, `Cargo.toml` and possibly update pin numbers or peripherals to match the specific MCU or board you are using.
16 16
17* [ ] Update .cargo/config.toml with the correct probe-rs command to use your specific MCU. For example for G3507 it should be `probe-rs run --chip MSPM0G3507`. (use `probe-rs chip list` to find your chip) 17* [ ] Update .cargo/config.toml with the correct probe-rs command to use your specific MCU. For example for G3507 it should be `probe-rs run --chip MSPM0G3507`. (use `probe-rs chip list` to find your chip)
18* [ ] Update Cargo.toml to have the correct `embassy-mspm0` feature. For example for G3507 it should be `mspm0g3507`. Look in the `Cargo.toml` file of the `embassy-mspm0` project to find the correct feature flag for your chip. 18* [ ] Update Cargo.toml to have the correct `embassy-mspm0` feature. For the LP-MSPM0G3507 it should be `mspm0g3507pm`. Look in the `Cargo.toml` file of the `embassy-mspm0` project to find the correct feature flag for your chip.
19* [ ] If your board has a special clock or power configuration, make sure that it is set up appropriately. 19* [ ] If your board has a special clock or power configuration, make sure that it is set up appropriately.
20* [ ] If your board has different pin mapping, update any pin numbers or peripherals in the given example code to match your schematic 20* [ ] If your board has different pin mapping, update any pin numbers or peripherals in the given example code to match your schematic
21 21
diff --git a/examples/mspm0g3519/Cargo.toml b/examples/mspm0g3519/Cargo.toml
index 1d191b2da..fc647a4ce 100644
--- a/examples/mspm0g3519/Cargo.toml
+++ b/examples/mspm0g3519/Cargo.toml
@@ -5,7 +5,7 @@ version = "0.1.0"
5license = "MIT OR Apache-2.0" 5license = "MIT OR Apache-2.0"
6 6
7[dependencies] 7[dependencies]
8embassy-mspm0 = { version = "0.1.0", path = "../../embassy-mspm0", features = ["mspm0g351x", "defmt", "rt", "time-driver-any"] } 8embassy-mspm0 = { version = "0.1.0", path = "../../embassy-mspm0", features = ["mspm0g3519pz", "defmt", "rt", "time-driver-any"] }
9embassy-executor = { version = "0.7.0", path = "../../embassy-executor", features = ["arch-cortex-m", "executor-thread", "executor-interrupt"] } 9embassy-executor = { version = "0.7.0", path = "../../embassy-executor", features = ["arch-cortex-m", "executor-thread", "executor-interrupt"] }
10embassy-sync = { version = "0.6.2", path = "../../embassy-sync", features = ["defmt"] } 10embassy-sync = { version = "0.6.2", path = "../../embassy-sync", features = ["defmt"] }
11embassy-time = { version = "0.4.0", path = "../../embassy-time", features = ["defmt"] } 11embassy-time = { version = "0.4.0", path = "../../embassy-time", features = ["defmt"] }
diff --git a/examples/mspm0g3519/README.md b/examples/mspm0g3519/README.md
index 5034b1913..c392c9e25 100644
--- a/examples/mspm0g3519/README.md
+++ b/examples/mspm0g3519/README.md
@@ -1,4 +1,4 @@
1# Examples for MSPM0G351x family 1# Examples for MSPM0G3519
2 2
3Run individual examples with 3Run individual examples with
4``` 4```
@@ -15,7 +15,7 @@ A large number of the examples are written for the [LP-MSPM0G3519](https://www.t
15You might need to adjust `.cargo/config.toml`, `Cargo.toml` and possibly update pin numbers or peripherals to match the specific MCU or board you are using. 15You might need to adjust `.cargo/config.toml`, `Cargo.toml` and possibly update pin numbers or peripherals to match the specific MCU or board you are using.
16 16
17* [ ] Update .cargo/config.toml with the correct probe-rs command to use your specific MCU. For example for G3519 it should be `probe-rs run --chip MSPM0G3519`. (use `probe-rs chip list` to find your chip) 17* [ ] Update .cargo/config.toml with the correct probe-rs command to use your specific MCU. For example for G3519 it should be `probe-rs run --chip MSPM0G3519`. (use `probe-rs chip list` to find your chip)
18* [ ] Update Cargo.toml to have the correct `embassy-mspm0` feature. For example for G3519 it should be `mspm0g3519`. Look in the `Cargo.toml` file of the `embassy-mspm0` project to find the correct feature flag for your chip. 18* [ ] Update Cargo.toml to have the correct `embassy-mspm0` feature. For the LP-MSPM0G3519 it should be `mspm0g3519pz`. Look in the `Cargo.toml` file of the `embassy-mspm0` project to find the correct feature flag for your chip.
19* [ ] If your board has a special clock or power configuration, make sure that it is set up appropriately. 19* [ ] If your board has a special clock or power configuration, make sure that it is set up appropriately.
20* [ ] If your board has different pin mapping, update any pin numbers or peripherals in the given example code to match your schematic 20* [ ] If your board has different pin mapping, update any pin numbers or peripherals in the given example code to match your schematic
21 21
diff --git a/examples/mspm0l1306/Cargo.toml b/examples/mspm0l1306/Cargo.toml
index e427971fe..6f2f33b1e 100644
--- a/examples/mspm0l1306/Cargo.toml
+++ b/examples/mspm0l1306/Cargo.toml
@@ -5,7 +5,7 @@ version = "0.1.0"
5license = "MIT OR Apache-2.0" 5license = "MIT OR Apache-2.0"
6 6
7[dependencies] 7[dependencies]
8embassy-mspm0 = { version = "0.1.0", path = "../../embassy-mspm0", features = ["mspm0l130x", "defmt", "rt", "time-driver-any"] } 8embassy-mspm0 = { version = "0.1.0", path = "../../embassy-mspm0", features = ["mspm0l1306rhb", "defmt", "rt", "time-driver-any"] }
9embassy-executor = { version = "0.7.0", path = "../../embassy-executor", features = ["arch-cortex-m", "executor-thread", "executor-interrupt"] } 9embassy-executor = { version = "0.7.0", path = "../../embassy-executor", features = ["arch-cortex-m", "executor-thread", "executor-interrupt"] }
10embassy-sync = { version = "0.6.2", path = "../../embassy-sync", features = ["defmt"] } 10embassy-sync = { version = "0.6.2", path = "../../embassy-sync", features = ["defmt"] }
11embassy-time = { version = "0.4.0", path = "../../embassy-time", features = ["defmt"] } 11embassy-time = { version = "0.4.0", path = "../../embassy-time", features = ["defmt"] }
diff --git a/examples/mspm0l1306/README.md b/examples/mspm0l1306/README.md
index 5a55d721e..4d698e0fa 100644
--- a/examples/mspm0l1306/README.md
+++ b/examples/mspm0l1306/README.md
@@ -1,4 +1,4 @@
1# Examples for MSPM0L130x family 1# Examples for MSPM0L1306
2 2
3Run individual examples with 3Run individual examples with
4``` 4```
@@ -15,7 +15,7 @@ A large number of the examples are written for the [LP-MSPM0L1306](https://www.t
15You might need to adjust `.cargo/config.toml`, `Cargo.toml` and possibly update pin numbers or peripherals to match the specific MCU or board you are using. 15You might need to adjust `.cargo/config.toml`, `Cargo.toml` and possibly update pin numbers or peripherals to match the specific MCU or board you are using.
16 16
17* [ ] Update .cargo/config.toml with the correct probe-rs command to use your specific MCU. For example for L1306 it should be `probe-rs run --chip MSPM0L1306`. (use `probe-rs chip list` to find your chip) 17* [ ] Update .cargo/config.toml with the correct probe-rs command to use your specific MCU. For example for L1306 it should be `probe-rs run --chip MSPM0L1306`. (use `probe-rs chip list` to find your chip)
18* [ ] Update Cargo.toml to have the correct `embassy-mspm0` feature. For example for L1306 it should be `mspm0l1306`. Look in the `Cargo.toml` file of the `embassy-mspm0` project to find the correct feature flag for your chip. 18* [ ] Update Cargo.toml to have the correct `embassy-mspm0` feature. For the LP-MSPM0L1306 it should be `mspm0l1306rhb`. Look in the `Cargo.toml` file of the `embassy-mspm0` project to find the correct feature flag for your chip.
19* [ ] If your board has a special clock or power configuration, make sure that it is set up appropriately. 19* [ ] If your board has a special clock or power configuration, make sure that it is set up appropriately.
20* [ ] If your board has different pin mapping, update any pin numbers or peripherals in the given example code to match your schematic 20* [ ] If your board has different pin mapping, update any pin numbers or peripherals in the given example code to match your schematic
21 21
diff --git a/examples/mspm0l2228/Cargo.toml b/examples/mspm0l2228/Cargo.toml
index 39e0e1a0c..a68b5bfe9 100644
--- a/examples/mspm0l2228/Cargo.toml
+++ b/examples/mspm0l2228/Cargo.toml
@@ -5,7 +5,7 @@ version = "0.1.0"
5license = "MIT OR Apache-2.0" 5license = "MIT OR Apache-2.0"
6 6
7[dependencies] 7[dependencies]
8embassy-mspm0 = { version = "0.1.0", path = "../../embassy-mspm0", features = ["mspm0l222x", "defmt", "rt", "time-driver-any"] } 8embassy-mspm0 = { version = "0.1.0", path = "../../embassy-mspm0", features = ["mspm0l2228pn", "defmt", "rt", "time-driver-any"] }
9embassy-executor = { version = "0.7.0", path = "../../embassy-executor", features = ["arch-cortex-m", "executor-thread", "executor-interrupt"] } 9embassy-executor = { version = "0.7.0", path = "../../embassy-executor", features = ["arch-cortex-m", "executor-thread", "executor-interrupt"] }
10embassy-sync = { version = "0.6.2", path = "../../embassy-sync", features = ["defmt"] } 10embassy-sync = { version = "0.6.2", path = "../../embassy-sync", features = ["defmt"] }
11embassy-time = { version = "0.4.0", path = "../../embassy-time", features = ["defmt"] } 11embassy-time = { version = "0.4.0", path = "../../embassy-time", features = ["defmt"] }
diff --git a/examples/mspm0l2228/README.md b/examples/mspm0l2228/README.md
index c73fa13b6..191022258 100644
--- a/examples/mspm0l2228/README.md
+++ b/examples/mspm0l2228/README.md
@@ -1,4 +1,4 @@
1# Examples for MSPM0L222x family 1# Examples for MSPM0L2228
2 2
3Run individual examples with 3Run individual examples with
4``` 4```
@@ -15,7 +15,7 @@ A large number of the examples are written for the [LP-MSPM0L2228](https://www.t
15You might need to adjust `.cargo/config.toml`, `Cargo.toml` and possibly update pin numbers or peripherals to match the specific MCU or board you are using. 15You might need to adjust `.cargo/config.toml`, `Cargo.toml` and possibly update pin numbers or peripherals to match the specific MCU or board you are using.
16 16
17* [ ] Update .cargo/config.toml with the correct probe-rs command to use your specific MCU. For example for L2228 it should be `probe-rs run --chip MSPM0L2228`. (use `probe-rs chip list` to find your chip) 17* [ ] Update .cargo/config.toml with the correct probe-rs command to use your specific MCU. For example for L2228 it should be `probe-rs run --chip MSPM0L2228`. (use `probe-rs chip list` to find your chip)
18* [ ] Update Cargo.toml to have the correct `embassy-mspm0` feature. For example for L2228 it should be `mspm0l2228`. Look in the `Cargo.toml` file of the `embassy-mspm0` project to find the correct feature flag for your chip. 18* [ ] Update Cargo.toml to have the correct `embassy-mspm0` feature. For example for LP-MSPM0L2228 it should be `mspm0l2228pn`. Look in the `Cargo.toml` file of the `embassy-mspm0` project to find the correct feature flag for your chip.
19* [ ] If your board has a special clock or power configuration, make sure that it is set up appropriately. 19* [ ] If your board has a special clock or power configuration, make sure that it is set up appropriately.
20* [ ] If your board has different pin mapping, update any pin numbers or peripherals in the given example code to match your schematic 20* [ ] If your board has different pin mapping, update any pin numbers or peripherals in the given example code to match your schematic
21 21
diff --git a/tests/mspm0/Cargo.toml b/tests/mspm0/Cargo.toml
index b77747e5d..386536bee 100644
--- a/tests/mspm0/Cargo.toml
+++ b/tests/mspm0/Cargo.toml
@@ -5,7 +5,7 @@ version = "0.1.0"
5license = "MIT OR Apache-2.0" 5license = "MIT OR Apache-2.0"
6 6
7[features] 7[features]
8mspm0g3507 = [ "embassy-mspm0/mspm0g350x" ] 8mspm0g3507 = [ "embassy-mspm0/mspm0g3507pm" ]
9 9
10[dependencies] 10[dependencies]
11teleprobe-meta = "1.1" 11teleprobe-meta = "1.1"