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:uc-drivers:adxl355 [22 Mar 2022 10:28] – [ADXL355 IIO Device Configuration] Ramona Bolboacaresources:tools-software:uc-drivers:adxl355 [27 Jun 2023 10:37] (current) – [ADXL355 IIO Code Driver Documentation] Ramona Bolboaca
Line 1: Line 1:
 +====== ADXL355 - No-OS Driver ======
 +
 ===== Supported Devices ===== ===== Supported Devices =====
   * [[adi>ADXL355]]   * [[adi>ADXL355]]
Line 24: Line 26:
 The goal of ADI Microcontroller No-OS is to be able to provide reference projects for lower end processors, which can't run Linux, or aren't running a specific operating system, to help those customers using microcontrollers with ADI parts. ADI No-OS offers **generic drivers** which can be used as a base for any microcontroller platform and also **example projects** which are using these drivers on various microcontroller platforms.  The goal of ADI Microcontroller No-OS is to be able to provide reference projects for lower end processors, which can't run Linux, or aren't running a specific operating system, to help those customers using microcontrollers with ADI parts. ADI No-OS offers **generic drivers** which can be used as a base for any microcontroller platform and also **example projects** which are using these drivers on various microcontroller platforms. 
  
-For more information about ADI No-OS and supported microcontroller platforms see: [[:resources:no-os:overview ADI No-OS]]+For more information about ADI No-OS and supported microcontroller platforms see: [[:resources:no-os | no-OS]]
  
  
Line 70: Line 72:
 ==== ADXL355 Code Driver Documentation ==== ==== ADXL355 Code Driver Documentation ====
 Source code documentation for the driver is automatically generated using the Doxygen tool and it is available below: Source code documentation for the driver is automatically generated using the Doxygen tool and it is available below:
-  * [[http://analogdevicesinc.github.io/no-OS/adxl355_8h.html|ADXL355 Header file]] +  * [[http://analogdevicesinc.github.io/no-OS/doxygen/adxl355_8h.html|ADXL355 Header file]] 
-  * [[http://analogdevicesinc.github.io/no-OS/adxl355_8c.html|ADXL355 Source file]]+  * [[http://analogdevicesinc.github.io/no-OS/doxygen/adxl355_8c.html|ADXL355 Source file]]
  
  
Line 202: Line 204:
 ==== ADXL355 IIO Code Driver Documentation ==== ==== ADXL355 IIO Code Driver Documentation ====
 Source code documentation for the IIO driver is automatically generated using the Doxygen tool and it is available below: Source code documentation for the IIO driver is automatically generated using the Doxygen tool and it is available below:
-  * [[http://analogdevicesinc.github.io/no-OS/iio__adxl355_8h.html|ADXL355 IIO Header file]] +  * [[http://analogdevicesinc.github.io/no-OS/doxygen/iio__adxl355_8h.html|ADXL355 IIO Header file]] 
-  * [[http://analogdevicesinc.github.io/no-OS/iio__adxl355_8c.html|ADXL355 IIO Source file]]+  * [[http://analogdevicesinc.github.io/no-OS/doxygen/iio__adxl355_8c.html|ADXL355 IIO Source file]]
 ==== ADXL355 IIO Device Configuration ==== ==== ADXL355 IIO Device Configuration ====
 === Device Attributes === === Device Attributes ===
 ADXL355 IIO device does not have any device specific attributes. ADXL355 IIO device does not have any device specific attributes.
 === Device Channels === === Device Channels ===
-ADXL355 IIO device has 0 input channels and 4 output channels: 3 acceleration channels and 1 temperature channel.+ADXL355 IIO device has 0 output channels and 4 input channels: 3 acceleration channels and 1 temperature channel.
  
 == Acceleration channels == == Acceleration channels ==
Line 219: Line 221:
  
 The attributes are: The attributes are:
-  * calibbias  +  * calibbias - offset added to the axis after all other signal processing. The calibbias value will be applied as an offset to the raw value bits [19:4]. See formula bellow.  
-  * filter_high_pass_3db_frequency (shared) +  * filter_high_pass_3db_frequency (shared) - is the current setting for the high pass filter corner frequency. This value is common for all three acceleration channels and the value is influenced by the current sampling frequency (see table below). 
-  * filter_high_pass_3db_frequency_available (shared) +  * filter_high_pass_3db_frequency_available (shared) - is the list of available high pass filter corner frequency values. This list is common for all three acceleration channels and the values are influenced by the current sampling frequency (see table below). 
-  * raw +  * raw - is the raw acceleration value read from the device. 
-  * sampling_frequency (shared) +  * sampling_frequency (shared) - is the sampling frequency for acceleration data. This value is common for all three acceleration channels. 
-  * sampling_frequency_available (shared) +  * sampling_frequency_available (shared) - is the list of available sampling frequency values. This list is common for all three acceleration channels. 
-  * scale (shared)+  * scale (shared) - is the scale that has to be applied to the raw value in order to obtain the converted real value in m/s^2 (see formula below). It has a constant value equal to: **0.000038245**.
  
 +^ Sampling frequency (Hz) ^ High Pass Filter Corner Frequency available values (Hz) ||||||^
 +| 4000.000000  | 0.000000 | 9.880000 | 2.483360 | 0.621800 | 0.154480 | 0.038160 | 0.009520 |
 +| 2000.000000  | 0.000000 | 4.940000 | 1.241680 | 0.310900 | 0.077240 | 0.019080 | 0.004760 |
 +| 1000.000000  | 0.000000 | 2.470000 | 0.620840 | 0.155450 | 0.038620 | 0.009540 | 0.002380 |
 +| 500.000000   | 0.000000 | 1.235000 | 0.310420 | 0.077725 | 0.019310 | 0.004770 | 0.001190 | 
 +| 250.000000   | 0.000000 | 0.617500 | 0.155210 | 0.038862 | 0.009655 | 0.002385 | 0.000595 |
 +| 125.000000   | 0.000000 | 0.308750 | 0.077605 | 0.019431 | 0.004827 | 0.001192 | 0.000297 |
 +| 62.500000    | 0.000000 | 0.154375 | 0.038802 | 0.009715 | 0.002413 | 0.000596 | 0.000148 |
 +| 31.250000    | 0.000000 | 0.077187 | 0.019401 | 0.004857 | 0.001206 | 0.000298 | 0.000074 |
 +| 15.625000    | 0.000000 | 0.038593 | 0.009700 | 0.002428 | 0.000603 | 0.000149 | 0.000037 |
 +| 7.813000     | 0.000000 | 0.019298 | 0.004850 | 0.001214 | 0.000301 | 0.000074 | 0.000018 |
 +| 3.906000     | 0.000000 | 0.009647 | 0.002425 | 0.000607 | 0.000150 | 0.000037 | 0.000009 |
 +
 +
 +<code>
 +converted_accel [m/s^2] = (raw + calibbias << 4) * scale 
 +converted_accel [m/s^2] = (raw + calibbias << 4) * 0.000038245
 +</code>
  
 == Temperature channel == == Temperature channel ==
Line 233: Line 253:
  
 The channel has 3 attributes, as follows: The channel has 3 attributes, as follows:
-  * offset - is the offset that has to be applied to the raw value in order to obtain the converted real value in degrees Celsius (see formula below). It has a constant value equal to -2111.250000. +  * offset - is the offset that has to be applied to the raw value in order to obtain the converted real value in degrees Celsius (see formula below). It has a constant value equal to **-2111.250000**
-  * raw - is the raw value read from the device +  * raw - is the raw temperature value read from the device. 
-  * scale - is the scale that has to be applied to the raw value in order to obtain the converted real value in degrees Celsius (see formula below). It has a constant value equal to: -110.497238 +  * scale - is the scale that has to be applied to the raw value in order to obtain the converted real value in degrees Celsius (see formula below). It has a constant value equal to: **-110.497238**.
  
-<code>converted_temp = (raw + offset) * scale </code>+<code> 
 +converted_temp [degrees Celsius] = (raw + offset) * scale  
 +converted_temp [degrees Celsius] = (2111.25 - raw) * 110.497238  
 +</code>
  
  
Line 243: Line 266:
 The ADXL355 IIO devices driver supports the usage of a data buffer for reading purposes. The ADXL355 IIO devices driver supports the usage of a data buffer for reading purposes.
  
-=== Device triggers === 
 ==== ADXL355 IIO Driver Initialization Example ==== ==== ADXL355 IIO Driver Initialization Example ====
 <code> <code>
resources/tools-software/uc-drivers/adxl355.1647941289.txt.gz · Last modified: 22 Mar 2022 10:28 by Ramona Bolboaca