Post Go back to editing

ADIS16460 IMU's with Raspberry Pi

Category: Software
Product Number: ADIS16460 - EVAL-ADISIMU1

Hello everyone,

I am trying connecting my ADIS16460 (EVAL-ADISIMU1) to a Raspberrypi 4 (using the ). I had been following the instruction on this guide:

  1.  Load my SD Card with ADI Kuiper Linux image to Raspberry pi  (wiki.analog.com/.../release_notes)

 https://wiki.analog.com/resources/tools-software/linux-software/embedded_arm_images?redirect=1

and this video:

Using ADI IMU's with Raspberry Pi and MATLAB - YouTube    (2:05 min)

2. I configure my Raspberry pi with overlay in boot/config.txt  (dtoverlay=adis16460)

However when I verify  that the drivers loaded properly, I obtained an error:

analog@analog:~ $ iio_info
Library version: 0.24 (git tag: cc96e44)
Compiled with backends: local xml ip usb serial
IIO context created with local backend.
Backend version: 0.24 (git tag: cc96e44)
Backend description string: Linux analog 5.10.63-v7l+ #1 SMP Wed Aug 3 14:47:23 UTC 2022 armv7l
IIO context has 4 attributes:
    hw_carrier: Raspberry Pi 4 Model B Rev 1.5
    dtoverlay: adis16475
    local,kernel: 5.10.63-v7l+
    uri: local:
IIO context has 3 devices:
    hwmon0: cpu_thermal
        1 channels found:
            temp1:  (input)
            1 channel-specific attributes found:
                attr  0: input value: 49173
        No trigger on this device
    hwmon1: rpi_volt
        1 channels found:
            in0:  (input)
            1 channel-specific attributes found:
                attr  0: lcrit_alarm value: 0
        No trigger on this device
    iio_sysfs_trigger:
        0 channels found:
        2 device-specific attributes found:
                attr  0: add_trigger ERROR: Permission denied (13)
                attr  1: remove_trigger ERROR: Permission denied (13)
        No trigger on this device

Thank you for your help.

Best regards,

Ingrid M.

Parents Reply Children
  • Hello,

    I had tried with two codes to see the answer for the IMU, but it continues without working.

    I will show you the response of the IMU connected to the raspberry pi when I use the next two codes! The MISO have a offset level, but I don't receive anything!

    1. case 1

    import sys
    import spidev
    import RPi.GPIO as GPIO
    import time
    import array
    from struct import *
    
    spi=spidev.SpiDev()
    spi.open(0, 0)
    spi.max_speed_hz=400000
    spi.mode=3
    bcmRst=12
    GPIO.setup(bcmRst,GPIO.OUT)
    GPIO.output(bcmRst,GPIO.HIGH)
    
    while True:
        res=spi.wrytebytes([0x56,0x00])
        data=spi.readbytes(2)
        print(data)
        
    finally:
        spi.close()
        GPIO.cleanup()

    • SCLK     CH1   (Yellow)
    • MISO     CH2    (Purple)
    • MOSI     CH3    (Blue)
    • CS         CH4    (Green)

    2. case 2

    import sys
    import spidev
    import RPi.GPIO as GPIO
    import time
    import array
    from struct import *
    
    spi=spidev.SpiDev()
    spi.open(0, 0)
    spi.max_speed_hz=400000
    spi.mode=3
    bcmRst=12
    GPIO.setup(bcmRst,GPIO.OUT)
    GPIO.output(bcmRst,GPIO.HIGH)
    
    while True:
        res=spi.wrytebytes([0x56,0x00])
        res=spi.wrytebytes([0x56,0x00])
        
        
    finally:
        spi.close()
        GPIO.cleanup()

    • SCLK     CH1   (Yellow)
    • MISO     CH2    (Purple)
    • MOSI     CH3    (Blue)
    • CS         CH4    (Green)

    I will be very grateful if you can help me or see something strange on the code! I always obtain the same answer.

    I will be very attentive. Best regards!

  • Hi,

    Using spidev is not the intended way to use devices and never did it myself. So, I'm not sure what's not working in here but I do know that these parts are typically very sensitive with spi timings and for example, the time delay between cs deassert and assert during a transfer. Another thing worth mentioning is the RST pin... Are you sure that's the correct one? And that the pin is active low?

    You might also try to lower the max spi speed to see if it helps.

    - Nuno Sá