ADIS16475 driver

This driver supports Analog Device’s IMUs on SPI bus.

1. Supported devices

Each supported device is a precision, miniature microelectromechanical system (MEMS) inertial measurement unit (IMU) that includes a triaxial gyroscope and a triaxial accelerometer. Each inertial sensor in the IMU device combines with signal conditioning that optimizes dynamic performance. The factory calibration characterizes each sensor for sensitivity, bias, alignment, linear acceleration (gyroscope bias), and point of percussion (accelerometer location). As a result, each sensor has dynamic compensation formulas that provide accurate sensor measurements over a broad set of conditions.

2. Device attributes

Accelerometer, gyroscope measurements are always provided. Furthermore, the driver offers the capability to retrieve the delta angle and the delta velocity measurements computed by the device.

The delta angle measurements represent a calculation of angular displacement between each sample update, while the delta velocity measurements represent a calculation of linear velocity change between each sample update.

Finally, temperature data are provided which show a coarse measurement of the temperature inside of the IMU device. This data is most useful for monitoring relative changes in the thermal environment.

The signal chain of each inertial sensor (accelerometers and gyroscopes) includes the application of unique correction formulas, which are derived from extensive characterization of bias, sensitivity, alignment, response to linear acceleration (gyroscopes), and point of percussion (accelerometer location) over a temperature range of −40°C to +85°C, for each ADIS device. These correction formulas are not accessible, but users do have the opportunity to adjust the bias for each sensor individually through the calibbias attribute.

Each IIO device, has a device folder under /sys/bus/iio/devices/iio:deviceX, where X is the IIO index of the device. Under these folders reside a set of device files, depending on the characteristics and features of the hardware device in questions. These files are consistently generalized and documented in the IIO ABI documentation.

The following tables show the adis16475 related device files, found in the specific device folder path /sys/bus/iio/devices/iio:deviceX.

3-Axis Accelerometer related device files



Scale for the accelerometer channels.


Calibration offset for the X-axis accelerometer channel.


Raw X-axis accelerometer channel value.


Calibration offset for the Y-axis accelerometer channel.


Raw Y-axis accelerometer channel value.


Calibration offset for the Z-axis accelerometer channel.


Raw Z-axis accelerometer channel value.


Scale for delta velocity channels.


Raw X-axis delta velocity channel value.


Raw Y-axis delta velocity channel value.


Raw Z-axis delta velocity channel value.

3-Axis Gyroscope related device files



Scale for the gyroscope channels.


Calibration offset for the X-axis gyroscope channel.


Raw X-axis gyroscope channel value.


Calibration offset for the Y-axis gyroscope channel.


Raw Y-axis gyroscope channel value.


Calibration offset for the Z-axis gyroscope channel.


Raw Z-axis gyroscope channel value.


Scale for delta angle channels.


Raw X-axis delta angle channel value.


Raw Y-axis delta angle channel value.


Raw Z-axis delta angle channel value.

Temperature sensor related files



Raw temperature channel value.


Scale for the temperature sensor channel.

Miscellaneous device files



Name of the IIO device.


Currently selected sample rate.


Bandwidth for the accelerometer and gyroscope channels.

The following table shows the adis16475 related device debug files, found in the specific device debug folder path /sys/kernel/debug/iio/iio:deviceX.

Debugfs device files



The serial number of the chip in hexadecimal format.


Chip specific product id (e.g. 16475, 16500, 16505, etc.).


The number of flash writes performed on the device.


String containing the firmware revision in the following format ##.##.


String containing the firmware date in the following format mm-dd-yyyy.

Channels processed values

A channel value can be read from its _raw attribute. The value returned is the raw value as reported by the devices. To get the processed value of the channel, apply the following formula:

processed value = (_raw + _offset) * _scale

Where _offset and _scale are device attributes. If no _offset attribute is present, simply assume its value is 0.

The adis16475 driver offers data for 5 types of channels, the table below shows the measurement units for the processed value, which are defined by the IIO framework:

Channel type

Measurement unit

Acceleration on X, Y, and Z axis

Meters per Second squared

Angular velocity on X, Y and Z axis

Radians per second

Delta velocity on X. Y, and Z axis

Meters per Second

Delta angle on X, Y, and Z axis



Millidegrees Celsius

Usage examples

Show device name:

root:/sys/bus/iio/devices/iio:device0> cat name

Show accelerometer channels value:

root:/sys/bus/iio/devices/iio:device0> cat in_accel_x_raw
root:/sys/bus/iio/devices/iio:device0> cat in_accel_y_raw
root:/sys/bus/iio/devices/iio:device0> cat in_accel_z_raw
root:/sys/bus/iio/devices/iio:device0> cat in_accel_scale
  • X-axis acceleration = in_accel_x_raw * in_accel_scale = −0.010209188 m/s^2

  • Y-axis acceleration = in_accel_y_raw * in_accel_scale = −1.115262214 m/s^2

  • Z-axis acceleration = in_accel_z_raw * in_accel_scale = 9.666833453 m/s^2

Show gyroscope channels value:

root:/sys/bus/iio/devices/iio:device0> cat in_anglvel_x_raw
root:/sys/bus/iio/devices/iio:device0> cat in_anglvel_y_raw
root:/sys/bus/iio/devices/iio:device0> cat in_anglvel_z_raw
root:/sys/bus/iio/devices/iio:device0> cat in_anglvel_scale
  • X-axis angular velocity = in_anglvel_x_raw * in_anglvel_scale = −0.019947756 rad/s

  • Y-axis angular velocity = in_anglvel_y_raw * in_anglvel_scale = 0.00802188 rad/s

  • Z-axis angular velocity = in_anglvel_z_raw * in_anglvel_scale = −0.003617898 rad/s

Set calibration offset for accelerometer channels:

root:/sys/bus/iio/devices/iio:device0> cat in_accel_x_calibbias

root:/sys/bus/iio/devices/iio:device0> echo 5000 > in_accel_x_calibbias
root:/sys/bus/iio/devices/iio:device0> cat in_accel_x_calibbias

Set calibration offset for gyroscope channels:

root:/sys/bus/iio/devices/iio:device0> cat in_anglvel_y_calibbias

root:/sys/bus/iio/devices/iio:device0> echo -5000 > in_anglvel_y_calibbias
root:/sys/bus/iio/devices/iio:device0> cat in_anglvel_y_calibbias

Set sampling frequency:

root:/sys/bus/iio/devices/iio:device0> cat sampling_frequency

root:/sys/bus/iio/devices/iio:device0> echo 1000 > sampling_frequency

Set bandwidth for accelerometer and gyroscope:

root:/sys/bus/iio/devices/iio:device0> cat filter_low_pass_3db_frequency

root:/sys/bus/iio/devices/iio:device0> echo 360 > filter_low_pass_3db_frequency
root:/sys/bus/iio/devices/iio:device0> cat filter_low_pass_3db_frequency

Show serial number:

root:/sys/kernel/debug/iio/iio:device0> cat serial_number

Show product id:

root:/sys/kernel/debug/iio/iio:device0> cat product_id

Show flash count:

root:/sys/kernel/debug/iio/iio:device0> cat flash_count

Show firmware revision:

root:/sys/kernel/debug/iio/iio:device0> cat firmware_revision

Show firmware date:

root:/sys/kernel/debug/iio/iio:device0> cat firmware_date

3. Device buffers

This driver supports IIO buffers.

All devices support retrieving the raw acceleration, gyroscope and temperature measurements using buffers.

The following device families also support retrieving the delta velocity, delta angle and temperature measurements using buffers:

  • ADIS16477

  • ADIS16500

  • ADIS16505

  • ADIS16507

However, when retrieving acceleration or gyroscope data using buffers, delta readings will not be available and vice versa.

Usage examples

Set device trigger in current_trigger, if not already set:

root:/sys/bus/iio/devices/iio:device0> cat trigger/current_trigger

root:/sys/bus/iio/devices/iio:device0> echo adis16505-2-dev0 > trigger/current_trigger
root:/sys/bus/iio/devices/iio:device0> cat trigger/current_trigger

Select channels for buffer read:

root:/sys/bus/iio/devices/iio:device0> echo 1 > scan_elements/in_deltavelocity_x_en
root:/sys/bus/iio/devices/iio:device0> echo 1 > scan_elements/in_deltavelocity_y_en
root:/sys/bus/iio/devices/iio:device0> echo 1 > scan_elements/in_deltavelocity_z_en
root:/sys/bus/iio/devices/iio:device0> echo 1 > scan_elements/in_temp0_en

Set the number of samples to be stored in the buffer:

root:/sys/bus/iio/devices/iio:device0> echo 10 > buffer/length

Enable buffer readings:

root:/sys/bus/iio/devices/iio:device0> echo 1 > buffer/enable

Obtain buffered data:

root:/sys/bus/iio/devices/iio:device0> hexdump -C /dev/iio\:device0
00001680  01 1f 00 00 ff ff fe ef  00 00 47 bf 00 03 35 55  |..........G...5U|
00001690  01 1f 00 00 ff ff ff d9  00 00 46 f1 00 03 35 35  |..........F...55|
000016a0  01 1f 00 00 ff ff fe fc  00 00 46 cb 00 03 35 7b  |..........F...5{|
000016b0  01 1f 00 00 ff ff fe 41  00 00 47 0d 00 03 35 8b  |.......A..G...5.|
000016c0  01 1f 00 00 ff ff fe 37  00 00 46 b4 00 03 35 90  |.......7..F...5.|
000016d0  01 1d 00 00 ff ff fe 5a  00 00 45 d7 00 03 36 08  |.......Z..E...6.|
000016e0  01 1b 00 00 ff ff fe fb  00 00 45 e7 00 03 36 60  |..........E...6`|
000016f0  01 1a 00 00 ff ff ff 17  00 00 46 bc 00 03 36 de  |..........F...6.|
00001700  01 1a 00 00 ff ff fe 59  00 00 46 d7 00 03 37 b8  |.......Y..F...7.|
00001710  01 1a 00 00 ff ff fe ae  00 00 46 95 00 03 37 ba  |..........F...7.|
00001720  01 1a 00 00 ff ff fe c5  00 00 46 63 00 03 37 9f  |..........Fc..7.|
00001730  01 1a 00 00 ff ff fe 55  00 00 46 89 00 03 37 c1  |.......U..F...7.|
00001740  01 1a 00 00 ff ff fe 31  00 00 46 aa 00 03 37 f7  |.......1..F...7.|

See Documentation/iio/iio_devbuf.rst for more information about how buffered data is structured.

4. IIO Interfacing Tools

Linux Kernel Tools

Linux Kernel provides some userspace tools that can be used to retrieve data from IIO sysfs:

  • lsiio: example application that provides a list of IIO devices and triggers

  • iio_event_monitor: example application that reads events from an IIO device and prints them

  • iio_generic_buffer: example application that reads data from buffer

  • iio_utils: set of APIs, typically used to access sysfs files.


LibIIO is a C/C++ library that provides generic access to IIO devices. The library abstracts the low-level details of the hardware, and provides a simple yet complete programming interface that can be used for advanced projects.

For more information about LibIIO, please see: