Wiki

Differences

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

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
resources:tools-software:linux-drivers:iio-inertial-measurement-units:adis16400 [05 Oct 2012 18:10] – [More Information] Lars-Peter Clausenresources:tools-software:linux-drivers:iio-inertial-measurement-units:adis16400 [23 Feb 2017 13:33] (current) Lars-Peter Clausen
Line 4: Line 4:
  
   * [[adi>ADIS16300]]   * [[adi>ADIS16300]]
 +  * [[adi>ADIS16305]] (Linux v4.3+)
   * [[adi>ADIS16334]]   * [[adi>ADIS16334]]
   * [[adi>ADIS16350]]   * [[adi>ADIS16350]]
Line 12: Line 13:
   * [[adi>ADIS16364]]   * [[adi>ADIS16364]]
   * [[adi>ADIS16365]]   * [[adi>ADIS16365]]
 +  * [[adi>ADIS16367]] (Linux v4.3+)
   * [[adi>ADIS16400]]   * [[adi>ADIS16400]]
   * [[adi>ADIS16405]]   * [[adi>ADIS16405]]
 +  * [[adi>ADIS16445]] (Linux v4.3+)
   * [[adi>ADIS16448]]   * [[adi>ADIS16448]]
  
Line 19: Line 22:
  
   * [[adi>EVAL-ADIS16300|ADIS16300/PCBZ]]   * [[adi>EVAL-ADIS16300|ADIS16300/PCBZ]]
 +  * [[adi>EVAL-ADIS16300|ADIS16305/PCBZ]]
   * [[adi>EVAL-ADIS16334|ADIS16334/PCBZ]]   * [[adi>EVAL-ADIS16334|ADIS16334/PCBZ]]
   * [[adi>EVAL-ADIS16360|ADIS16360/PCBZ]]   * [[adi>EVAL-ADIS16360|ADIS16360/PCBZ]]
Line 24: Line 28:
   * [[adi>EVAL-ADIS16364|ADIS16364/PCBZ]]   * [[adi>EVAL-ADIS16364|ADIS16364/PCBZ]]
   * [[adi>EVAL-ADIS16365|ADIS16365/PCBZ]]   * [[adi>EVAL-ADIS16365|ADIS16365/PCBZ]]
 +  * [[adi>EVAL-ADIS16367|ADIS16367/PCBZ]]
   * [[adi>EVAL-ADIS16400|ADIS16400/PCBZ]]   * [[adi>EVAL-ADIS16400|ADIS16400/PCBZ]]
   * [[adi>EVAL-ADIS16405|ADIS16405/PCBZ]]   * [[adi>EVAL-ADIS16405|ADIS16405/PCBZ]]
 +  * [[adi>EVAL-ADIS16445|ADIS16445/PCBZ]]
   * [[adi>EVAL-ADIS16448|ADIS16448/PCBZ]]   * [[adi>EVAL-ADIS16448|ADIS16448/PCBZ]]
 +
 ===== Description ===== ===== Description =====
  
Line 37: Line 44:
 ===== Status ===== ===== Status =====
  
- Source   Mainlined?  +^ Source ^ Mainlined? ^ 
-| [[git.linux.org>drivers/staging/iio/imu/adis16400_core.c|git]] |  [[git.linux.org>drivers/staging/iio/imu/adis16400_core.c|Yes]]  |+| [[git.linux.org>drivers/iio/imu/adis16400_core.c|git]] | [[git.linux.org>drivers/iio/imu/adis16400_core.c|Yes]]  |
 ===== Files ===== ===== Files =====
  
 ^ Function ^ File ^ ^ Function ^ File ^
-| driver  | [[staging.kernel.org>drivers/staging/iio/imu/adis16400_core.c]] | +| driver  | [[staging.kernel.org>drivers/iio/imu/adis16400_core.c]] | 
-| driver  | [[staging.kernel.org>drivers/staging/iio/imu/adis16400_ring.c]] | +| driver  | [[staging.kernel.org>drivers/iio/imu/adis16400_ring.c]] | 
-| driver  | [[staging.kernel.org>drivers/staging/iio/imu/adis16400_trigger.c]] | +| driver  | [[staging.kernel.org>drivers/iio/imu/adis16400_trigger.c]] | 
-| include | [[staging.kernel.org>drivers/staging/iio/imu/adis16400.h]] |+| include | [[staging.kernel.org>drivers/iio/imu/adis16400.h]] |
  
 {{page>software/linux/docs/platform_and_bus_model#Declaring SPI slave devices&firstseconly&noeditbtn}} {{page>software/linux/docs/platform_and_bus_model#Declaring SPI slave devices&firstseconly&noeditbtn}}
Line 89: Line 96:
 "make qconfig") "make qconfig")
  
-<note>+<WRAP round help>
 The ADIS16400 Driver depends on **CONFIG_SPI** The ADIS16400 Driver depends on **CONFIG_SPI**
-</note>+</WRAP>
  
 <code> <code>
 Linux Kernel Configuration Linux Kernel Configuration
  Device Drivers  --->  Device Drivers  --->
- [*] Staging drivers  ---> + <*>     Industrial I/O support ---> 
- <*>     Industrial I/O support ---> +     --- Industrial I/O support 
-     --- Industrial I/O support +     *** Inertial measurement units *** 
-     -*-   Enable ring buffer support within IIO +     [--snip--]
-     -*-     Industrial I/O lock free software ring +
-     -*-   Enable triggered sampling support +
- +
-           *** Inertial measurement units *** +
-     [--snip--] +
      <*>   Analog Devices ADIS16400 and similar IMU SPI driver      <*>   Analog Devices ADIS16400 and similar IMU SPI driver
- +     [--snip--]
-     [--snip--]+
  
 </code> </code>
  
 ====== Hardware configuration ====== ====== Hardware configuration ======
- 
  
 ====== Driver testing ====== ====== Driver testing ======
Line 119: Line 118:
 {{page>software:linux:docs:iio:iio_snippets#iio device files&noheader&firstseconly&noeditbtn}} {{page>software:linux:docs:iio:iio_snippets#iio device files&noheader&firstseconly&noeditbtn}}
  
-<box 100% green|shell prompt running on the target>+<WRAP box bggreen><wrap info>This specifies any shell prompt running on the target</wrap>
 <xterm> <xterm>
 root:/> **cd /sys/bus/iio/devices/** root:/> **cd /sys/bus/iio/devices/**
Line 165: Line 164:
 -rw-r--r--    1 root     root          4096 Jan  4 00:03 uevent -rw-r--r--    1 root     root          4096 Jan  4 00:03 uevent
 root:/sys/devices/platform/bfin-spi.0/spi0.1/iio:device0> root:/sys/devices/platform/bfin-spi.0/spi0.1/iio:device0>
-</xterm></box>+</xterm></WRAP>
  
-=== Show device name ===+===== ADIS16400 device attributes =====
  
-<box 100% green|shell prompt running on the target>+For a detailed description please see: 
 +[[staging.kernel.org>Documentation/ABI/testing/sysfs-bus-iio]] 
 + 
 +^ 3-Axis Accelerometer related device files ^ Description ^ 
 +| in_accel_filter_low_pass_3db_frequency | Bandwidth for the accelerometer channels. | 
 +| in_accel_scale | Scale for the accelerometer channels. | 
 +| in_accel_x_calibbias | Calibration offset for the X-axis accelerometer channel. | 
 +| in_accel_x_raw | Raw X-axis accelerometer channel value. | 
 +| in_accel_y_calibbias | Calibration offset for the Y-axis accelerometer channel. | 
 +| in_accel_y_raw | Raw Y-axis accelerometer channel value. | 
 +| in_accel_z_calibbias | Calibration offset for the Z-axis accelerometer channel. | 
 +| in_accel_z_raw | Raw Z-axis accelerometer channel value. | 
 +^ 3-Axis Gyro related device files ^ Description ^ 
 +| in_anglvel_filter_low_pass_3db_frequency | Bandwidth for the gyroscope channels. | 
 +| in_anglvel_scale | Scale for the gyroscope channels. | 
 +| in_anglvel_x_calibbias | Calibration offset for the X-axis gyroscope channel. | 
 +| in_anglvel_x_raw | Raw X-axis gyroscope channel value. | 
 +| in_anglvel_y_calibbias | Calibration offset for the Y-axis gyroscope channel. | 
 +| in_anglvel_y_raw | Raw Y-axis gyroscope channel value. | 
 +| in_anglvel_z_calibbias | Calibration offset for the Z-axis gyroscope channel. | 
 +| in_anglvel_z_raw | Raw Z-axis gyroscope channel value. | 
 +^ 3-Axis Magnetometer related device files ^ Description ^ 
 +| in_magn_filter_low_pass_3db_frequency | Bandwidth for the magnetometer channels. | 
 +| in_magn_scale | Scale for the magnetometer channels. | 
 +| in_magn_x_raw | Raw X-axis magnetometer channel value. | 
 +| in_magn_y_raw | Raw Y-axis magnetometer channel value. | 
 +| in_magn_z_raw | Raw Z-axis magnetometer channel value. | 
 +^ Barometric pressure sensor related files ^ Description ^ 
 +| in_pressure_raw | Raw barometric pressure sensor channel value. | 
 +| in_pressure_scale | Scale for the barometric pressure sensor channel. | 
 +^ Temperature sensor related files ^ Description ^ 
 +| in_temp0_offset | Offset for temperature sensor channel. | 
 +| in_temp0_raw | Raw temperature channel value. | 
 +| in_temp0_scale | Scale for the temperature sensor channel. | 
 +^ Power supply monitor related files ^ Description ^ 
 +| in_voltage0_supply_raw | Raw power supply monitor channel value. | 
 +| in_voltage0_supply_scale | Scale for the power supply monitor channel. | 
 +^ Auxiliary ADC related files ^ Description ^ 
 +| in_voltage1_raw | Raw auxiliary ADC channel value. | 
 +| in_voltage1_scale | Scale for the auxiliary ADC channel. | 
 +^ Miscellaneous device files ^ Description ^ 
 +| name | Name of the IIO device. | 
 +| sampling_frequency | Currently selected sample rate. | 
 + 
 +==== Show device name ==== 
 + 
 +<WRAP box bggreen><wrap info>This specifies any shell prompt running on the target</wrap>
 <xterm> <xterm>
 root:/sys/devices/platform/bfin-spi.0/spi0.1/iio:device0> **cat name** root:/sys/devices/platform/bfin-spi.0/spi0.1/iio:device0> **cat name**
 adis16400 adis16400
-</xterm></box>+</xterm></WRAP>
  
-=== ADIS16400 device attributes ===+==== Set sampling frequency ====
  
-For detailed description please see+The sampling frequency of the device can be set by writing the desired value to the ''sampling_frequency'' file. The driver will automatically round up to the nearest supported sampling frequency. 
-[[staging.kernel.org>Documentation/ABI/testing/sysfs-bus-iio]]+ 
 +**Example:** 
 +<WRAP box bggreen><wrap info>This specifies any shell prompt running on the target</wrap> 
 +<xterm> 
 +root:/sys/devices/platform/bfin-spi.0/spi0.1/iio:device0> **cat sampling_frequency** 
 +819.202 
 +root:/sys/devices/platform/bfin-spi.0/spi0.1/iio:device0> **echo 546 > sampling_frequency** 
 +root:/sys/devices/platform/bfin-spi.0/spi0.1/iio:device0> **cat sampling_frequency** 
 +546.135 
 +</xterm></WRAP> 
 + 
 +==== Show channel value ==== 
 + 
 +A channel value can be read from its ''_raw'' attribute. The value returned by the ''_raw'' attribute is the raw value as reported by the device. To get the processed value of the channel in standardized unit add the channels ''_offset'' attribute to the ''_raw'' value and multiply the result by ''_scale'' attribute. If no ''_offset'' attribute is present assume 0 for the offset. 
 + 
 +''processed value = (raw + offset) * scale'' 
 + 
 +The units by the IIO framework are
 +  * Acceleration: Meter per Second squared 
 +  * Angular velocity: Rad per second 
 +  * Pressure: kilo Pascal 
 +  * Voltage: milli Volts 
 +  * Temperature: milli-degree Celsius 
 + 
 +**Example:** 
 +<WRAP box bggreen><wrap info>This specifies any shell prompt running on the target</wrap> 
 +<xterm> 
 +root:/sys/devices/platform/bfin-spi.0/spi0.1/iio:device0**cat in_accel_z_raw** 
 +1202 
 +root:/sys/devices/platform/bfin-spi.0/spi0.1/iio:device0> **cat in_accel_scale** 
 +0.008168 
 +</xterm></WRAP> 
 + 
 +''Z-axis acceleration = in_accel_z_raw * in_accel_scale = 1202 * 0.008168 m/s^2 = 9.81 m/s^2'' 
 + 
 +==== Set channel bandwidth ==== 
 + 
 +The channels bandwidth can be set by writing the desired value to the channels ''_filter_low_pass_3db_frequency'' attribute. The driver will automatically round up to the nearest supported bandwidth. 
 + 
 +Note that all channels share the same low pass filter frequency so changing it for one channel will change it for all other channels as well. Also note that the low pass filter frequency depends on the sampling frequency, so changing the sampling frequency will scale the low pass filter frequency accordingly. E.g. reducing the sampling frequency by a factor of two will also reduce the bandwidth by a factor of two. 
 + 
 +**Example:** 
 +<WRAP box bggreen><wrap info>This specifies any shell prompt running on the target</wrap> 
 +<xterm> 
 +root:/sys/devices/platform/bfin-spi.0/spi0.1/iio:device0> **cat in_anglvel_filter_low_pass_3db_frequency** 
 +409.600000 
 +root:/sys/devices/platform/bfin-spi.0/spi0.1/iio:device0> **echo 150 > in_anglvel_filter_low_pass_3db_frequency** 
 +root:/sys/devices/platform/bfin-spi.0/spi0.1/iio:device0> **cat in_anglvel_filter_low_pass_3db_frequency** 
 +163.840400 
 +</xterm></WRAP>
  
-^ 3-Axis Accelerometer related device files ^ 
-| in_accel_filter_low_pass_3db_frequency | 
-| in_accel_scale | 
-| in_accel_x_calibbias | 
-| in_accel_x_raw | 
-| in_accel_y_calibbias | 
-| in_accel_y_raw | 
-| in_accel_z_calibbias | 
-| in_accel_z_raw | 
-^ 3-Axis Gyro related device files ^ 
-| in_anglvel_filter_low_pass_3db_frequency | 
-| in_anglvel_scale | 
-| in_anglvel_x_calibbias | 
-| in_anglvel_x_raw | 
-| in_anglvel_y_calibbias | 
-| in_anglvel_y_raw | 
-| in_anglvel_z_calibbias | 
-| in_anglvel_z_raw | 
-^ 3-Axis Magnetometer related device files ^ 
-| in_magn_filter_low_pass_3db_frequency | 
-| in_magn_scale | 
-| in_magn_x_raw | 
-| in_magn_y_raw | 
-| in_magn_z_raw | 
-^ Barometric pressure sensor related files ^ 
-| in_pressure_raw | 
-| in_pressure_scale | 
-^ Temperature related files ^ 
-| in_temp0_offset | 
-| in_temp0_raw | 
-| in_temp0_scale | 
-^ Power supply monitor related files ^ 
-| in_voltage0_supply_raw | 
-| in_voltage0_supply_scale | 
-^ Auxiliary ADC related files ^ 
-| in_voltage1_raw | 
-| in_voltage1_scale | 
-^ Miscellaneous device files ^ 
-| name | 
-| sampling_frequency | 
 ===== Trigger management ===== ===== Trigger management =====
  
-<note>+<WRAP round help>
 This driver only supports it's own default trigger source **adis16400-dev0** This driver only supports it's own default trigger source **adis16400-dev0**
-</note>+</WRAP>
  
-<box 100% green|shell prompt running on the target>+<WRAP box bggreen><wrap info>This specifies any shell prompt running on the target</wrap>
 <xterm> <xterm>
 root:/sys/devices/platform/bfin-spi.0/spi0.1/iio:device0> **cat trigger/current_trigger** root:/sys/devices/platform/bfin-spi.0/spi0.1/iio:device0> **cat trigger/current_trigger**
 adis16400-dev0 adis16400-dev0
-</xterm></box>+</xterm></WRAP>
  
 ===== Buffer management ===== ===== Buffer management =====
  
-<box 100% green|shell prompt running on the target>+<WRAP box bggreen><wrap info>This specifies any shell prompt running on the target</wrap>
 <xterm> <xterm>
 root:/sys/devices/platform/bfin-spi.0/spi0.1/iio:device0/buffer> **ls** root:/sys/devices/platform/bfin-spi.0/spi0.1/iio:device0/buffer> **ls**
-**bytes_per_datum**  **enable**           **length** +**enable**           **length** 
-</xterm></box>+</xterm></WRAP>
  
 {{page>software:linux:docs:iio:iio_snippets#Buffer management&noheader&firstseconly&noeditbtn}} {{page>software:linux:docs:iio:iio_snippets#Buffer management&noheader&firstseconly&noeditbtn}}
  
-<box 100% green|shell prompt running on the target>+<WRAP box bggreen><wrap info>This specifies any shell prompt running on the target</wrap>
 <xterm> <xterm>
 root:/sys/devices/platform/bfin-spi.0/spi0.1/iio:device0/scan_elements>**ls** root:/sys/devices/platform/bfin-spi.0/spi0.1/iio:device0/scan_elements>**ls**
Line 259: Line 313:
 in_gyro_y_en              in_magn_z_index           in_voltage1_type in_gyro_y_en              in_magn_z_index           in_voltage1_type
 root:/sys/devices/platform/bfin-spi.0/spi0.1/iio:device0/scan_elements> root:/sys/devices/platform/bfin-spi.0/spi0.1/iio:device0/scan_elements>
-</xterm></box>+</xterm></WRAP>
  
 {{page>software:linux:docs:iio:iio_snippets#Typical ADC scan elements&noheader&firstseconly&noeditbtn}} {{page>software:linux:docs:iio:iio_snippets#Typical ADC scan elements&noheader&firstseconly&noeditbtn}}
Line 273: Line 327:
   * [[/resources/eval/user-guides/inertial-mems/imu/adis1636x|ADIS1636X Evaluation on the EVAL-ADIS]]   * [[/resources/eval/user-guides/inertial-mems/imu/adis1636x|ADIS1636X Evaluation on the EVAL-ADIS]]
   * [[/resources/eval/user-guides/inertial-mems/imu/adis16448|ADIS1644X Evaluation on the EVAL-ADIS]]   * [[/resources/eval/user-guides/inertial-mems/imu/adis16448|ADIS1644X Evaluation on the EVAL-ADIS]]
- 
resources/tools-software/linux-drivers/iio-inertial-measurement-units/adis16400.1349453408.txt.gz · Last modified: 05 Oct 2012 18:10 by Lars-Peter Clausen