no-std stm32f4

Device support crates for STM32F4 devices

22 releases (14 breaking)

0.15.1 Jul 4, 2022
0.14.0 Oct 3, 2021
0.13.0 Feb 15, 2021
0.12.1 Sep 22, 2020
0.2.2 Jul 11, 2018

#171 in Embedded development

Download history 6784/week @ 2023-12-13 5539/week @ 2023-12-20 6089/week @ 2023-12-27 7193/week @ 2024-01-03 5882/week @ 2024-01-10 6104/week @ 2024-01-17 6409/week @ 2024-01-24 5621/week @ 2024-01-31 5844/week @ 2024-02-07 5373/week @ 2024-02-14 5799/week @ 2024-02-21 5734/week @ 2024-02-28 6102/week @ 2024-03-06 5432/week @ 2024-03-13 4668/week @ 2024-03-20 3270/week @ 2024-03-27

20,386 downloads per month
Used in 48 crates (15 directly)

MIT/Apache

49MB
1.5M SLoC

stm32f4

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]
version = "0.15.1"
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::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.24.1/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