| Crates.io | py32f0xx-hal |
| lib.rs | py32f0xx-hal |
| version | 0.4.1 |
| created_at | 2023-06-10 18:14:34.714184+00 |
| updated_at | 2025-12-01 19:53:25.051572+00 |
| description | Peripheral access API for py32F0 series microcontrollers |
| homepage | |
| repository | https://github.com/py32-rust/py32f0xx-hal |
| max_upload_size | |
| id | 887014 |
| size | 459,232 |
[HAL] for the py32f0xx family of microcontrollers
py32f0xx-hal contains a hardware abstraction on top of the peripheral access API for the puyasemi PY32F0xx family of microcontrollers.
Collaboration on this crate is highly welcome, as are pull requests!
| Family | F002A | F002A | F030/F003 |
|---|---|---|---|
| RCC | ✅ | ✅ | ✅ |
| GPIO | ✅ | ✅ | ✅ |
| INTERRUPT | ✅ | ✅ | ✅ |
| DMA | N/A | N/A | ✅ |
| EXTI | ✅ | ✅ | ✅ |
| USART | ✅ | ✅ | ✅ |
| I2C | ❓ | ❓ | ❓1 |
| SPI | ✅ | ✅ | ✅ |
| ADC | ✅ | ✅ | ✅ |
| RTC | ✅ | ✅ | ✅ |
| FLASH | |||
| COMP | |||
| Timer(PWM) | ✅ | ✅ | ✅ |
| Watchdog | ❓ | ❓ | ❓ |
| LED | N/A | N/A |
+ : Async supportLSE/LSI test and examples
Other chips
The examples folder contains several example programs. To compile them, one must specify the target device as cargo feature:
$ cargo build --features=py32f030 --example=blinky
To use py32f0xx-hal as a dependency in a standalone project the target device feature must be specified in the Cargo.toml file:
[dependencies]
embedded-hal = "1"
nb = "1"
cortex-m = "0.7.7"
cortex-m-rt = "0.7.3"
# Panic behaviour, see https://crates.io/keywords/panic-impl for alternatives
panic-halt = "0.2.0"
py32f0xx-hal = { version = "0.4.1", features = ["py32f030"] }
monotonic timer module for use with that cratederive(defmt::Format) to Error types in this cratert feature in the py32f0 crateIf you are unfamiliar with embedded development using Rust, there are a number of fantastic resources available to help.
The minimum supported Rust version is the latest stable release. Older versions may compile, especially when some features are not used in your application.
See CHANGELOG.md.
This repo was inspired by stm32f0xx-hal and stm32f1xx-hal
Licensed under either of
at your option.
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.