Wiki

no way to compare when less than two revisions

Differences

This shows you the differences between two versions of the page.


Previous revision
Last revision
resources:tools-software:linux-drivers:iio-amplifiers:ada4250 [06 May 2021 15:32] Antoniu Miclaus
Line 1: Line 1:
 +====== ADA4250 Programmable Gain Instrumentation Amplifier Linux Driver ======
  
 +===== Supported Devices =====
 +
 +  * [[adi>ADA4250]]
 +
 +===== Evaluation Boards =====
 +
 +  * [[adi>EVAL-ADA4250-ARDZ]]
 +
 +===== Description =====
 +
 +This is a Linux industrial I/O ([[software:linux:docs:iio:iio|IIO]]) subsystem driver, targeting serial interface PGA amplifiers.
 +The industrial I/O subsystem provides a unified framework for drivers for many different types of converters and sensors using a number of different physical interfaces (i2c, spi, etc).
 +See [[software:linux:docs:iio:iio|IIO]] for more information.
 +
 +====== Source Code ======
 +
 +===== Status =====
 +
 +^ Source ^ Mainlined? ^
 +| [[linux.github>master?drivers/iio/amplifiers/ada4250.c|git]] | [[git.linux.org>drivers/iio/amplifiers/ada4250.c|WIP]] |
 +===== Files =====
 +
 +^ Function ^ File ^
 +| driver  | [[ linux.github>master?drivers/iio/amplifiers/ada4250.c |  drivers/iio/amplifiers/ada4250.c]] |
 +| Documentation | [[git.linux.org>Documentation/ABI/testing/sysfs-bus-iio]] | 
 +
 +{{page>software/linux/docs/platform_and_bus_model#Declaring SPI slave devices&firstseconly&noeditbtn}}
 +
 +==== properties ====
 +
 +**compatible:**
 +  * enum:
 +    * adi,ada4250
 +
 +**reg:**
 +  * maxItems: 1
 +
 +**avdd-supply:**
 +  * description: analog voltage regulator (see regulator/regulator.txt)
 +
 +**adi,refbuf-enable:**
 +  * description: Enable internal buffer to drive the reference pin.
 +  * type: boolean
 +
 +**required:**
 +  * compatible
 +  * reg
 +  * avdd-supply
 +
 +==== Example ====
 +
 +<code c>
 +    spi {
 +      #address-cells = <1>;
 +      #size-cells = <0>;
 +      status = "okay";
 +      ada4250@0{
 +        compatible = "adi,ada4250";
 +        reg = <0>;
 +        avdd-supply = <&avdd>;
 +      };
 +    };
 +</code>
 +
 +====== Adding Linux driver support ======
 +
 +Configure kernel with "make menuconfig" (alternatively use "make xconfig" or
 +"make qconfig")
 +
 +<WRAP round help>
 +The AD8366 Driver depends on **CONFIG_SPI**
 +</WRAP>
 +
 +<code>
 +Linux Kernel Configuration
 + Device Drivers  --->
 + <*>     Industrial I/O support --->
 +     --- Industrial I/O support
 + Amplifiers  --->
 + <*> Analog Devices ADA4250 Instrumentation Amplifier
 +</code>
 +
 +====== Hardware configuration ======
 +{{page>software:linux:docs:iio:iio_snippets#iio device files&noheader&firstseconly&noeditbtn}}
 +
 +<WRAP box bggreen><wrap info>This specifies any shell prompt running on the target</wrap>
 +<xterm>
 +root:/> **cd /sys/bus/iio/devices/**
 +root:/sys/bus/iio/devices> ls
 +iio:device0
 +root:/sys/bus/iio/devices> **iio:device0**
 +
 +root:/> **ls -l**
 +-r--r--r-- 1 root root 4096 May  6 12:20 dev
 +-r--r--r-- 1 root root 4096 May  6 12:20 name
 +-rw-r--r-- 1 root root 4096 May  6 13:00 out_voltage0_calibbias
 +-r--r--r-- 1 root root 4096 May  6 12:20 out_voltage0_calibbias_available
 +-rw-r--r-- 1 root root 4096 May  6 13:00 out_voltage0_hardwaregain
 +-r--r--r-- 1 root root 4096 May  6 12:20 out_voltage0_hardwaregain_available
 +-rw-r--r-- 1 root root 4096 May  6 13:01 out_voltage0_offset
 +lrwxrwxrwx 1 root root    0 May  6 12:20 subsystem -> ../../../../../../../../bus/iio
 +-rw-r--r-- 1 root root 4096 May  6 12:20 uevent
 +</xterm></WRAP>
 +
 +=== Show device name ===
 +
 +<WRAP box bggreen><wrap info>This specifies any shell prompt running on the target</wrap>
 +<xterm>
 +root:/> **cd /sys/bus/iio/devices/iio\:device0/**
 +root:/> **cat name**
 +ada4250
 +</xterm></WRAP>
 +
 +=== Set ChannelY Gain ===
 +
 +/sys/bus/iio/devices/iio:deviceX/out_voltageY_hardwaregain\\
 +
 +Hardware applied gain factor. If shared across all channels,
 +<type>_hardwaregain is used.
 +
 +<WRAP box bggreen><wrap info>This specifies any shell prompt running on the target</wrap>
 +<xterm>
 +root:/> **cat out_voltage0_hardwaregain_available**
 +0 1 2 3 4 5 6 7
 +
 +root:/> **cat out_voltage0_hardwaregain**
 +0
 +
 +root:/> **echo 1 > out_voltage0_hardwaregain**
 +root:/> **cat out_voltage0_hardwaregain**
 +1
 +</xterm></WRAP>
 +
 +
 +=== Set ChannelY Current Bias Set===
 +
 +/sys/bus/iio/devices/iio:deviceX/out_voltageY_calibbias\\
 +
 +Current bias for different ranges of the sensor offset calibration. If shared across all channels,
 +<type>_calibbias is used.
 +
 +<WRAP box bggreen><wrap info>This specifies any shell prompt running on the target</wrap>
 +<xterm>
 +root:/> **cat out_voltage0_calibbias_available**
 +0 1 2 3
 +
 +root:/> **cat out_voltage0_calibbias**
 +0
 +
 +root:/> **echo 2 > out_voltage0_calibbias**
 +root:/> **cat out_voltage0_calibbias**
 +2
 +</xterm></WRAP>
 +
 +=== Set ChannelY Offset value===
 +
 +/sys/bus/iio/devices/iio:deviceX/out_voltageY_offset\\
 +
 +Sensor offset calibration value in uV. If shared across all channels,
 +<type>_offset is used.
 +
 +<WRAP box bggreen><wrap info>This specifies any shell prompt running on the target</wrap>
 +<xterm>
 +root:/> **cat out_voltage0_offset**
 +0
 +
 +root:/> **echo -32000 > out_voltage0_offset**
 +root:/> **cat out_voltage0_offset**
 +-31752
 +</xterm></WRAP>
 +
 +====== More Information ======
 +
 +{{page>software:linux:docs:iio:iio_snippets#iio pointers&noheader&firstseconly&noeditbtn}}
resources/tools-software/linux-drivers/iio-amplifiers/ada4250.txt · Last modified: 27 Jun 2021 14:01 by Antoniu Miclaus