ra4m1-fsp-pac

Crates.iora4m1-fsp-pac
lib.rsra4m1-fsp-pac
version0.1.10
created_at2025-07-19 10:43:49.386946+00
updated_at2025-07-23 15:05:28.659938+00
descriptionPeripheral access API for RA4M1 microcontrollers (generated using svd2rust)
homepage
repositoryhttps://github.com/ra-rs/ra
max_upload_size
id1760108
size5,685,443
Oleksandr Babak (Ddystopia)

documentation

README

RA4M1 Peripheral Access Crate

A Peripheral Access API (PAC) for RA4M1 microcontrollers, generated using svd2rust.

This crate provides low‑level register and bitfield definitions for all on‑chip peripherals.
It is designed to preserve the familiar cortex-m-rt interface while handling RA4M1‑specific initialization requirements.


Features

  • rt: Includes IV in ".application_vectors" section. Does not enable any runtime. Either use ra-fsp-sys or cortex-m-rt/device.
  • fsp: places IV in ".application_vectors" section. You still need to add ra-fsp-sys/ra4m1 or ra-fsp-rs/ra4m1 crate to your dependencies.
  • cortex-m-rt-device: places IV in ".vector_table.interrupts" section and enables cortex-m-rt/device feature.

Installation

Add this crate to your Cargo.toml:

[dependencies]
ra4m1_pac = "0.*"

To enable the FSP‑based runtime:

# If you want to use `ra-fsp-rs`
[dependencies]
ra-fsp-rs = { version = "0.*", features = ["ra4m1"] }

# If you want to use bare bindings
[dependencies]
ra4m1_pac = { version = "0.*", features = ["rt", "fsp"] }
ra-fsp-sys = { version = "0.*", features = ["ra4m1"] }

Usage

This PAC has equivalent interface to any cortex-m-rt/device-compatible PAC, thus the code is looking exactly the same. You can use an OS like RTIC or just:

#![no_std]
#![no_main]

use cortex_m_rt::entry;
use ra4m1_pac::Peripherals;

#[entry]
fn main() -> ! {
    let p = Peripherals::take().unwrap();
    // Configure and use peripherals...
    loop {}
}

Note: FSP manages interrupt vectors, invokes SystemInit, and
then calls main. cortex-m-rt::entry can still be used, but cortex-m-rt/device
feature cannot be enabled, as FSP is responsible for the vector table and Reset.

Contributing

Contributions are welcome! Please open an issue or pull request in this repository. Follow these guidelines:

  1. Synchronize register definitions from the latest SVD.
  2. Keep changes minimal—only update what’s necessary.
  3. Always test on real hardware.

License

Licensed under either of

at your option.

Commit count: 12

cargo fmt