This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
resources:tools-software:linux-drivers:iio-adc:ad7192 [16 Nov 2012 12:56] – [Reference Circuits] add missing cns Lars-Peter Clausen | resources:tools-software:linux-drivers:iio-adc:ad7192 [08 Feb 2019 14:51] (current) – [Device tree support] Mircea Caprioru | ||
---|---|---|---|
Line 5: | Line 5: | ||
* [[adi> | * [[adi> | ||
* [[adi> | * [[adi> | ||
+ | * [[adi> | ||
* [[adi> | * [[adi> | ||
* [[adi> | * [[adi> | ||
- | |||
===== Reference Circuits ===== | ===== Reference Circuits ===== | ||
Line 13: | Line 13: | ||
* [[adi> | * [[adi> | ||
* [[adi> | * [[adi> | ||
+ | * [[adi> | ||
* [[adi> | * [[adi> | ||
+ | * [[adi> | ||
+ | * [[adi> | ||
+ | |||
===== Evaluation Boards ===== | ===== Evaluation Boards ===== | ||
* [[adi> | * [[adi> | ||
* [[adi> | * [[adi> | ||
+ | * [[adi> | ||
* [[adi> | * [[adi> | ||
* [[adi> | * [[adi> | ||
Line 30: | Line 35: | ||
===== Status ===== | ===== Status ===== | ||
- | ^ Source | + | ^ Source ^ Mainlined? ^ |
- | | [[git.linux.org> | + | | [[git.linux.org> |
===== Files ===== | ===== Files ===== | ||
Line 128: | Line 133: | ||
</ | </ | ||
+ | ====== Device tree support ====== | ||
+ | Device tree is the new method for describing non-discoverable hardware in Linux. This replaces former structure based method. For configuring a device using this drivers please follow the example bellow: | ||
+ | |||
+ | < | ||
+ | /dts-v1/; | ||
+ | /plugin/; | ||
+ | |||
+ | / { | ||
+ | |||
+ | fragment@0 { | ||
+ | target-path = "/"; | ||
+ | dvdd: fixedregulator@0 { | ||
+ | compatible = " | ||
+ | regulator-name = " | ||
+ | regulator-min-microvolt = < | ||
+ | regulator-max-microvolt = < | ||
+ | regulator-boot-on; | ||
+ | }; | ||
+ | }; | ||
+ | |||
+ | fragment@1 { | ||
+ | target-path = "/"; | ||
+ | avdd: fixedregulator@1 { | ||
+ | compatible = " | ||
+ | regulator-name = " | ||
+ | regulator-min-microvolt = < | ||
+ | regulator-max-microvolt = < | ||
+ | regulator-boot-on; | ||
+ | }; | ||
+ | }; | ||
+ | |||
+ | fragment@3 { | ||
+ | target = <& | ||
+ | # | ||
+ | # | ||
+ | status = " | ||
+ | |||
+ | ad7190@0 { | ||
+ | compatible = " | ||
+ | reg = <0>; | ||
+ | spi-max-frequency = < | ||
+ | spi-cpol; | ||
+ | spi-cpha; | ||
+ | # | ||
+ | interrupts = <25 0x2>; | ||
+ | interrupt-parent = <& | ||
+ | dvdd-supply = <& | ||
+ | avdd-supply = <& | ||
+ | |||
+ | adi, | ||
+ | adi, | ||
+ | adi, | ||
+ | adi, | ||
+ | adi, | ||
+ | adi, | ||
+ | adi, | ||
+ | adi, | ||
+ | adi, | ||
+ | }; | ||
+ | }; | ||
+ | }; | ||
+ | </ | ||
+ | |||
+ | <note important> | ||
+ | </ | ||
====== Adding Linux driver support ====== | ====== Adding Linux driver support ====== | ||
Line 133: | Line 203: | ||
"make qconfig" | "make qconfig" | ||
- | <note> | + | <WRAP round help> |
The AD7192 Driver depends on **CONFIG_SPI** | The AD7192 Driver depends on **CONFIG_SPI** | ||
- | </note> | + | </WRAP> |
< | < | ||
Line 155: | Line 225: | ||
</ | </ | ||
+ | |||
====== Hardware configuration ====== | ====== Hardware configuration ====== | ||
Line 163: | Line 234: | ||
{{page> | {{page> | ||
- | < | + | <WRAP box bggreen>< |
< | < | ||
root:/> **cd / | root:/> **cd / | ||
Line 194: | Line 265: | ||
-rw-r--r-- | -rw-r--r-- | ||
root:/ | root:/ | ||
- | </ | + | </ |
=== Show device name === | === Show device name === | ||
- | < | + | <WRAP box bggreen>< |
< | < | ||
root:/ | root:/ | ||
ad7192 | ad7192 | ||
- | </ | + | </ |
=== Set sampling frequency / update rate === | === Set sampling frequency / update rate === | ||
- | < | + | <WRAP box bggreen>< |
< | < | ||
root:/ | root:/ | ||
Line 214: | Line 285: | ||
50 | 50 | ||
root:/ | root:/ | ||
- | </ | + | </ |
=== Show available scales for differential input channels === | === Show available scales for differential input channels === | ||
Line 226: | Line 297: | ||
Setting these directly influences the ADC input range, by altering the GAIN amplifier. | Setting these directly influences the ADC input range, by altering the GAIN amplifier. | ||
- | < | + | <WRAP box bggreen>< |
< | < | ||
root:/ | root:/ | ||
0.000393390 0.000196690 0.000098340 0.000049170 0.000024580 0.000012290 0.000006140 0.000003070 | 0.000393390 0.000196690 0.000098340 0.000049170 0.000024580 0.000012290 0.000006140 0.000003070 | ||
- | </ | + | </ |
=== Show available scales for pseudo-differential input channels === | === Show available scales for pseudo-differential input channels === | ||
Line 243: | Line 314: | ||
Setting these directly influences the ADC input range, by altering the GAIN amplifier. | Setting these directly influences the ADC input range, by altering the GAIN amplifier. | ||
- | < | + | <WRAP box bggreen>< |
< | < | ||
root:/ | root:/ | ||
0.000393390 0.000196690 0.000098340 0.000049170 0.000024580 0.000012290 0.000006140 0.000003070 | 0.000393390 0.000196690 0.000098340 0.000049170 0.000024580 0.000012290 0.000006140 0.000003070 | ||
- | </ | + | </ |
=== Set scale for differential input channels === | === Set scale for differential input channels === | ||
Line 255: | Line 326: | ||
If the written scale differs from the current scale. The driver performs full and zero offset calibration on all differential input channels. | If the written scale differs from the current scale. The driver performs full and zero offset calibration on all differential input channels. | ||
- | < | + | <WRAP box bggreen>< |
< | < | ||
root:/ | root:/ | ||
Line 262: | Line 333: | ||
root:/ | root:/ | ||
0.000196690 | 0.000196690 | ||
- | </ | + | </ |
=== Show channel in_voltage1 measurement === | === Show channel in_voltage1 measurement === | ||
Line 278: | Line 349: | ||
| AIN4 - AINCOM | in_voltage4_raw | | | AIN4 - AINCOM | in_voltage4_raw | | ||
- | < | + | <WRAP box bggreen>< |
< | < | ||
root:/ | root:/ | ||
-1 | -1 | ||
- | </ | + | </ |
**U** = // | **U** = // | ||
Line 291: | Line 362: | ||
Raw unscaled voltage measurement on channel in_voltage1-in_voltage2 | Raw unscaled voltage measurement on channel in_voltage1-in_voltage2 | ||
- | < | + | <WRAP box bggreen>< |
< | < | ||
root:/ | root:/ | ||
-1 | -1 | ||
- | </ | + | </ |
**U** = // | **U** = // | ||
Line 305: | Line 376: | ||
- | < | + | <WRAP box bggreen>< |
< | < | ||
root:/ | root:/ | ||
-175 | -175 | ||
- | </ | + | </ |
=== Bride power-down switch control === | === Bride power-down switch control === | ||
Line 316: | Line 387: | ||
Writing 1 closes the bridge switch. | Writing 1 closes the bridge switch. | ||
- | < | + | <WRAP box bggreen>< |
< | < | ||
root:/ | root:/ | ||
Line 322: | Line 393: | ||
1 | 1 | ||
root:/ | root:/ | ||
- | </ | + | </ |
=== AC excitation control (AD7195 only) === | === AC excitation control (AD7195 only) === | ||
Line 329: | Line 400: | ||
Writing 1 enables AC excitation on the AD7195 ACX strobes. | Writing 1 enables AC excitation on the AD7195 ACX strobes. | ||
- | < | + | <WRAP box bggreen>< |
< | < | ||
root:/ | root:/ | ||
Line 335: | Line 406: | ||
1 | 1 | ||
root:/ | root:/ | ||
- | </ | + | </ |
===== Trigger management ===== | ===== Trigger management ===== | ||
- | <note> | + | <WRAP round help> |
This driver only supports it's own default trigger source **ad7192-dev0** | This driver only supports it's own default trigger source **ad7192-dev0** | ||
- | </note> | + | </WRAP> |
- | < | + | <WRAP box bggreen>< |
< | < | ||
root:/ | root:/ | ||
ad7192-dev0 | ad7192-dev0 | ||
- | </ | + | </ |
===== Buffer management ===== | ===== Buffer management ===== | ||
- | < | + | <WRAP box bggreen>< |
< | < | ||
root:/ | root:/ | ||
enable | enable | ||
- | </ | + | </ |
{{page> | {{page> | ||
- | < | + | <WRAP box bggreen>< |
< | < | ||
root:/ | root:/ | ||
Line 371: | Line 442: | ||
in_voltage2-in_voltage2_shorted_type | in_voltage2-in_voltage2_shorted_type | ||
root:/ | root:/ | ||
- | </ | + | </ |
{{page> | {{page> |