Crate stm32f4xx_hal

source ·
Expand description

Multi device hardware abstraction on top of the peripheral access API for the STMicro STM32F4 series microcontrollers.

Feature flags

Use one of the supported STM32-serie related features: stm32f401, stm32f405, stm32f407, stm32f415, stm32f417, stm32f410, stm32f411, stm32f412, stm32f413, stm32f423, stm32f427, stm32f429, stm32f437, stm32f439, stm32f446, stm32f469, stm32f479.

  • rtic1 — Support monotonic timers and other stuff that can be used by RTICv1 framework

  • rtic2 — Support monotonic timers and other stuff that can be used by RTICv2 framework

    Requires nightly rust compiler

  • defmt — Implementation of defmt::Format for public enums and structures. See defmt

  • can — bxCAN peripheral support. See bxcan

  • i2s — I2S peripheral support. See stm32_i2s_v12x

  • usb_fs — USB OTG-FS peripheral support. See synopsys-usb-otg

  • usb_hs — USB OTG-HS peripheral support. See synopsys-usb-otg

  • fsmc_lcd — LCD support via FMC/FSMC peripheral. See display-interface

  • sdio-host — SDIO peripheral support. See sdio-host



  • Analog to digital converter configuration.
  • Bit banding
  • Controller Area Network (CAN) Interface
  • CRC32 Calculation Unit
  • API for the Digital to Analog converter
  • Direct Memory Access.
  • Debug and trace and stuff
  • LCD interface using the Flexible Memory Controller (FMC) / Flexible Static Memory Controller (FSMC)
  • General Purpose Input / Output
  • I2S (inter-IC Sound) communication using SPI peripherals
  • USB OTG full-speed peripheral
  • Re-export of the svd2rust auto-generated API for the stm32f429 peripherals. Peripheral access API for STM32F429 microcontrollers (generated using svd2rust v0.24.1 ( ))
  • Convenience re-export of multiple traits.
  • Quadrature Encoder Interface
  • Clock configuration.
  • Hardware random number generator.
  • Interface to the real time clock. See STM32F303 reference manual, section 27. For more details, see ST AN4759
  • Sdio host
  • Asynchronous serial communication using USART peripherals
  • Device electronic signature
  • Timers
  • Asynchronous serial communication using UART peripherals
  • Watchdog peripherals


  • Turns the non-blocking expression $e into a blocking operation.



Attribute Macros