Crates.io | stm32wlxx-hal |
lib.rs | stm32wlxx-hal |
version | 0.6.1 |
source | src |
created_at | 2021-03-26 15:28:00.606241 |
updated_at | 2022-08-01 21:04:05.230868 |
description | Hardware abstraction layer for the STM32WL series microcontrollers. |
homepage | |
repository | https://github.com/stm32-rs/stm32wlxx-hal |
max_upload_size | |
id | 373848 |
size | 739,125 |
Embedded rust HAL (hardware abstraction layer) for the STM32WL series.
This is still in development, the code that exists today covers basic usage of:
[dependencies.stm32wlxx-hal]
version = "0.6.1"
features = [
# use exactly one to match your target hardware
"stm32wl5x_cm0p",
"stm32wl5x_cm4",
"stm32wle5",
# optional: use the cortex-m-rt interrupt interface
"rt",
# optional: use defmt
"defmt",
# optional: enable conversions with embedded-time types
"embedded-time",
# optional: use the real time clock (RTC)
"chrono",
]
All examples run on the NUCLEO-WL55JC2. Examples are located in the examples
crate. The arguments got long for this, so a run-ex
cargo alias is provided.
DEFMT_LOG=trace cargo run-ex gpio-blink
The on-target tests are also excellent reference material.
The testsuites and examples are a good starting point, but they demonstrate features independent of each-other. A system-level example using multiple features simultaneously is provided in a separate repo: stm32wl-lightswitch-demo
Off-target unit tests use the built-in cargo framework. You must specify the target device as a feature.
cargo test --features stm32wl5x_cm4
See testsuite/README.md.