Post Go back to editing

ADIS16488 & EVAL-ADISIMU1-RPIZ Issues with buffered capture

Thread Summary

The user encountered issues with buffered data acquisition on an ADIS16488 IMU connected to a Raspberry Pi running Kuiper Linux. The solution involved associating the device with a trigger, enabling specific scan elements, and activating the buffer. The ADI IIO Oscilloscope and iio_readdev commands were then able to capture and display the data correctly. The DRDY interrupt was confirmed to be working, but initial buffer allocation issues were resolved by following the provided steps.
AI Generated Content
Category: Hardware
Product Number: ADIS16488

Im using the ADIS16488 with an EVAL-ADISIMU1-RPIZ connected to a Raspberry Pi running latest Kuiper Linux to collect data from the sensor. I'm having some issues with buffered data acquisition. Any attempts I've made to read buffered data using the ADI IIO Oscilloscope application, or by directly triggering the buffer manually results in an invalid argument error. Directly polling channel values through the file system using cat seems to be working correctly.

dtoverlay=adis16480,device=adis16488

Observed B​ehavior:
  • The IMU is detected correctly by the IIO subsystem.
  • All expected channels (accelerometer, gyroscope, magnetometer, pressure, etc.) are present.
  • The ADI IIO Oscilloscope Text Monitor updates continuously and displays valid live sensor data.
  • Reading channel values directly through sysfs also works correctly
  • The Graph tab in the ADI IIO Oscilloscope does not acquire data. Pressing Collect results in: Error: Unable to create buffer: Invalid argument
  • Using iio_readdev also fails with: Error: Unable to create buffer: Invalid argument
  • The device exposes a scan_elements directory containing the expected scan channels (in_accel_*, in_anglvel_*, etc.).
  • current_trigger is empty:
    cat /sys/bus/iio/devices/iio:device0/trigger/current_trigger
    returns no value.
  • Attempting to enable buffered capture manually also fails with: error invalid argument
    echo 1 | sudo tee .../scan_elements/in_anglvel_x_en echo 1 | sudo tee .../buffer/enable
Parents
  • Hi Choggard,

    Please follow the steps below to capture buffered data.

    Note: You will need sudo privileges to perform these operations. Unless it has been changed, the default sudo password is 'analog'.

    1. Associate trigger0 (adis16488-dev0) with the current trigger of device0:

    sudo sh -c 'echo adis16488-dev0 > /sys/bus/iio/devices/iio:device0/trigger/current_trigger'

    2. Verify that the trigger has been correctly linked before proceeding:

    cat /sys/bus/iio/devices/iio:device0/trigger/current_trigger

    3. Enable the scan elements corresponding to the channels you are interested in. The buffer contents will depend on the enabled scan elements. As an example, the command below enables the Z-axis accelerometer channel:

    sudo sh -c 'echo 1 > /sys/bus/iio/devices/iio:device0/buffer0/in_accel_z_en'

    4. Enable the buffer

    sudo sh -c 'echo 1 > /sys/bus/iio/devices/iio:device0/buffer0/enable'

    5. Start data streaming using iio_readdev:

    sudo iio_readdev adis16488

    The following Analog Devices Wiki page provides additional information about the iio_readdev userspace utility and its syntax:iio_readdev [Analog Devices Wiki]

    This will stream the captured data directly to the console. If you would like to save the output to a file, you can redirect it as follows (the example below saves it to the /tmp directory, but you can use any location):

    sudo iio_readdev adis16488 > /tmp/data.txt

    The values obtained from the stream are raw binary samples. According to the ADIS16488 datasheet, acceleration and gyroscope measurements are represented by upper and lower 16-bit words, forming a 32-bit value. These samples must therefore be parsed before they can be interpreted meaningfully.

    The structure of each buffer frame depends on the enabled scan elements and their associated scan indexes and data types. I would recommend using hexdump to inspect the captured frames and reviewing the corresponding entries under the scan_elements directory (particularly the *_index and *_type files) to determine the position and format of each channel within the buffer frame.

    If you would like to visualize the channel waveforms directly, you can use the ADI IIO Oscilloscope. After following the steps above, I was able to observe the accelerometer channels successfully. Please find the attached image as an example.

    Please let me know if you run into any issues or if any of the steps do not behave as expected.

    Best regards,

    Ruben

Reply Children
No Data

Before You Switch


Switching languages will make ADI Explorer unavailable. Resume your session by switching back to English and reopening ADI Explorer.