Skip to content

Clean machine-readable data about the HPMicro RISC-V families. Embedded Rust device crates for HPM microcontrollers

License

Apache-2.0, MIT licenses found

Licenses found

Apache-2.0
LICENSE-APACHE
MIT
LICENSE-MIT
Notifications You must be signed in to change notification settings

andelf/hpm-data

Repository files navigation

hpm-data & hpm-metapac

CI Status Crates.io Docs.rs

The structured MCU DB of HPM MCUs. The home of hpm-metapac.

All PRs and Issues are handled in andelf/hpm-data.

hpm-metapac is generated from this repo. For each commit(or push) of hpm-data, it's pushed to https://github.com/hpmicro-rs/hpm-metapac, with a tag of hpm-data-<commit-hash>.

hpm-metapac

  • The hpm-metapac crate has a metadata feature, when enabled, it will provide the basic metadata of the currrent MCU
  • Patch vectored interrupt mode, add CORE_LOCAL for Non-External Interrupts
  • To best fit for HPM RISC-V's clustered register desigin, the following is added:
    • All clocks, for SYSCTL.CLOCK, under hpm_metapac::clocks::
    • All SYSCTL resources, under hpm_metapac::resources::
    • All GPIOs and it's PADs, for IOC, under hpm_metapac::pins::
    • All IOMUX settings (FUNC_CTL), under hpm_metapac::iomux::
    • All TRGM const definitions, under hpm_metapac::trgmmux::
  • The version on crates.io is not updated frequently, please use the git repo directly

Usage

[dependencies]
hpm-metapac = { version = "0.0.4", git = "https://github.com/hpmicro-rs/hpm-metapac.git", tag = "hpm-data-d8c87c6a676818ff6abd3b7ae54a1a7612cc8534", features = ["hpm5361"] }

# If you want to use the metadata feature in build.rs
[build-dependencies]
hpm-metapac = { version = "0.0.4", git = "https://github.com/hpmicro-rs/hpm-metapac.git", tag = "hpm-data-d8c87c6a676818ff6abd3b7ae54a1a7612cc8534", default-features = false, features = [
    "metadata",
    "hpm5361",
] }

A simple example to configure pin PA25 for PWM1_P1:

use hpm_metapac as pac;
use pac::{iomux, pins};

pac::IOC
    .pad(pins::PA25)
    .func_ctl()
    .modify(|w| w.set_alt_select(iomux::IOC_PA25_FUNC_CTL_PWM1_P_1));

Support Status

  • All peripherals are supported
  • All MCU families are supported
  • Peripherals that have a HAL driver or raw PAC demo in hpm-hal is reviewed and tested

MCU Family

(in order of release date)

  • HPM6700/HPM6400 - high performance

  • HPM6300 - general purpose

  • HPM6200 - high performance, real-time, mixed signal

  • HPM5300 - general purpose, motion control

  • HPM6800 - display, user interface

  • HPM6E00 - EtherCAT

  • HPM6700/HPM6400

  • HPM6300

  • HPM6200

  • HPM5300

  • HPM6800

  • HPM6E00

Data Source

About

Clean machine-readable data about the HPMicro RISC-V families. Embedded Rust device crates for HPM microcontrollers

Topics

Resources

License

Apache-2.0, MIT licenses found

Licenses found

Apache-2.0
LICENSE-APACHE
MIT
LICENSE-MIT

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published