<!DOCTYPE html>
<html lang="en" data-content_root="../">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" /><meta name="viewport" content="width=device-width, initial-scale=1" />
<title>ADIS16480 driver — The Linux Kernel documentation</title>
<link rel="stylesheet" type="text/css" href="../_static/pygments.css?v=fa44fd50" />
<link rel="stylesheet" type="text/css" href="../_static/alabaster.css?v=3918102e" />
<script src="../_static/documentation_options.js?v=5929fcd5"></script>
<script src="../_static/doctools.js?v=9bcbadda"></script>
<script src="../_static/sphinx_highlight.js?v=dc90522c"></script>
<link rel="index" title="Index" href="../genindex.html" />
<link rel="search" title="Search" href="../search.html" />
<link rel="next" title="ADIS16550 driver" href="adis16550.html" />
<link rel="prev" title="ADIS16475 driver" href="adis16475.html" />
<link rel="stylesheet" href="../_static/custom.css" type="text/css" />
</head><body>
<div class="document">
<div class="sphinxsidebar" role="navigation" aria-label="Main">
<div class="sphinxsidebarwrapper">
<p class="logo"><a href="../index.html">
<img class="logo" src="../_static/logo.svg" alt="Logo of The Linux Kernel"/>
</a></p>
<h1 class="logo"><a href="../index.html">The Linux Kernel</a></h1>
<p class="blurb">6.18.50</p>
<search id="searchbox" style="display: none" role="search">
<h3 id="searchlabel">Quick search</h3>
<div class="searchformwrapper">
<form class="search" action="../search.html" method="get">
<input type="text" name="q" aria-labelledby="searchlabel" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/>
<input type="submit" value="Go" />
</form>
</div>
</search>
<script>document.getElementById('searchbox').style.display = "block"</script>
<p>
<h3 class="kernel-toc-contents">Contents</h3>
<input type="checkbox" class="kernel-toc-toggle" id = "kernel-toc-toggle" checked>
<label class="kernel-toc-title" for="kernel-toc-toggle"></label>
<div class="kerneltoc" id="kerneltoc">
<ul>
<li class="toctree-l1"><a class="reference internal" href="../process/development-process.html">Development process</a></li>
<li class="toctree-l1"><a class="reference internal" href="../process/submitting-patches.html">Submitting patches</a></li>
<li class="toctree-l1"><a class="reference internal" href="../process/code-of-conduct.html">Code of conduct</a></li>
<li class="toctree-l1"><a class="reference internal" href="../maintainer/index.html">Maintainer handbook</a></li>
<li class="toctree-l1"><a class="reference internal" href="../process/index.html">All development-process docs</a></li>
</ul>
<ul class="current">
<li class="toctree-l1"><a class="reference internal" href="../core-api/index.html">Core API</a></li>
<li class="toctree-l1"><a class="reference internal" href="../driver-api/index.html">Driver APIs</a></li>
<li class="toctree-l1 current"><a class="reference internal" href="../subsystem-apis.html">Subsystems</a><ul class="current">
<li class="toctree-l2"><a class="reference internal" href="../subsystem-apis.html#core-subsystems">Core subsystems</a></li>
<li class="toctree-l2"><a class="reference internal" href="../subsystem-apis.html#human-interfaces">Human interfaces</a></li>
<li class="toctree-l2"><a class="reference internal" href="../subsystem-apis.html#networking-interfaces">Networking interfaces</a></li>
<li class="toctree-l2"><a class="reference internal" href="../subsystem-apis.html#storage-interfaces">Storage interfaces</a></li>
<li class="toctree-l2 current"><a class="reference internal" href="../subsystem-apis.html#other-subsystems">Other subsystems</a><ul class="current">
<li class="toctree-l3"><a class="reference internal" href="../accounting/index.html">Accounting</a></li>
<li class="toctree-l3"><a class="reference internal" href="../cpu-freq/index.html">CPUFreq - CPU frequency and voltage scaling code in the Linux(TM) kernel</a></li>
<li class="toctree-l3"><a class="reference internal" href="../edac/index.html">EDAC Subsystem</a></li>
<li class="toctree-l3"><a class="reference internal" href="../fpga/index.html">FPGA</a></li>
<li class="toctree-l3"><a class="reference internal" href="../i2c/index.html">I2C/SMBus Subsystem</a></li>
<li class="toctree-l3 current"><a class="reference internal" href="index.html">Industrial I/O</a></li>
<li class="toctree-l3"><a class="reference internal" href="../pcmcia/index.html">PCMCIA</a></li>
<li class="toctree-l3"><a class="reference internal" href="../spi/index.html">Serial Peripheral Interface (SPI)</a></li>
<li class="toctree-l3"><a class="reference internal" href="../w1/index.html">1-Wire Subsystem</a></li>
<li class="toctree-l3"><a class="reference internal" href="../watchdog/index.html">Watchdog Support</a></li>
<li class="toctree-l3"><a class="reference internal" href="../virt/index.html">Virtualization Support</a></li>
<li class="toctree-l3"><a class="reference internal" href="../hwmon/index.html">Hardware Monitoring</a></li>
<li class="toctree-l3"><a class="reference internal" href="../accel/index.html">Compute Accelerators</a></li>
<li class="toctree-l3"><a class="reference internal" href="../security/index.html">Security Documentation</a></li>
<li class="toctree-l3"><a class="reference internal" href="../crypto/index.html">Crypto API</a></li>
<li class="toctree-l3"><a class="reference internal" href="../bpf/index.html">BPF Documentation</a></li>
<li class="toctree-l3"><a class="reference internal" href="../usb/index.html">USB support</a></li>
<li class="toctree-l3"><a class="reference internal" href="../PCI/index.html">PCI Bus Subsystem</a></li>
<li class="toctree-l3"><a class="reference internal" href="../misc-devices/index.html">Assorted Miscellaneous Devices Documentation</a></li>
<li class="toctree-l3"><a class="reference internal" href="../peci/index.html">PECI Subsystem</a></li>
<li class="toctree-l3"><a class="reference internal" href="../wmi/index.html">WMI Subsystem</a></li>
<li class="toctree-l3"><a class="reference internal" href="../tee/index.html">TEE Subsystem</a></li>
</ul>
</li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="../locking/index.html">Locking</a></li>
</ul>
<ul>
<li class="toctree-l1"><a class="reference internal" href="../process/license-rules.html">Licensing rules</a></li>
<li class="toctree-l1"><a class="reference internal" href="../doc-guide/index.html">Writing documentation</a></li>
<li class="toctree-l1"><a class="reference internal" href="../dev-tools/index.html">Development tools</a></li>
<li class="toctree-l1"><a class="reference internal" href="../dev-tools/testing-overview.html">Testing guide</a></li>
<li class="toctree-l1"><a class="reference internal" href="../kernel-hacking/index.html">Hacking guide</a></li>
<li class="toctree-l1"><a class="reference internal" href="../trace/index.html">Tracing</a></li>
<li class="toctree-l1"><a class="reference internal" href="../fault-injection/index.html">Fault injection</a></li>
<li class="toctree-l1"><a class="reference internal" href="../livepatch/index.html">Livepatching</a></li>
<li class="toctree-l1"><a class="reference internal" href="../rust/index.html">Rust</a></li>
</ul>
<ul>
<li class="toctree-l1"><a class="reference internal" href="../admin-guide/index.html">Administration</a></li>
<li class="toctree-l1"><a class="reference internal" href="../kbuild/index.html">Build system</a></li>
<li class="toctree-l1"><a class="reference internal" href="../admin-guide/reporting-issues.html">Reporting issues</a></li>
<li class="toctree-l1"><a class="reference internal" href="../tools/index.html">Userspace tools</a></li>
<li class="toctree-l1"><a class="reference internal" href="../userspace-api/index.html">Userspace API</a></li>
</ul>
<ul>
<li class="toctree-l1"><a class="reference internal" href="../firmware-guide/index.html">Firmware</a></li>
<li class="toctree-l1"><a class="reference internal" href="../devicetree/index.html">Firmware and Devicetree</a></li>
</ul>
<ul>
<li class="toctree-l1"><a class="reference internal" href="../arch/index.html">CPU architectures</a></li>
</ul>
<ul>
<li class="toctree-l1"><a class="reference internal" href="../staging/index.html">Unsorted documentation</a></li>
</ul>
<ul>
<li class="toctree-l1"><a class="reference internal" href="../translations/index.html">Translations</a></li>
</ul>
</div>
<script type="text/javascript"> <!--
var sbar = document.getElementsByClassName("sphinxsidebar")[0];
let currents = document.getElementsByClassName("current")
if (currents.length) {
sbar.scrollTop = currents[currents.length - 1].offsetTop;
}
--> </script>
<div role="note" aria-label="source link">
<h3>This Page</h3>
<ul class="this-page-menu">
<li><a href="../_sources/iio/adis16480.rst.txt"
rel="nofollow">Show Source</a></li>
</ul>
</div>
</div>
</div>
<div class="documentwrapper">
<div class="bodywrapper">
<div class="body" role="main">
<section id="adis16480-driver">
<h1>ADIS16480 driver<a class="headerlink" href="#adis16480-driver" title="Link to this heading">¶</a></h1>
<p>This driver supports Analog Device’s IMUs on SPI bus.</p>
<section id="supported-devices">
<h2>1. Supported devices<a class="headerlink" href="#supported-devices" title="Link to this heading">¶</a></h2>
<ul class="simple">
<li><p><a class="reference external" href="https://www.analog.com/ADIS16375">ADIS16375</a></p></li>
<li><p><a class="reference external" href="https://www.analog.com/ADIS16480">ADIS16480</a></p></li>
<li><p><a class="reference external" href="https://www.analog.com/ADIS16485">ADIS16485</a></p></li>
<li><p><a class="reference external" href="https://www.analog.com/ADIS16486">ADIS16486</a></p></li>
<li><p><a class="reference external" href="https://www.analog.com/ADIS16487">ADIS16487</a></p></li>
<li><p><a class="reference external" href="https://www.analog.com/ADIS16488">ADIS16488</a></p></li>
<li><p><a class="reference external" href="https://www.analog.com/ADIS16489">ADIS16489</a></p></li>
<li><p><a class="reference external" href="https://www.analog.com/ADIS16490">ADIS16490</a></p></li>
<li><p><a class="reference external" href="https://www.analog.com/ADIS16495">ADIS16495</a></p></li>
<li><p><a class="reference external" href="https://www.analog.com/ADIS16497">ADIS16497</a></p></li>
<li><p><a class="reference external" href="https://www.analog.com/ADIS16545">ADIS16545</a></p></li>
<li><p><a class="reference external" href="https://www.analog.com/ADIS16547">ADIS16547</a></p></li>
</ul>
<p>Each supported device is a complete inertial system that includes a triaxial
gyroscope and a triaxial accelerometer. Each inertial sensor in device combines
with signal conditioning that optimizes dynamic performance. The factory
calibration characterizes each sensor for sensitivity, bias, and alignment. As
a result, each sensor has its own dynamic compensation formulas that provide
accurate sensor measurements.</p>
</section>
<section id="device-attributes">
<h2>2. Device attributes<a class="headerlink" href="#device-attributes" title="Link to this heading">¶</a></h2>
<p>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.</p>
<p>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.</p>
<p>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.</p>
<p>ADIS16480 and ADIS16488 also provide access to barometric pressure data and
triaxial magnetometer measurements.</p>
<p>Each IIO device, has a device folder under <code class="docutils literal notranslate"><span class="pre">/sys/bus/iio/devices/iio:deviceX</span></code>,
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.</p>
<p>The following tables show the adis16480 related device files, found in the
specific device folder path <code class="docutils literal notranslate"><span class="pre">/sys/bus/iio/devices/iio:deviceX</span></code>.</p>
<p><strong>Available only for ADIS16480 and ADIS16488:</strong></p>
<table class="docutils align-default">
<tbody>
<tr class="row-odd"><td><p>3-Axis Magnetometer related device files</p></td>
<td><p>Description</p></td>
</tr>
<tr class="row-even"><td><p>in_magn_scale</p></td>
<td><p>Scale for the magnetometer channels.</p></td>
</tr>
<tr class="row-odd"><td><p>in_magn_x_calibbias</p></td>
<td><p>Calibration offset for the X-axis magnetometer channel.</p></td>
</tr>
<tr class="row-even"><td><p>in_magn_x_filter_low_pass_3db_frequency</p></td>
<td><p>Bandwidth for the X-axis magnetometer channel.</p></td>
</tr>
<tr class="row-odd"><td><p>in_magn_x_raw</p></td>
<td><p>Raw X-axis magnetometer channel value.</p></td>
</tr>
<tr class="row-even"><td><p>in_magn_y_calibbias</p></td>
<td><p>Calibration offset for the Y-axis magnetometer channel.</p></td>
</tr>
<tr class="row-odd"><td><p>in_magn_y_filter_low_pass_3db_frequency</p></td>
<td><p>Bandwidth for the Y-axis magnetometer channel.</p></td>
</tr>
<tr class="row-even"><td><p>in_magn_y_raw</p></td>
<td><p>Raw Y-axis magnetometer channel value.</p></td>
</tr>
<tr class="row-odd"><td><p>in_magn_z_calibbias</p></td>
<td><p>Calibration offset for the Z-axis magnetometer channel.</p></td>
</tr>
<tr class="row-even"><td><p>in_magn_z_filter_low_pass_3db_frequency</p></td>
<td><p>Bandwidth for the Z-axis magnetometer channel.</p></td>
</tr>
<tr class="row-odd"><td><p>in_magn_z_raw</p></td>
<td><p>Raw Z-axis magnetometer channel value.</p></td>
</tr>
</tbody>
</table>
<table class="docutils align-default">
<tbody>
<tr class="row-odd"><td><p>Barometric pressure sensor related files</p></td>
<td><p>Description</p></td>
</tr>
<tr class="row-even"><td><p>in_pressure0_calibbias</p></td>
<td><p>Calibration offset for barometric pressure channel.</p></td>
</tr>
<tr class="row-odd"><td><p>in_pressure0_raw</p></td>
<td><p>Raw barometric pressure channel value.</p></td>
</tr>
<tr class="row-even"><td><p>in_pressure0_scale</p></td>
<td><p>Scale for the barometric pressure sensor channel.</p></td>
</tr>
</tbody>
</table>
<p><strong>Available for all supported devices:</strong></p>
<table class="docutils align-default">
<tbody>
<tr class="row-odd"><td><p>3-Axis Accelerometer related device files</p></td>
<td><p>Description</p></td>
</tr>
<tr class="row-even"><td><p>in_accel_scale</p></td>
<td><p>Scale for the accelerometer channels.</p></td>
</tr>
<tr class="row-odd"><td><p>in_accel_x_calibbias</p></td>
<td><p>Calibration offset for the X-axis accelerometer channel.</p></td>
</tr>
<tr class="row-even"><td><p>in_accel_x_calibscale</p></td>
<td><p>Calibration scale for the X-axis accelerometer channel.</p></td>
</tr>
<tr class="row-odd"><td><p>in_accel_x_filter_low_pass_3db_frequency</p></td>
<td><p>Bandwidth for the X-axis accelerometer channel.</p></td>
</tr>
<tr class="row-even"><td><p>in_accel_x_raw</p></td>
<td><p>Raw X-axis accelerometer channel value.</p></td>
</tr>
<tr class="row-odd"><td><p>in_accel_y_calibbias</p></td>
<td><p>Calibration offset for the Y-axis accelerometer channel.</p></td>
</tr>
<tr class="row-even"><td><p>in_accel_y_calibscale</p></td>
<td><p>Calibration scale for the Y-axis accelerometer channel.</p></td>
</tr>
<tr class="row-odd"><td><p>in_accel_y_filter_low_pass_3db_frequency</p></td>
<td><p>Bandwidth for the Y-axis accelerometer channel.</p></td>
</tr>
<tr class="row-even"><td><p>in_accel_y_raw</p></td>
<td><p>Raw Y-axis accelerometer channel value.</p></td>
</tr>
<tr class="row-odd"><td><p>in_accel_z_calibbias</p></td>
<td><p>Calibration offset for the Z-axis accelerometer channel.</p></td>
</tr>
<tr class="row-even"><td><p>in_accel_z_calibscale</p></td>
<td><p>Calibration scale for the Z-axis accelerometer channel.</p></td>
</tr>
<tr class="row-odd"><td><p>in_accel_z_filter_low_pass_3db_frequency</p></td>
<td><p>Bandwidth for the Z-axis accelerometer channel.</p></td>
</tr>
<tr class="row-even"><td><p>in_accel_z_raw</p></td>
<td><p>Raw Z-axis accelerometer channel value.</p></td>
</tr>
<tr class="row-odd"><td><p>in_deltavelocity_scale</p></td>
<td><p>Scale for delta velocity channels.</p></td>
</tr>
<tr class="row-even"><td><p>in_deltavelocity_x_raw</p></td>
<td><p>Raw X-axis delta velocity channel value.</p></td>
</tr>
<tr class="row-odd"><td><p>in_deltavelocity_y_raw</p></td>
<td><p>Raw Y-axis delta velocity channel value.</p></td>
</tr>
<tr class="row-even"><td><p>in_deltavelocity_z_raw</p></td>
<td><p>Raw Z-axis delta velocity channel value.</p></td>
</tr>
</tbody>
</table>
<table class="docutils align-default">
<tbody>
<tr class="row-odd"><td><p>3-Axis Gyroscope related device files</p></td>
<td><p>Description</p></td>
</tr>
<tr class="row-even"><td><p>in_anglvel_scale</p></td>
<td><p>Scale for the gyroscope channels.</p></td>
</tr>
<tr class="row-odd"><td><p>in_anglvel_x_calibbias</p></td>
<td><p>Calibration offset for the X-axis gyroscope channel.</p></td>
</tr>
<tr class="row-even"><td><p>in_anglvel_x_calibscale</p></td>
<td><p>Calibration scale for the X-axis gyroscope channel.</p></td>
</tr>
<tr class="row-odd"><td><p>in_anglvel_x_filter_low_pass_3db_frequency</p></td>
<td><p>Bandwidth for the X-axis gyroscope channel.</p></td>
</tr>
<tr class="row-even"><td><p>in_anglvel_x_raw</p></td>
<td><p>Raw X-axis gyroscope channel value.</p></td>
</tr>
<tr class="row-odd"><td><p>in_anglvel_y_calibbias</p></td>
<td><p>Calibration offset for the Y-axis gyroscope channel.</p></td>
</tr>
<tr class="row-even"><td><p>in_anglvel_y_calibscale</p></td>
<td><p>Calibration scale for the Y-axis gyroscope channel.</p></td>
</tr>
<tr class="row-odd"><td><p>in_anglvel_y_filter_low_pass_3db_frequency</p></td>
<td><p>Bandwidth for the Y-axis gyroscope channel.</p></td>
</tr>
<tr class="row-even"><td><p>in_anglvel_y_raw</p></td>
<td><p>Raw Y-axis gyroscope channel value.</p></td>
</tr>
<tr class="row-odd"><td><p>in_anglvel_z_calibbias</p></td>
<td><p>Calibration offset for the Z-axis gyroscope channel.</p></td>
</tr>
<tr class="row-even"><td><p>in_anglvel_z_calibscale</p></td>
<td><p>Calibration scale for the Z-axis gyroscope channel.</p></td>
</tr>
<tr class="row-odd"><td><p>in_anglvel_z_filter_low_pass_3db_frequency</p></td>
<td><p>Bandwidth for the Z-axis gyroscope channel.</p></td>
</tr>
<tr class="row-even"><td><p>in_anglvel_z_raw</p></td>
<td><p>Raw Z-axis gyroscope channel value.</p></td>
</tr>
<tr class="row-odd"><td><p>in_deltaangl_scale</p></td>
<td><p>Scale for delta angle channels.</p></td>
</tr>
<tr class="row-even"><td><p>in_deltaangl_x_raw</p></td>
<td><p>Raw X-axis delta angle channel value.</p></td>
</tr>
<tr class="row-odd"><td><p>in_deltaangl_y_raw</p></td>
<td><p>Raw Y-axis delta angle channel value.</p></td>
</tr>
<tr class="row-even"><td><p>in_deltaangl_z_raw</p></td>
<td><p>Raw Z-axis delta angle channel value.</p></td>
</tr>
</tbody>
</table>
<table class="docutils align-default">
<tbody>
<tr class="row-odd"><td><p>Temperature sensor related files</p></td>
<td><p>Description</p></td>
</tr>
<tr class="row-even"><td><p>in_temp0_raw</p></td>
<td><p>Raw temperature channel value.</p></td>
</tr>
<tr class="row-odd"><td><p>in_temp0_offset</p></td>
<td><p>Offset for the temperature sensor channel.</p></td>
</tr>
<tr class="row-even"><td><p>in_temp0_scale</p></td>
<td><p>Scale for the temperature sensor channel.</p></td>
</tr>
</tbody>
</table>
<table class="docutils align-default">
<tbody>
<tr class="row-odd"><td><p>Miscellaneous device files</p></td>
<td><p>Description</p></td>
</tr>
<tr class="row-even"><td><p>name</p></td>
<td><p>Name of the IIO device.</p></td>
</tr>
<tr class="row-odd"><td><p>sampling_frequency</p></td>
<td><p>Currently selected sample rate.</p></td>
</tr>
</tbody>
</table>
<p>The following table shows the adis16480 related device debug files, found in the
specific device debug folder path <code class="docutils literal notranslate"><span class="pre">/sys/kernel/debug/iio/iio:deviceX</span></code>.</p>
<table class="docutils align-default">
<tbody>
<tr class="row-odd"><td><p>Debugfs device files</p></td>
<td><p>Description</p></td>
</tr>
<tr class="row-even"><td><p>serial_number</p></td>
<td><p>The serial number of the chip in hexadecimal format.</p></td>
</tr>
<tr class="row-odd"><td><p>product_id</p></td>
<td><p>Chip specific product id (e.g. 16480, 16488, 16545, etc.).</p></td>
</tr>
<tr class="row-even"><td><p>flash_count</p></td>
<td><p>The number of flash writes performed on the device.</p></td>
</tr>
<tr class="row-odd"><td><p>firmware_revision</p></td>
<td><p>String containing the firmware revision in the following format ##.##.</p></td>
</tr>
<tr class="row-even"><td><p>firmware_date</p></td>
<td><p>String containing the firmware date in the following format mm-dd-yyyy.</p></td>
</tr>
</tbody>
</table>
<section id="channels-processed-values">
<h3>Channels processed values<a class="headerlink" href="#channels-processed-values" title="Link to this heading">¶</a></h3>
<p>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:</p>
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>processed<span class="w"> </span><span class="nv">value</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="o">(</span>_raw<span class="w"> </span>+<span class="w"> </span>_offset<span class="o">)</span><span class="w"> </span>*<span class="w"> </span>_scale
</pre></div>
</div>
<p>Where _offset and _scale are device attributes. If no _offset attribute is
present, simply assume its value is 0.</p>
<p>The adis16480 driver offers data for 7 types of channels, the table below shows
the measurement units for the processed value, which are defined by the IIO
framework:</p>
<table class="docutils align-default">
<tbody>
<tr class="row-odd"><td><p>Channel type</p></td>
<td><p>Measurement unit</p></td>
</tr>
<tr class="row-even"><td><p>Acceleration on X, Y, and Z axis</p></td>
<td><p>Meters per Second squared</p></td>
</tr>
<tr class="row-odd"><td><p>Angular velocity on X, Y and Z axis</p></td>
<td><p>Radians per second</p></td>
</tr>
<tr class="row-even"><td><p>Delta velocity on X. Y, and Z axis</p></td>
<td><p>Meters per Second</p></td>
</tr>
<tr class="row-odd"><td><p>Delta angle on X, Y, and Z axis</p></td>
<td><p>Radians</p></td>
</tr>
<tr class="row-even"><td><p>Temperature</p></td>
<td><p>Millidegrees Celsius</p></td>
</tr>
<tr class="row-odd"><td><p>Magnetic field along X, Y and Z axis</p></td>
<td><p>Gauss</p></td>
</tr>
<tr class="row-even"><td><p>Barometric pressure</p></td>
<td><p>kilo Pascal</p></td>
</tr>
</tbody>
</table>
</section>
<section id="usage-examples">
<h3>Usage examples<a class="headerlink" href="#usage-examples" title="Link to this heading">¶</a></h3>
<p>Show device name:</p>
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>root:/sys/bus/iio/devices/iio:device0><span class="w"> </span>cat<span class="w"> </span>name
adis16545-1
</pre></div>
</div>
<p>Show accelerometer channels value:</p>
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>root:/sys/bus/iio/devices/iio:device0><span class="w"> </span>cat<span class="w"> </span>in_accel_x_raw
<span class="m">1376728</span>
root:/sys/bus/iio/devices/iio:device0><span class="w"> </span>cat<span class="w"> </span>in_accel_y_raw
<span class="m">4487621</span>
root:/sys/bus/iio/devices/iio:device0><span class="w"> </span>cat<span class="w"> </span>in_accel_z_raw
<span class="m">262773792</span>
root:/sys/bus/iio/devices/iio:device0><span class="w"> </span>cat<span class="w"> </span>in_accel_scale
<span class="m">0</span>.000000037
</pre></div>
</div>
<ul class="simple">
<li><p>X-axis acceleration = in_accel_x_raw * in_accel_scale = 0.050938936 m/s^2</p></li>
<li><p>Y-axis acceleration = in_accel_y_raw * in_accel_scale = 0.166041977 m/s^2</p></li>
<li><p>Z-axis acceleration = in_accel_z_raw * in_accel_scale = 9.722630304 m/s^2</p></li>
</ul>
<p>Show gyroscope channels value:</p>
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>root:/sys/bus/iio/devices/iio:device0><span class="w"> </span>cat<span class="w"> </span>in_anglvel_x_raw
-1041702
root:/sys/bus/iio/devices/iio:device0><span class="w"> </span>cat<span class="w"> </span>in_anglvel_y_raw
-273013
root:/sys/bus/iio/devices/iio:device0><span class="w"> </span>cat<span class="w"> </span>in_anglvel_z_raw
<span class="m">2745116</span>
root:/sys/bus/iio/devices/iio:device0><span class="w"> </span>cat<span class="w"> </span>in_anglvel_scale
<span class="m">0</span>.000000001
</pre></div>
</div>
<ul class="simple">
<li><p>X-axis angular velocity = in_anglvel_x_raw * in_anglvel_scale = −0.001041702 rad/s</p></li>
<li><p>Y-axis angular velocity = in_anglvel_y_raw * in_anglvel_scale = −0.000273013 rad/s</p></li>
<li><p>Z-axis angular velocity = in_anglvel_z_raw * in_anglvel_scale = 0.002745116 rad/s</p></li>
</ul>
<p>Set calibration offset for accelerometer channels:</p>
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>root:/sys/bus/iio/devices/iio:device0><span class="w"> </span>cat<span class="w"> </span>in_accel_x_calibbias
<span class="m">0</span>
root:/sys/bus/iio/devices/iio:device0><span class="w"> </span><span class="nb">echo</span><span class="w"> </span><span class="m">5000</span><span class="w"> </span>><span class="w"> </span>in_accel_x_calibbias
root:/sys/bus/iio/devices/iio:device0><span class="w"> </span>cat<span class="w"> </span>in_accel_x_calibbias
<span class="m">5000</span>
</pre></div>
</div>
<p>Set calibration offset for gyroscope channels:</p>
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>root:/sys/bus/iio/devices/iio:device0><span class="w"> </span>cat<span class="w"> </span>in_anglvel_y_calibbias
<span class="m">0</span>
root:/sys/bus/iio/devices/iio:device0><span class="w"> </span><span class="nb">echo</span><span class="w"> </span>-5000<span class="w"> </span>><span class="w"> </span>in_anglvel_y_calibbias
root:/sys/bus/iio/devices/iio:device0><span class="w"> </span>cat<span class="w"> </span>in_anglvel_y_calibbias
-5000
</pre></div>
</div>
<p>Set sampling frequency:</p>
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>root:/sys/bus/iio/devices/iio:device0><span class="w"> </span>cat<span class="w"> </span>sampling_frequency
<span class="m">4250</span>.000000
root:/sys/bus/iio/devices/iio:device0><span class="w"> </span><span class="nb">echo</span><span class="w"> </span><span class="m">1000</span><span class="w"> </span>><span class="w"> </span>sampling_frequency
<span class="m">1062</span>.500000
</pre></div>
</div>
<p>Set bandwidth for accelerometer channels:</p>
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>root:/sys/bus/iio/devices/iio:device0><span class="w"> </span>cat<span class="w"> </span>in_accel_x_filter_low_pass_3db_frequency
<span class="m">0</span>
root:/sys/bus/iio/devices/iio:device0><span class="w"> </span><span class="nb">echo</span><span class="w"> </span><span class="m">300</span><span class="w"> </span>><span class="w"> </span>in_accel_x_filter_low_pass_3db_frequency
root:/sys/bus/iio/devices/iio:device0><span class="w"> </span>cat<span class="w"> </span>in_accel_x_filter_low_pass_3db_frequency
<span class="m">300</span>
</pre></div>
</div>
<p>Show serial number:</p>
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>root:/sys/kernel/debug/iio/iio:device0><span class="w"> </span>cat<span class="w"> </span>serial_number
0x000c
</pre></div>
</div>
<p>Show product id:</p>
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>root:/sys/kernel/debug/iio/iio:device0><span class="w"> </span>cat<span class="w"> </span>product_id
<span class="m">16545</span>
</pre></div>
</div>
<p>Show flash count:</p>
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>root:/sys/kernel/debug/iio/iio:device0><span class="w"> </span>cat<span class="w"> </span>flash_count
<span class="m">88</span>
</pre></div>
</div>
<p>Show firmware revision:</p>
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>root:/sys/kernel/debug/iio/iio:device0><span class="w"> </span>cat<span class="w"> </span>firmware_revision
<span class="m">1</span>.4
</pre></div>
</div>
<p>Show firmware date:</p>
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>root:/sys/kernel/debug/iio/iio:device0><span class="w"> </span>cat<span class="w"> </span>firmware_date
<span class="m">09</span>-23-2023
</pre></div>
</div>
</section>
</section>
<section id="device-buffers">
<h2>3. Device buffers<a class="headerlink" href="#device-buffers" title="Link to this heading">¶</a></h2>
<p>This driver supports IIO buffers.</p>
<p>All devices support retrieving the raw acceleration, gyroscope and temperature
measurements using buffers.</p>
<p>The following device families also support retrieving the delta velocity, delta
angle and temperature measurements using buffers:</p>
<ul class="simple">
<li><p>ADIS16545</p></li>
<li><p>ADIS16547</p></li>
</ul>
<p>However, when retrieving acceleration or gyroscope data using buffers, delta
readings will not be available and vice versa. This is because the device only
allows to read either acceleration and gyroscope data or delta velocity and
delta angle data at a time and switching between these two burst data selection
modes is time consuming.</p>
<section id="id1">
<h3>Usage examples<a class="headerlink" href="#id1" title="Link to this heading">¶</a></h3>
<p>Set device trigger in current_trigger, if not already set:</p>
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>root:/sys/bus/iio/devices/iio:device0><span class="w"> </span>cat<span class="w"> </span>trigger/current_trigger
root:/sys/bus/iio/devices/iio:device0><span class="w"> </span><span class="nb">echo</span><span class="w"> </span>adis16545-1-dev0<span class="w"> </span>><span class="w"> </span>trigger/current_trigger
root:/sys/bus/iio/devices/iio:device0><span class="w"> </span>cat<span class="w"> </span>trigger/current_trigger
adis16545-1-dev0
</pre></div>
</div>
<p>Select channels for buffer read:</p>
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>root:/sys/bus/iio/devices/iio:device0><span class="w"> </span><span class="nb">echo</span><span class="w"> </span><span class="m">1</span><span class="w"> </span>><span class="w"> </span>scan_elements/in_deltavelocity_x_en
root:/sys/bus/iio/devices/iio:device0><span class="w"> </span><span class="nb">echo</span><span class="w"> </span><span class="m">1</span><span class="w"> </span>><span class="w"> </span>scan_elements/in_deltavelocity_y_en
root:/sys/bus/iio/devices/iio:device0><span class="w"> </span><span class="nb">echo</span><span class="w"> </span><span class="m">1</span><span class="w"> </span>><span class="w"> </span>scan_elements/in_deltavelocity_z_en
root:/sys/bus/iio/devices/iio:device0><span class="w"> </span><span class="nb">echo</span><span class="w"> </span><span class="m">1</span><span class="w"> </span>><span class="w"> </span>scan_elements/in_temp0_en
</pre></div>
</div>
<p>Set the number of samples to be stored in the buffer:</p>
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>root:/sys/bus/iio/devices/iio:device0><span class="w"> </span><span class="nb">echo</span><span class="w"> </span><span class="m">10</span><span class="w"> </span>><span class="w"> </span>buffer/length
</pre></div>
</div>
<p>Enable buffer readings:</p>
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>root:/sys/bus/iio/devices/iio:device0><span class="w"> </span><span class="nb">echo</span><span class="w"> </span><span class="m">1</span><span class="w"> </span>><span class="w"> </span>buffer/enable
</pre></div>
</div>
<p>Obtain buffered data:</p>
<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>root:/sys/bus/iio/devices/iio:device0> hexdump -C /dev/iio\:device0
...
00006aa0 09 62 00 00 ff ff fc a4 00 00 01 69 00 03 3c 08 |.b.........i..<.|
00006ab0 09 61 00 00 00 00 02 96 00 00 02 8f 00 03 37 50 |.a............7P|
00006ac0 09 61 00 00 00 00 12 3d 00 00 0b 89 00 03 2c 0b |.a.....=......,.|
00006ad0 09 61 00 00 00 00 1e dc 00 00 16 dd 00 03 25 bf |.a............%.|
00006ae0 09 61 00 00 00 00 1e e3 00 00 1b bf 00 03 27 0b |.a............'.|
00006af0 09 61 00 00 00 00 15 50 00 00 19 44 00 03 30 fd |.a.....P...D..0.|
00006b00 09 61 00 00 00 00 09 0e 00 00 14 41 00 03 3d 7f |.a.........A..=.|
00006b10 09 61 00 00 ff ff ff f0 00 00 0e bc 00 03 48 d0 |.a............H.|
00006b20 09 63 00 00 00 00 00 9f 00 00 0f 37 00 03 4c fe |.c.........7..L.|
00006b30 09 64 00 00 00 00 0b f6 00 00 18 92 00 03 43 22 |.d............C"|
00006b40 09 64 00 00 00 00 18 df 00 00 22 33 00 03 33 ab |.d........"3..3.|
00006b50 09 63 00 00 00 00 1e 81 00 00 26 be 00 03 29 60 |.c........&...)`|
00006b60 09 63 00 00 00 00 1b 13 00 00 22 2f 00 03 23 91 |.c........"/..#.|
...
</pre></div>
</div>
<p>See <code class="docutils literal notranslate"><span class="pre">Documentation/iio/iio_devbuf.rst</span></code> for more information about how buffered
data is structured.</p>
</section>
</section>
<section id="iio-interfacing-tools">
<h2>4. IIO Interfacing Tools<a class="headerlink" href="#iio-interfacing-tools" title="Link to this heading">¶</a></h2>
<p>See <code class="docutils literal notranslate"><span class="pre">Documentation/iio/iio_tools.rst</span></code> for the description of the available IIO
interfacing tools.</p>
</section>
</section>
</div>
</div>
</div>
<div class="clearer"></div>
</div>
<div class="footer">
©The kernel development community.
|
Powered by <a href="https://www.sphinx-doc.org/">Sphinx 8.1.3</a>
& <a href="https://alabaster.readthedocs.io">Alabaster 0.7.16</a>
|
<a href="../_sources/iio/adis16480.rst.txt"
rel="nofollow">Page source</a>
</div>
</body>
</html>