Skip to content
viiaviPublic

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

Ignis RT Sensor Fabric

Ignis is a heterogeneous embedded sensing platform built around an STM32F401RE sensor coprocessor and a Raspberry Pi 4 Linux host. The STM32 owns the physical sensors, performs deterministic 100 Hz acquisition under FreeRTOS, timestamps and buffers samples, and exports bounded batches through a CRC-protected SPI protocol. Linux integrates the hub through a custom IIO driver rather than a board-specific userspace-only interface.

ISM330DHCX + MMC5983MA
        |
        | I2C, 400 kHz
        v
STM32F401RE + FreeRTOS
        |
        | SPI2 slave DMA + response-ready GPIO
        v
Raspberry Pi 4 SPI master
        |
        v
ignis_hub Linux IIO driver
        |
        v
/dev/iio:deviceX -> native RT consumer

Current Status

Hardware-validated:

  • physical ISM330DHCX detection and 100 Hz accelerometer/gyroscope acquisition;
  • physical MMC5983MA detection, with final nine-axis streaming verification still required after flashing the latest firmware;
  • STM32 SPI2 slave full-duplex DMA using fixed 472-byte slots;
  • PC7 to Raspberry Pi GPIO25 response-ready handshake;
  • protocol 2.1 INFO, HEALTH, and READ_SAMPLES transactions; and
  • Raspberry Pi Python smoke client receiving timestamped sensor batches.

Implemented and awaiting Raspberry Pi kernel validation:

  • custom ignis_hub SPI/IIO kernel module;
  • acceleration, angular velocity, magnetic field, temperature, and timestamp scan channels;
  • kfifo-backed IIO buffered capture;
  • CRC, protocol, sequence-gap, SPI-error, timeout, and sample counters;
  • Raspberry Pi 4 Device Tree overlay; and
  • automated module and overlay installation scripts.

Deferred beyond the one-day MVP:

  • PREEMPT_RT Yocto image integration;
  • formal STM32/Linux clock synchronization;
  • GPIO-controlled hub reset and complete reset recovery;
  • ROS 2 publishing; and
  • loaded latency and endurance campaigns.

Hardware

  • NUCLEO-F401RE
  • SmartElex 9DoF breakout with ISM330DHCX and MMC5983MA
  • Raspberry Pi 4 Model B running Raspberry Pi OS
  • 16 GB or larger microSD card
  • 3.3 V jumper wiring with a shared ground

SPI wiring is documented in protocol/spec.md. GPIO25 on the Pi must connect to STM32 PC7/D9.

Repository Layout

mcu/firmware/           STM32CubeIDE application and sensor drivers
firmware/sensor-hub/    portable sensor-hub components
protocol/               wire contract and portable codec
kernel/                 Linux SPI/IIO driver
device-tree/            binding and Raspberry Pi 4 overlay
userspace/tools/        Python transport diagnostic
userspace/rt-consumer/  native real-time IIO consumer foundation
scripts/                Raspberry Pi install and verification helpers
tests/                  native firmware and protocol tests
meta-ignis/, kas/       future Yocto integration
benchmarks/             future raw performance evidence

Portable Tests

python -m pytest -q

The current suite contains nine protocol, sensor-source, ring-buffer, SPI client, and STM32 configuration tests.

Raspberry Pi IIO Bring-up

Copy the repository to the Pi, then install prerequisites:

sudo apt update
sudo apt install -y build-essential raspberrypi-kernel-headers \
    device-tree-compiler libiio-utils

Reboot once after any kernel package update so the running kernel matches the installed headers. Then run:

cd ~/ignis
sudo sh scripts/install_pi_mvp.sh
sudo reboot

After reboot:

dmesg | grep -i ignis
sh ~/ignis/scripts/verify_iio.sh
iio_info
sudo iio_readdev -b 256 ignis_hub

A successful probe prints the STM32 model, sample rate, batch capacity, and protocol version in dmesg. The IIO device exposes all nine motion/magnetic channels, temperature, a Linux-correlated timestamp, and transport counters.

MVP Acceptance

The one-day Embedded Linux MVP is complete only when:

  1. the overlay disables spidev0 and binds ignis_hub automatically;
  2. dmesg reports a successful protocol handshake;
  3. /sys/bus/iio/devices/iio:deviceX/name contains ignis_hub;
  4. iio_info lists all expected scan channels and scales;
  5. iio_readdev receives continuous binary buffered samples;
  6. counters remain stable during a 30-minute baseline run; and
  7. module unload/reload and one STM32 reset are documented.

The full research-grade acceptance contract remains in docs/PRD_RT_LINUX_PIPELINE.md.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages