This shows you the differences between two versions of the page.
Previous revisionLast 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> | ||
+ | |||
+ | ===== Evaluation Boards ===== | ||
+ | |||
+ | * [[adi> | ||
+ | |||
+ | ===== Description ===== | ||
+ | |||
+ | This is a Linux industrial I/O ([[software: | ||
+ | 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: | ||
+ | |||
+ | ====== Source Code ====== | ||
+ | |||
+ | ===== Status ===== | ||
+ | |||
+ | ^ Source ^ Mainlined? ^ | ||
+ | | [[linux.github> | ||
+ | ===== Files ===== | ||
+ | |||
+ | ^ Function ^ File ^ | ||
+ | | driver | ||
+ | | Documentation | [[git.linux.org> | ||
+ | |||
+ | {{page> | ||
+ | |||
+ | ==== properties ==== | ||
+ | |||
+ | **compatible: | ||
+ | * enum: | ||
+ | * adi,ada4250 | ||
+ | |||
+ | **reg:** | ||
+ | * maxItems: 1 | ||
+ | |||
+ | **avdd-supply: | ||
+ | * description: | ||
+ | |||
+ | **adi, | ||
+ | * description: | ||
+ | * type: boolean | ||
+ | |||
+ | **required: | ||
+ | * compatible | ||
+ | * reg | ||
+ | * avdd-supply | ||
+ | |||
+ | ==== Example ==== | ||
+ | |||
+ | <code c> | ||
+ | spi { | ||
+ | # | ||
+ | #size-cells = <0>; | ||
+ | status = " | ||
+ | ada4250@0{ | ||
+ | compatible = " | ||
+ | reg = <0>; | ||
+ | avdd-supply = <& | ||
+ | }; | ||
+ | }; | ||
+ | </ | ||
+ | |||
+ | ====== Adding Linux driver support ====== | ||
+ | |||
+ | Configure kernel with "make menuconfig" | ||
+ | "make qconfig" | ||
+ | |||
+ | <WRAP round help> | ||
+ | The AD8366 Driver depends on **CONFIG_SPI** | ||
+ | </ | ||
+ | |||
+ | < | ||
+ | Linux Kernel Configuration | ||
+ | Device Drivers | ||
+ | < | ||
+ | --- Industrial I/O support | ||
+ | Amplifiers | ||
+ | < | ||
+ | </ | ||
+ | |||
+ | ====== Hardware configuration ====== | ||
+ | {{page> | ||
+ | |||
+ | <WRAP box bggreen>< | ||
+ | < | ||
+ | root:/> **cd / | ||
+ | root:/ | ||
+ | iio:device0 | ||
+ | root:/ | ||
+ | |||
+ | 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 -> ../ | ||
+ | -rw-r--r-- 1 root root 4096 May 6 12:20 uevent | ||
+ | </ | ||
+ | |||
+ | === Show device name === | ||
+ | |||
+ | <WRAP box bggreen>< | ||
+ | < | ||
+ | root:/> **cd / | ||
+ | root:/> **cat name** | ||
+ | ada4250 | ||
+ | </ | ||
+ | |||
+ | === Set ChannelY Gain === | ||
+ | |||
+ | / | ||
+ | |||
+ | Hardware applied gain factor. If shared across all channels, | ||
+ | < | ||
+ | |||
+ | <WRAP box bggreen>< | ||
+ | < | ||
+ | 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 | ||
+ | </ | ||
+ | |||
+ | |||
+ | === Set ChannelY Current Bias Set=== | ||
+ | |||
+ | / | ||
+ | |||
+ | Current bias for different ranges of the sensor offset calibration. If shared across all channels, | ||
+ | < | ||
+ | |||
+ | <WRAP box bggreen>< | ||
+ | < | ||
+ | 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 | ||
+ | </ | ||
+ | |||
+ | === Set ChannelY Offset value=== | ||
+ | |||
+ | / | ||
+ | |||
+ | Sensor offset calibration value in uV. If shared across all channels, | ||
+ | < | ||
+ | |||
+ | <WRAP box bggreen>< | ||
+ | < | ||
+ | root:/> **cat out_voltage0_offset** | ||
+ | 0 | ||
+ | |||
+ | root:/> **echo -32000 > out_voltage0_offset** | ||
+ | root:/> **cat out_voltage0_offset** | ||
+ | -31752 | ||
+ | </ | ||
+ | |||
+ | ====== More Information ====== | ||
+ | |||
+ | {{page> |