SPI Output & ArduPilot Integration¶
For IMU600-V2 / firmware 0.11.2 / GUI v1.6.1.
This integration follows manual v1.1: SparkNavi’s Copter 4.7.1 build for SparkNavi-Blue2-IMU600. The manual states the driver is not merged upstream. Standard Blue / Blue2 firmware or an arbitrary SPI port will not automatically support it. Obtain matching firmware and wiring from SparkNavi.
SPI Wiring & Reads¶
| Item | Setting |
|---|---|
| Pins | 6 CS / 8 SCK / 10 MOSI / 12 MISO + GND |
| Electrical | 3.3 V; module is slave; active-low CS with pull-up; host sends 0 on MOSI |
| Clock | Mode 3 (SPICK,3) / Mode 0 (SPICK,0); MSB first; 2 MHz |
| Read Length | 128 bytes per CS assertion; a short read retries the same packet next time; bytes beyond 128 are zero |
| Polling | No DRDY; poll at about 0.9 output periods, drain again when pending >0 |
| Queue | 16 packets (16 ms at 1000 Hz); drops oldest when full |
128-Byte Packet¶
SPI,ardupilot uses little-endian packets. Validate magic, version, type and CRC, then use seq to reject duplicates and detect gaps. Type 0 is empty, not a new IMU sample.
| Offset | Type | Content |
|---|---|---|
| 0 | u8 ×2 | 0x53 0x4E (SN) |
| 2 | u8 | Version 1 |
| 3 | u8 | 0 empty / 1 IMU / 2 stream |
| 4 | u16 | seq: +1 per output window |
| 6 | u8 | pending: packets remaining after this one |
| 7 | u8 | used_mask |
| 8 | u64 | ts_us |
| 16 | f32 | dt (s) |
| 20 | f32 ×6 | Fused Δθ[3] rad, Δv[3] m/s, FRD |
| 44 / 68 / 92 | f32 ×6 each | IMU 1 / 2 / 3 individual Δθ, Δv; missing data = 0 and corresponding status = 0xFF |
| 116 | i16 ×3 | Three temperatures, 0.01 °C |
| 122 | u8 ×3 | Three status bytes; bit7 = PPS |
| 125 | u8 | Fusion flags |
| 126 | u16 | CRC-16/CCITT-FALSE, bytes 0–125 |
Stream (type 2): byte 7 instead gives valid length 0–118. Concatenate valid data starting at byte 8, then parse ASCII / D6 44 according to SPIOUT / SPIMODE. Do not decode type 2 using the type 1 IMU fields above.
Blue2 Integration Steps¶
- With power off, wire the assigned SPI interface and ground. Configure the IMU over UART1: SPI ArduPilot, clock mode 3, RATE 1000 Hz; apply and SAVE.
- For controller operation, use OUT,none, AHRS,0 and U2OUT,none to reduce UART load, retaining STAT diagnostics. Temporarily enable data with suitable bandwidth when needed.
- Install matching SparkNavi-Blue2-IMU600 firmware (manual validation: Copter 4.7.1, SPI 2 MHz / Mode 3, dedicated CS). IMU600 is the third flight-controller IMU backend in this configuration.
- Check EK3_IMU_MASK = 7 so all three IMU backends are available to EKF3. To prefer IMU600, optionally set EK3_PRIMARY = 2 and ensure INS_USE3 = 1; indexing starts at zero.
- Run Mission Planner six-position calibration for all three IMUs. The manual calls for a consistent module-side or controller-side calibration workflow; use Mission Planner for this integration and avoid arbitrary duplicate correction. If module calibration changes later, redo controller calibration.
- Reboot and check for IMU600 found, 1000 Hz plus INS_ACC3_ID / INS_GYR3_ID. At rest, level Accel3 Z should be about −1000 mG and X / Y near zero. Verify motion directions agree with internal IMUs, then complete EKF and PreArm checks.
$SPNVCMD,SPI,ardupilot
$SPNVCMD,SPICK,3
$SPNVCMD,RATE,1000
$SPNVCMD,OUT,none
$SPNVCMD,AHRS,0
$SPNVCMD,U2OUT,none
$SPNVCMD,SAVE,1
$SPNVCMD,CFG,1
Rate & Runtime Checks¶
- The 400 Hz loop’s pre-arm check requires a gyro backend of at least 1.8 × 400 = 720 Hz, so use RATE = 1000. Rates of 200 / 400 / 500 Hz fail this condition.
- Retain EKF3 automatic lane switching; do not disable fallback to force IMU600 permanently. A degraded primary lane can still switch to a healthier lane in flight.
- SPNVSPI txn and delivered should keep increasing; drop should stop increasing once the host reads regularly. Bursts of errors may report IMU600: SPI link errors; inspect wiring, ground, mode and power.
- If powered by controller 5 V, controller reboot can briefly interrupt power. From fw 0.10.1, startup waits for stable power and persistent SPI errors can trigger automatic reinitialization (SPNVHEAL); still investigate voltage drops.
SPNVSPI Status Fields¶
$SPNVSPI,mode=ardupilot,out=none,fmt=binary,ck=3,txn=...,ok=...,short=...,delivered=...,drop=...,dma=1,dmaerr=0,...*XX
| Field | Definition / Interpretation |
|---|---|
| mode / out / fmt / ck | SPI / SPIOUT / SPIMODE / SPICK |
| txn | CS transaction count; manual validation about 1190/s at RATE=1000 |
| ok | Complete 128-byte reads, usually near txn; may include empty packets |
| short | Short reads below 128 bytes; same packet remains. Persistent increases warrant CS / SCK checks |
| delivered | Delivered data packets; per-second increase should approach RATE |
| drop | Oldest-packet drops from full 16-packet queue; separate pre-host accumulation from runtime growth |
| dmaerr | 0 / 1 indicating a DMA error occurred; normally 0 |
| dma / lf / lt / ls / ks / kr / sp | Vendor diagnostics; ordinary parsers may ignore them and allow new fields |
Host Polling & Sequence Numbers¶
- At RATE=1000, poll about every 0.9 ms. Drain pending packets immediately, up to five per burst. The module prepares the next packet after CS rises.
- Check SN, version 1 and CRC; skip type 0. Compare u16 seq with wraparound: gap=0 is duplicate, gap>1 possible loss. Stream seq counts segments; empty packets retain the last completed seq.
- Discard corrupt reads and read again. Short reads do not consume a packet; from fw 0.10.8, suspect incomplete transactions may repeat seq. The manual validates 2 MHz, not 8 MHz.
ArduPilot Driver & hwdef¶
The documented ArduPilot-4.7.1-SparkNavi-IMU600.zip contains AP_InertialSensor_SparkNavi, patches, the custom board, test .apj and bootloader; obtain it from SparkNavi. This hwdef applies to that custom Blue2 configuration and requires the matching EXTERNAL_CS board-pin definition.
SPIDEV imu600 SPI6 DEVID1 EXTERNAL_CS MODE3 2*MHZ 2*MHZ
IMU SparkNavi SPI:imu600 ROTATION_NONE
| Driver Behavior | Details |
|---|---|
| Startup Probe | Probes at least 500 ms, waiting up to 5 s after controller boot; estimates rate from median dt over 50 packets and rechecks every 2 s |
| Success / Failure | Success: IMU600 found, 1000 Hz; failure: probe rd / hdr / crc diagnostics. Missing module is skipped while the two internal IMUs remain |
| INS Data Delivery | Sends fused Δθ / Δv through _notify_new_delta_angle / _velocity using packet dt. used_mask=0 or NaN is rejected and counted; SATURATED increments accel clip |
| Temperature & Units | Average sensor temperature publishes about 10 Hz. Mission Planner uses mG and mrad/s; separate SCALED_IMU2 / 3 messages may show different timestamps |
SNV6 Logs & Error Thresholds¶
Sequence gaps >1 accumulate Lost; CRC failures accumulate Bad. Isolated errors are not shown directly in the GCS. Errors in the last 10 s produce SNV6 records: TimeUS, Lost, Bad, Pkts. Lost ≥20 or Bad ≥100 within 10 s triggers IMU600: SPI link errors (...). LOG_DISARMED=1 enables bench logging while disarmed.
Documented Hardware Validation¶
| Condition / Item | Documented Result |
|---|---|
| Date / Version | 2026-10-15 · Blue2 + ArduPilot 4.7.1 · IMU fw 0.10.8 |
| SPI | SPI6 + external CS · 2 MHz · Mode 3 |
| RATE / delivered / txn | 1000 Hz / ≈1000 packets/s / ≈1190 transactions/s |
| 7.6 min | short=4 · dmaerr=0 · no runtime drop increase |
| IMU / EKF | Accel Z ≈−1000 mG · ROTATION_NONE · EK3_IMU_MASK=7 |
These are PDF validation records, not guarantees for every wiring setup. The custom Blue2 bootloader hwdef sets PE2 / PE3 OUTPUT HIGH for the corresponding power controls. After the matched .apj is installed, Mission Planner Flash bootloader is also required to write the new bootloader. This is a board-specific vendor procedure; verify the board and release package.
Communication details also follow Protocol v1.1, pages 29–33. See the protocol overview.
EKF Lane Selection¶
The manual notes generic EK3_IMU_MASK=3 includes only the first two backends; this custom board defaults to 7. EK3_PRIMARY=2 selects the third backend with EK3_IMU_MASK=7 and INS_USE3=1. The chosen lane is used while disarmed; flight-time automatic changes still report EKF3 lane switch n.
Source document:IMU600-V2 User Manual v1.1 · PDF pages 32–35