`stm32g4` logo

`stm32g4`

Free

[![crates.io](https://img.shields.io/crates/v/stm32g4.svg)](https://crates.io/crates/stm32g4)

FreeFree tier
Type
Open Source

About `stm32g4`

The stm32g4 crate provides a Peripheral Access Crate (PAC) for the STM32G4 series of microcontrollers from STMicroelectronics. It is generated from official SVD files using svd2rust, offering safe, low-level access to hardware registers. This crate is commonly used in embedded Rust development for the STM32G4 family and is part of the rust-embedded ecosystem.

Key Features

Peripheral register access via generated API
Support for multiple STM32G4 variants
Safe Rust abstractions
Part of the rust-embedded ecosystem

Pros & Cons

Pros
  • Well-integrated with Rust embedded ecosystem
  • Generated from official SVD files for accuracy
  • Open source and community maintained
  • Supports many STM32G4 sub-families
Cons
  • Requires familiarity with embedded Rust
  • Not a high-level HAL; direct register access
  • Limited documentation outside of code comments

Best For

Embedded development with STM32G4 MCUsWriting bare-metal firmwareReal-time control applicationsMotor control and digital power conversion