Files
PX4-Autopilot/boards/px4
zebulon-86 d439ae9e28 feat(boards/px4_fmu-v6c): add support for LSM6DSV16X (#26951)
* feat(drivers): add ST LSM6DSV16X IMU driver

Add a new SPI driver for the ST LSM6DSV16X 6-axis IMU with FIFO-based
accel, gyro, and temperature acquisition.

The driver supports continuous FIFO mode with tagged sample parsing,
DRDY interrupt triggering via FIFO threshold, and dynamic watermark
configuration based on the selected sample rate. It also falls back to
scheduled polling when a GPIO interrupt is not available.

To improve robustness, the driver periodically validates critical
register settings and limits FIFO draining per cycle.

Tested on Pixhawk6C with ground testing and flight validation.

* feat(boards/px4_fmu-v6c): add LSM6DSV16X support for Pixhawk6C

Enable the ST LSM6DSV16X as an alternative probe-based IMU on
Pixhawk6C.

The sensor is configured on SPI1 with chip-select PC13 and shares the
same CS and DRDY lines as the ICM42688P across all supported hardware
revisions. Board startup first probes the ICM42688P and then the
LSM6DSV16X, so only the IMU populated on a given board is started.

This change enables the LSM6DSV16X driver in the board configuration,
registers the device type in `spi.cpp`, and adds board sensor probing
for the new IMU.

Use rotation `-R 26` (`ROTATION_PITCH_180_YAW_90`) to match the sensor
orientation on the Pixhawk6C PCB.

* fix(drivers/lsm6dsv): address review comments

- add missing #include <cstddef> for size_t
- check FIFO status transfer() return value
- fix FIFO word count to sample period conversion (DIFF_FIFO reports
  words, not sample periods; each sample period is 2 words)
- fix drv_sensor.h macro alignment (spaces to tab)

* drv_sensor: move LSM6DSV devtype into IMU range

* fmu-v6c: use quiet LSM6DSV fallback probe
2026-04-15 20:04:00 -07:00
..