<!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>ADIS16475 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="ADIS16480 driver" href="adis16480.html" />
<link rel="prev" title="ADE9000 driver" href="ade9000.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/adis16475.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="adis16475-driver">
<h1>ADIS16475 driver<a class="headerlink" href="#adis16475-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/ADIS16465">ADIS16465</a></p></li>
<li><p><a class="reference external" href="https://www.analog.com/ADIS16467">ADIS16467</a></p></li>
<li><p><a class="reference external" href="https://www.analog.com/ADIS16470">ADIS16470</a></p></li>
<li><p><a class="reference external" href="https://www.analog.com/ADIS16475">ADIS16475</a></p></li>
<li><p><a class="reference external" href="https://www.analog.com/ADIS16477">ADIS16477</a></p></li>
<li><p><a class="reference external" href="https://www.analog.com/ADIS16500">ADIS16500</a></p></li>
<li><p><a class="reference external" href="https://www.analog.com/ADIS16505">ADIS16505</a></p></li>
<li><p><a class="reference external" href="https://www.analog.com/ADIS16507">ADIS16507</a></p></li>
</ul>
<p>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.</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>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.</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 adis16475 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>
<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_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_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_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_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_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_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_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>
<tr class="row-even"><td><p>filter_low_pass_3db_frequency</p></td>
<td><p>Bandwidth for the accelerometer and gyroscope channels.</p></td>
</tr>
</tbody>
</table>
<p>The following table shows the adis16475 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. 16475, 16500, 16505, 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 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:</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>
</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
adis16505-2
</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
-275924
root:/sys/bus/iio/devices/iio:device0><span class="w"> </span>cat<span class="w"> </span>in_accel_y_raw
-30142222
root:/sys/bus/iio/devices/iio:device0><span class="w"> </span>cat<span class="w"> </span>in_accel_z_raw
<span class="m">261265769</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.010209188 m/s^2</p></li>
<li><p>Y-axis acceleration = in_accel_y_raw * in_accel_scale = −1.115262214 m/s^2</p></li>
<li><p>Z-axis acceleration = in_accel_z_raw * in_accel_scale = 9.666833453 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
-3324626
root:/sys/bus/iio/devices/iio:device0><span class="w"> </span>cat<span class="w"> </span>in_anglvel_y_raw
<span class="m">1336980</span>
root:/sys/bus/iio/devices/iio:device0><span class="w"> </span>cat<span class="w"> </span>in_anglvel_z_raw
-602983
root:/sys/bus/iio/devices/iio:device0><span class="w"> </span>cat<span class="w"> </span>in_anglvel_scale
<span class="m">0</span>.000000006
</pre></div>
</div>
<ul class="simple">
<li><p>X-axis angular velocity = in_anglvel_x_raw * in_anglvel_scale = −0.019947756 rad/s</p></li>
<li><p>Y-axis angular velocity = in_anglvel_y_raw * in_anglvel_scale = 0.00802188 rad/s</p></li>
<li><p>Z-axis angular velocity = in_anglvel_z_raw * in_anglvel_scale = −0.003617898 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">2000</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">1000</span>.000000
</pre></div>
</div>
<p>Set bandwidth for accelerometer and gyroscope:</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>filter_low_pass_3db_frequency
<span class="m">720</span>
root:/sys/bus/iio/devices/iio:device0><span class="w"> </span><span class="nb">echo</span><span class="w"> </span><span class="m">360</span><span class="w"> </span>><span class="w"> </span>filter_low_pass_3db_frequency
root:/sys/bus/iio/devices/iio:device0><span class="w"> </span>cat<span class="w"> </span>filter_low_pass_3db_frequency
<span class="m">360</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
0x04f9
</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">16505</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">150</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>.6
</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">06</span>-27-2019
</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>ADIS16477</p></li>
<li><p>ADIS16500</p></li>
<li><p>ADIS16505</p></li>
<li><p>ADIS16507</p></li>
</ul>
<p>However, when retrieving acceleration or gyroscope data using buffers, delta
readings will not be available and vice versa.</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>adis16505-2-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
adis16505-2-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-bash notranslate"><div class="highlight"><pre><span></span>root:/sys/bus/iio/devices/iio:device0><span class="w"> </span>hexdump<span class="w"> </span>-C<span class="w"> </span>/dev/iio<span class="se">\:</span>device0
...
<span class="m">00001680</span><span class="w"> </span><span class="m">01</span><span class="w"> </span>1f<span class="w"> </span><span class="m">00</span><span class="w"> </span><span class="m">00</span><span class="w"> </span>ff<span class="w"> </span>ff<span class="w"> </span>fe<span class="w"> </span>ef<span class="w"> </span><span class="m">00</span><span class="w"> </span><span class="m">00</span><span class="w"> </span><span class="m">47</span><span class="w"> </span>bf<span class="w"> </span><span class="m">00</span><span class="w"> </span><span class="m">03</span><span class="w"> </span><span class="m">35</span><span class="w"> </span><span class="m">55</span><span class="w"> </span><span class="p">|</span>..........G...5U<span class="p">|</span>
<span class="m">00001690</span><span class="w"> </span><span class="m">01</span><span class="w"> </span>1f<span class="w"> </span><span class="m">00</span><span class="w"> </span><span class="m">00</span><span class="w"> </span>ff<span class="w"> </span>ff<span class="w"> </span>ff<span class="w"> </span>d9<span class="w"> </span><span class="m">00</span><span class="w"> </span><span class="m">00</span><span class="w"> </span><span class="m">46</span><span class="w"> </span>f1<span class="w"> </span><span class="m">00</span><span class="w"> </span><span class="m">03</span><span class="w"> </span><span class="m">35</span><span class="w"> </span><span class="m">35</span><span class="w"> </span><span class="p">|</span>..........F...55<span class="p">|</span>
000016a0<span class="w"> </span><span class="m">01</span><span class="w"> </span>1f<span class="w"> </span><span class="m">00</span><span class="w"> </span><span class="m">00</span><span class="w"> </span>ff<span class="w"> </span>ff<span class="w"> </span>fe<span class="w"> </span><span class="nb">fc</span><span class="w"> </span><span class="m">00</span><span class="w"> </span><span class="m">00</span><span class="w"> </span><span class="m">46</span><span class="w"> </span>cb<span class="w"> </span><span class="m">00</span><span class="w"> </span><span class="m">03</span><span class="w"> </span><span class="m">35</span><span class="w"> </span>7b<span class="w"> </span><span class="p">|</span>..........F...5<span class="o">{</span><span class="p">|</span>
000016b0<span class="w"> </span><span class="m">01</span><span class="w"> </span>1f<span class="w"> </span><span class="m">00</span><span class="w"> </span><span class="m">00</span><span class="w"> </span>ff<span class="w"> </span>ff<span class="w"> </span>fe<span class="w"> </span><span class="m">41</span><span class="w"> </span><span class="m">00</span><span class="w"> </span><span class="m">00</span><span class="w"> </span><span class="m">47</span><span class="w"> </span>0d<span class="w"> </span><span class="m">00</span><span class="w"> </span><span class="m">03</span><span class="w"> </span><span class="m">35</span><span class="w"> </span>8b<span class="w"> </span><span class="p">|</span>.......A..G...5.<span class="p">|</span>
000016c0<span class="w"> </span><span class="m">01</span><span class="w"> </span>1f<span class="w"> </span><span class="m">00</span><span class="w"> </span><span class="m">00</span><span class="w"> </span>ff<span class="w"> </span>ff<span class="w"> </span>fe<span class="w"> </span><span class="m">37</span><span class="w"> </span><span class="m">00</span><span class="w"> </span><span class="m">00</span><span class="w"> </span><span class="m">46</span><span class="w"> </span>b4<span class="w"> </span><span class="m">00</span><span class="w"> </span><span class="m">03</span><span class="w"> </span><span class="m">35</span><span class="w"> </span><span class="m">90</span><span class="w"> </span><span class="p">|</span>.......7..F...5.<span class="p">|</span>
000016d0<span class="w"> </span><span class="m">01</span><span class="w"> </span>1d<span class="w"> </span><span class="m">00</span><span class="w"> </span><span class="m">00</span><span class="w"> </span>ff<span class="w"> </span>ff<span class="w"> </span>fe<span class="w"> </span>5a<span class="w"> </span><span class="m">00</span><span class="w"> </span><span class="m">00</span><span class="w"> </span><span class="m">45</span><span class="w"> </span>d7<span class="w"> </span><span class="m">00</span><span class="w"> </span><span class="m">03</span><span class="w"> </span><span class="m">36</span><span class="w"> </span><span class="m">08</span><span class="w"> </span><span class="p">|</span>.......Z..E...6.<span class="p">|</span>
000016e0<span class="w"> </span><span class="m">01</span><span class="w"> </span>1b<span class="w"> </span><span class="m">00</span><span class="w"> </span><span class="m">00</span><span class="w"> </span>ff<span class="w"> </span>ff<span class="w"> </span>fe<span class="w"> </span>fb<span class="w"> </span><span class="m">00</span><span class="w"> </span><span class="m">00</span><span class="w"> </span><span class="m">45</span><span class="w"> </span>e7<span class="w"> </span><span class="m">00</span><span class="w"> </span><span class="m">03</span><span class="w"> </span><span class="m">36</span><span class="w"> </span><span class="m">60</span><span class="w"> </span><span class="p">|</span>..........E...6<span class="sb">`</span><span class="p">|</span>
000016f0<span class="w"> </span><span class="m">01</span><span class="w"> </span>1a<span class="w"> </span><span class="m">00</span><span class="w"> </span><span class="m">00</span><span class="w"> </span>ff<span class="w"> </span>ff<span class="w"> </span>ff<span class="w"> </span><span class="m">17</span><span class="w"> </span><span class="m">00</span><span class="w"> </span><span class="m">00</span><span class="w"> </span><span class="m">46</span><span class="w"> </span>bc<span class="w"> </span><span class="m">00</span><span class="w"> </span><span class="m">03</span><span class="w"> </span><span class="m">36</span><span class="w"> </span>de<span class="w"> </span><span class="p">|</span>..........F...6.<span class="p">|</span>
<span class="m">00001700</span><span class="w"> </span><span class="m">01</span><span class="w"> </span>1a<span class="w"> </span><span class="m">00</span><span class="w"> </span><span class="m">00</span><span class="w"> </span>ff<span class="w"> </span>ff<span class="w"> </span>fe<span class="w"> </span><span class="m">59</span><span class="w"> </span><span class="m">00</span><span class="w"> </span><span class="m">00</span><span class="w"> </span><span class="m">46</span><span class="w"> </span>d7<span class="w"> </span><span class="m">00</span><span class="w"> </span><span class="m">03</span><span class="w"> </span><span class="m">37</span><span class="w"> </span>b8<span class="w"> </span><span class="p">|</span>.......Y..F...7.<span class="p">|</span>
<span class="m">00001710</span><span class="w"> </span><span class="m">01</span><span class="w"> </span>1a<span class="w"> </span><span class="m">00</span><span class="w"> </span><span class="m">00</span><span class="w"> </span>ff<span class="w"> </span>ff<span class="w"> </span>fe<span class="w"> </span>ae<span class="w"> </span><span class="m">00</span><span class="w"> </span><span class="m">00</span><span class="w"> </span><span class="m">46</span><span class="w"> </span><span class="m">95</span><span class="w"> </span><span class="m">00</span><span class="w"> </span><span class="m">03</span><span class="w"> </span><span class="m">37</span><span class="w"> </span>ba<span class="w"> </span><span class="p">|</span>..........F...7.<span class="p">|</span>
<span class="m">00001720</span><span class="w"> </span><span class="m">01</span><span class="w"> </span>1a<span class="w"> </span><span class="m">00</span><span class="w"> </span><span class="m">00</span><span class="w"> </span>ff<span class="w"> </span>ff<span class="w"> </span>fe<span class="w"> </span>c5<span class="w"> </span><span class="m">00</span><span class="w"> </span><span class="m">00</span><span class="w"> </span><span class="m">46</span><span class="w"> </span><span class="m">63</span><span class="w"> </span><span class="m">00</span><span class="w"> </span><span class="m">03</span><span class="w"> </span><span class="m">37</span><span class="w"> </span>9f<span class="w"> </span><span class="p">|</span>..........Fc..7.<span class="p">|</span>
<span class="m">00001730</span><span class="w"> </span><span class="m">01</span><span class="w"> </span>1a<span class="w"> </span><span class="m">00</span><span class="w"> </span><span class="m">00</span><span class="w"> </span>ff<span class="w"> </span>ff<span class="w"> </span>fe<span class="w"> </span><span class="m">55</span><span class="w"> </span><span class="m">00</span><span class="w"> </span><span class="m">00</span><span class="w"> </span><span class="m">46</span><span class="w"> </span><span class="m">89</span><span class="w"> </span><span class="m">00</span><span class="w"> </span><span class="m">03</span><span class="w"> </span><span class="m">37</span><span class="w"> </span>c1<span class="w"> </span><span class="p">|</span>.......U..F...7.<span class="p">|</span>
<span class="m">00001740</span><span class="w"> </span><span class="m">01</span><span class="w"> </span>1a<span class="w"> </span><span class="m">00</span><span class="w"> </span><span class="m">00</span><span class="w"> </span>ff<span class="w"> </span>ff<span class="w"> </span>fe<span class="w"> </span><span class="m">31</span><span class="w"> </span><span class="m">00</span><span class="w"> </span><span class="m">00</span><span class="w"> </span><span class="m">46</span><span class="w"> </span>aa<span class="w"> </span><span class="m">00</span><span class="w"> </span><span class="m">03</span><span class="w"> </span><span class="m">37</span><span class="w"> </span>f7<span class="w"> </span><span class="p">|</span>.......1..F...7.<span class="p">|</span>
...
</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/adis16475.rst.txt"
rel="nofollow">Page source</a>
</div>
</body>
</html>