This is an implementation of the
embedded-hal traits for the STM32F1 family of
A detailed usage guide can be found in the README
supported microcontrollers are:
This crate supports multiple microcontrollers in the
stm32f1 family. Which specific microcontroller you want to build for has to be
specified with a feature, for example
If no microcontroller is specified, the crate will not compile.
The currently supported variants are
You may also need to specify the density of the device with
to enable certain peripherals. Generally the density can be determined by the 2nd character
after the number in the device name (i.e. For STM32F103C6U, the 6 indicates a low-density
device) but check the datasheet or CubeMX to be sure.
- 4, 6 => low density, no feature required
- 8, B =>
- C, D, E =>
- F, G =>
See the examples folder.
Most of the examples require the following additional dependencies
[dependencies] embedded-hal = "0.2.3" nb = "0.1.2" cortex-m = "0.6.2" cortex-m-rt = "0.6.11" # Panic behaviour, see https://crates.io/keywords/panic-impl for alternatives panic-halt = "0.2.0"
API for the Analog to Digital converter
Alternate Function I/Os
Registers that are not reset as long as Vbat or Vdd has power.
Direct Memory Access
General Purpose I/Os
Inter-Integrated Circuit (I2C) bus
Pulse width modulation
This module allows Timer peripherals to be configured as pwm input. In this mode, the timer sample a squared signal to find it's frequency and duty cycle.
Reset & Control Clock
Real time clock
Serial Communication (USART)
Serial Peripheral Interface