#api-access #embedded-devices

no-std stm32f4-staging

Device support crates for STM32F4 devices

2 unstable releases

0.17.0 Nov 7, 2024
0.16.1 Aug 3, 2024
0.16.0 May 26, 2024

#456 in Embedded development

Download history 71/week @ 2024-08-17 68/week @ 2024-08-24 138/week @ 2024-08-31 69/week @ 2024-09-07 90/week @ 2024-09-14 15/week @ 2024-09-21 124/week @ 2024-09-28 80/week @ 2024-10-05 75/week @ 2024-10-12 147/week @ 2024-10-19 233/week @ 2024-10-26 421/week @ 2024-11-02 138/week @ 2024-11-09 81/week @ 2024-11-16 80/week @ 2024-11-23 184/week @ 2024-11-30

537 downloads per month
Used in 2 crates (via stm32f4xx-hal)

MIT/Apache

44MB
1M SLoC

stm32f4-staging

This crate provides an autogenerated API for access to STM32F4 peripherals. The API is generated using svd2rust with patched svd files containing extensive type-safe support. For more information please see the main repo.

Refer to the documentation for full details.

Usage

Each device supported by this crate is behind a feature gate so that you only compile the device(s) you want. To use, in your Cargo.toml:

[dependencies.stm32f4-staging]
version = "0.17.0"
features = ["stm32f401"]

The rt feature is enabled by default and brings in support for cortex-m-rt. To disable, specify default-features = false in Cargo.toml.

In your code:

use stm32f4-staging::stm32f401;

let mut peripherals = stm32f401::Peripherals::take().unwrap();
let gpioa = &peripherals.GPIOA;
gpioa.odr.modify(|_, w| w.odr0().set_bit());

For full details on the autogenerated API, please see: https://docs.rs/svd2rust/0.34.0/svd2rust/#peripheral-api

Supported Devices

Module Devices Links
stm32f401 STM32F401 RM0368, st.com
stm32f405 STM32F405, STM32F415 RM0090, st.com
stm32f407 STM32F407, STM32F417 RM0090, st.com
stm32f410 STM32F410 RM0401, st.com
stm32f411 STM32F411 RM0383, st.com
stm32f412 STM32F412 RM0402, st.com
stm32f413 STM32F413, STM32F423 RM0430, st.com
stm32f427 STM32F427, STM32F437 RM0090, st.com
stm32f429 STM32F429, STM32F439 RM0090, st.com
stm32f446 STM32F446 RM0390, st.com
stm32f469 STM32F469, STM32F479 RM0386, st.com

Dependencies