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-inertial-measurement-units:adis16400 [05 Oct 2012 18:10] – [More Information] Lars-Peter Clausen | resources:tools-software:linux-drivers:iio-inertial-measurement-units:adis16400 [23 Feb 2017 13:33] (current) – Lars-Peter Clausen | ||
---|---|---|---|
Line 4: | Line 4: | ||
* [[adi> | * [[adi> | ||
+ | * [[adi> | ||
* [[adi> | * [[adi> | ||
* [[adi> | * [[adi> | ||
Line 12: | Line 13: | ||
* [[adi> | * [[adi> | ||
* [[adi> | * [[adi> | ||
+ | * [[adi> | ||
* [[adi> | * [[adi> | ||
* [[adi> | * [[adi> | ||
+ | * [[adi> | ||
* [[adi> | * [[adi> | ||
Line 19: | Line 22: | ||
* [[adi> | * [[adi> | ||
+ | * [[adi> | ||
* [[adi> | * [[adi> | ||
* [[adi> | * [[adi> | ||
Line 24: | Line 28: | ||
* [[adi> | * [[adi> | ||
* [[adi> | * [[adi> | ||
+ | * [[adi> | ||
* [[adi> | * [[adi> | ||
* [[adi> | * [[adi> | ||
+ | * [[adi> | ||
* [[adi> | * [[adi> | ||
+ | |||
===== Description ===== | ===== Description ===== | ||
Line 37: | Line 44: | ||
===== Status ===== | ===== Status ===== | ||
- | ^ Source | + | ^ Source ^ Mainlined? ^ |
- | | [[git.linux.org> | + | | [[git.linux.org> |
===== Files ===== | ===== Files ===== | ||
^ Function ^ File ^ | ^ Function ^ File ^ | ||
- | | driver | + | | driver |
- | | driver | + | | driver |
- | | driver | + | | driver |
- | | include | [[staging.kernel.org> | + | | include | [[staging.kernel.org> |
{{page> | {{page> | ||
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> |
< | < | ||
Linux Kernel Configuration | Linux Kernel Configuration | ||
Device Drivers | Device Drivers | ||
- | [*] Staging drivers | + | < |
- | < | + | |
- | | + | |
- | -*- | + | |
- | -*- | + | |
- | -*- | + | |
- | + | ||
- | | + | |
- | | + | |
< | < | ||
- | + | [--snip--] | |
- | [--snip--] | + | |
</ | </ | ||
====== Hardware configuration ====== | ====== Hardware configuration ====== | ||
- | |||
====== Driver testing ====== | ====== Driver testing ====== | ||
Line 119: | Line 118: | ||
{{page> | {{page> | ||
- | < | + | <WRAP box bggreen>< |
< | < | ||
root:/> **cd / | root:/> **cd / | ||
Line 165: | Line 164: | ||
-rw-r--r-- | -rw-r--r-- | ||
root:/ | root:/ | ||
- | </ | + | </ |
- | === Show device | + | ===== ADIS16400 |
- | < | + | For a detailed description please see: |
+ | [[staging.kernel.org> | ||
+ | |||
+ | ^ 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>< | ||
< | < | ||
root:/ | root:/ | ||
adis16400 | adis16400 | ||
- | </ | + | </ |
- | === ADIS16400 device attributes | + | ==== Set sampling frequency ==== |
- | For a detailed description please see: | + | The sampling frequency of the device can be set by writing the desired value to the '' |
- | [[staging.kernel.org>Documentation/ABI/testing/sysfs-bus-iio]] | + | |
+ | **Example: | ||
+ | <WRAP box bggreen>< | ||
+ | < | ||
+ | root:/ | ||
+ | 819.202 | ||
+ | root:/ | ||
+ | root:/ | ||
+ | 546.135 | ||
+ | </ | ||
+ | |||
+ | ==== Show channel value ==== | ||
+ | |||
+ | A channel value can be read from its '' | ||
+ | |||
+ | '' | ||
+ | |||
+ | The units by the IIO framework are: | ||
+ | * Acceleration: | ||
+ | * Angular velocity: Rad per second | ||
+ | * Pressure: kilo Pascal | ||
+ | * Voltage: milli Volts | ||
+ | * Temperature: | ||
+ | |||
+ | **Example: | ||
+ | <WRAP box bggreen>< | ||
+ | < | ||
+ | root:/ | ||
+ | 1202 | ||
+ | root:/sys/devices/platform/ | ||
+ | 0.008168 | ||
+ | </ | ||
+ | |||
+ | '' | ||
+ | |||
+ | ==== Set channel bandwidth ==== | ||
+ | |||
+ | The channels bandwidth can be set by writing the desired value to the channels '' | ||
+ | |||
+ | 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>< | ||
+ | < | ||
+ | root:/ | ||
+ | 409.600000 | ||
+ | root:/ | ||
+ | root:/ | ||
+ | 163.840400 | ||
+ | </ | ||
- | ^ 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> |
- | < | + | <WRAP box bggreen>< |
< | < | ||
root:/ | root:/ | ||
adis16400-dev0 | adis16400-dev0 | ||
- | </ | + | </ |
===== Buffer management ===== | ===== Buffer management ===== | ||
- | < | + | <WRAP box bggreen>< |
< | < | ||
root:/ | root:/ | ||
- | **bytes_per_datum** | + | **enable** |
- | </ | + | </ |
{{page> | {{page> | ||
- | < | + | <WRAP box bggreen>< |
< | < | ||
root:/ | root:/ | ||
Line 259: | Line 313: | ||
in_gyro_y_en | in_gyro_y_en | ||
root:/ | root:/ | ||
- | </ | + | </ |
{{page> | {{page> | ||
Line 273: | Line 327: | ||
* [[/ | * [[/ | ||
* [[/ | * [[/ | ||
- |