6 releases (breaking)

✓ Uses Rust 2018 edition

0.5.0 Apr 27, 2020
0.4.0 Mar 20, 2020
0.3.0 Dec 27, 2019
0.2.1 Oct 22, 2019
0.1.0 May 26, 2019

#10 in Embedded development

Download history 6/week @ 2020-02-07 7/week @ 2020-02-14 17/week @ 2020-02-21 22/week @ 2020-02-28 9/week @ 2020-03-06 4/week @ 2020-03-13 73/week @ 2020-03-20 6/week @ 2020-03-27 10/week @ 2020-04-03 36/week @ 2020-04-10 26/week @ 2020-04-17 46/week @ 2020-04-24 5/week @ 2020-05-01 14/week @ 2020-05-08 21/week @ 2020-05-15 18/week @ 2020-05-22

80 downloads per month
Used in 4 crates

0BSD license

280KB
6K SLoC

Ruby HTML 6K SLoC // 0.2% comments Alex 24 SLoC

Documentation

stm32h7xx-hal

docs.rs Bors enabled Travis Crates.io

stm32h7xx-hal contains a hardware abstraction layer on top of the peripheral access API for the STMicro STM32H7xx family of microcontrollers. The idea behind this crate is to gloss over the slight differences in the various peripherals available on those MCUs so a HAL can be written for all chips in that same family without having to cut and paste crates for every single model.

This crate relies on Adam Greig's fantastic stm32h7 crate to provide appropriate register definitions, and implements a partial set of the embedded-hal traits. Much of the implementation was adapted from other HAL crates in the stm32-rs organisation.

Collaboration on this crate is highly welcome, as are pull requests!

Supported Configurations

  • stm32h743v (Revision V: stm32h743, stm32h742, stm32h750)
  • stm32h753v
  • stm32h743 (Revision Y: stm32h743, stm32h742, stm32h750)
  • stm32h753
  • stm32h747cm7 (stm32h747, stm32h757)

Single core parts (Cortex M7)

In 2019 ST released hardware Revision V of the stm32h742, stm32h743, stm32h750 and stm32h753 (eevblog). This hardware revision makes breaking hardware changes, documented in AN5312. If you have a device purchased since mid-2019, you likely want to use the feature gate ending in a v.

Dual core parts (Cortex M7 + Cortex M4)

On dual core parts, currently only the Cortex M7 core is supported.

Getting Started

The examples folder contains several example programs. To compile them, one must specify the target device as cargo feature:

$ cargo build --features=stm32h743v,rt

To use stm32h7xx-hal as a dependency in a standalone project the target device feature must be specified in the Cargo.toml file:

[dependencies]
cortex-m = "0.6.0"
cortex-m-rt = "0.6.10"
stm32h7xx-hal = {version = "0.5", features = ["stm32h743v","rt"]}

If you are unfamiliar with embedded development using Rust, there are a number of fantastic resources available to help.

Hardware

Below is a short list of publicly available and documented STM32H7 development boards. Note that including them on this list does not mean they have been successfully tested with this crate. Some boards have a Board Support Crate (BSP) offering pin mappings and additional functionality.

Board Manufacturer BSP / Examples?
NUCLEO-H743ZI ST Examples
STM32H743I-EVAL ST
STM32H747I-EVAL ST
STM32H747I-DISCO ST
Portenta H7 Arduino
OpenH743I-C Waveshare

Minimum supported Rust version

The minimum supported Rust version at the moment is 1.40.0. Older versions may compile, especially when some features are not used in your application.

Other STM32H7 crates

This crate only includes implmentations of embedded-hal traits or other core functionality. An incomplete list of additional peripheral support crates is given here:

Changelog

See CHANGELOG.md.

License

0-Clause BSD License, see LICENSE-0BSD.txt for more details.

Dependencies

~89MB
~2.5M SLoC