Post Go back to editing

iio_info does not detect my device

Category: Software
Product Number: AD5593R

I am trying to connect two AD5593R DACs to my raspberry pi which is running Kuiper Linux and when running iio_info command in terminal, it wouldn't detect any of them. At the first time running this I was able to detect one of them but upon disconnecting and connecting my HAT and DACs, it stopped detecting both of the DACs. Do you know what might have been the issue? could it be hardware related? I double checked all the connections and everything seem to be working fine. I also tried to attach one DAC at a time and still wouldn't detect.

I followed all the steps in the link below.

https://wiki.analog.com/resources/eval/user-guides/circuits-from-the-lab/eval-ad5593r-pmdz

this is the output I received running iio_info command:

analog@analog:/sys/bus/iio/devices/iio_sysfs_trigger $ sudo iio_info
[sudo] password for analog:
iio_info version: 0.25 (git tag:v0.25)
Libiio version: 0.25 (git tag: v0.25) backends: local xml ip usb serial
IIO context created with local backend.
Backend version: 0.25 (git tag: v0.25)
Backend description string: Linux analog 5.15.92-v7l+ #1 SMP Wed Dec 6 08:52:11 UTC 2023 armv7l
IIO context has 9 attributes:
    hw_model: 0x0001 on Raspberry Pi 4 Model B Rev 1.5
    hw_carrier: Raspberry Pi 4 Model B Rev 1.5
    hw_mezzanine: 0x0001
    hw_name: PMD-RPI-INTZ
    hw_vendor: Analog Devices, Inc.
    hw_serial: de4c9837-ed6a-41b2-a007-f26cc78cbdde
    dtoverlay: rpi-ad5593r,vc4-kms-v3d
    local,kernel: 5.15.92-v7l+
    uri: local:
IIO context has 3 devices:
    hwmon0: rpi_volt
        1 channels found:
            in0: (input)
            1 channel-specific attributes found:
                attr 0: lcrit_alarm value: 0
            No trigger on this device
    hwmon1: hidpp_battery_0
        0 channels found:
        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

  • Hi  , I think I found the problem, assuming you're using the EVAL-AD5593r-PMDZ on the PMD-RPI-INTZ hat. The Pmod has a 100k pullup resistor on RESET, and these lines are tied to GPIO13 and GPIO17 on the Pmod connectors. These are set as inputs, but with weak internal pulldowns enabled, confirmed with:

    sudo raspi-gpio get:

    ...

    GPIO 13: level=0 fsel=0 func=INPUT pull=DOWN
    ...
    GPIO 17: level=0 fsel=0 func=INPUT pull=DOWN

    ...

    and indeed I measured the voltage at about 1.1V, which may have initially been read as high by the AD5593r, but then low (it's marginal.)

    There are several ways to solve this, but adding:

    gpio=13,17=pu,ip

    to /boot/config.txt did the trick on my setup. I'll add this to the user guide.

    -Mark

  • Hi Mark, thank you for your response. that indeed solved the issue but I still cannot detect both of the DACs at the same time. this is the output of terminal when running iio_info and it only detects one extra device instead of two when both of the DACs are connected:

    analog@analog:~ $ iio_info
    iio_info version: 0.25 (git tag:v0.25)
    Libiio version: 0.25 (git tag: v0.25) backends: local xml ip usb serial
    IIO context created with local backend.
    Backend version: 0.25 (git tag: v0.25)
    Backend description string: Linux analog 5.15.92-v7l+ #1 SMP Wed Dec 6 08:52:11 UTC 2023 armv7l
    IIO context has 9 attributes:
    	hw_model: 0x0001 on Raspberry Pi 4 Model B Rev 1.5
    	hw_carrier: Raspberry Pi 4 Model B Rev 1.5
    	hw_mezzanine: 0x0001
    	hw_name: PMD-RPI-INTZ
    	hw_vendor: Analog Devices, Inc.
    	hw_serial: de4c9837-ed6a-41b2-a007-f26cc78cbdde
    	dtoverlay: rpi-ad5593r,vc4-kms-v3d
    	local,kernel: 5.15.92-v7l+
    	uri: local:
    IIO context has 4 devices:
    	hwmon0: rpi_volt
    		1 channels found:
    			in0:  (input)
    			1 channel-specific attributes found:
    				attr  0: lcrit_alarm value: 0
    		No trigger on this device
    	hwmon1: hidpp_battery_0
    		0 channels found:
    		No trigger on this device
    	iio:device0: ad5593r
    		5 channels found:
    			voltage2:  (output)
    			3 channel-specific attributes found:
    				attr  0: raw value: 0
    				attr  1: scale value: 0.610351562
    				attr  2: scale_available value: 0.610351562 1.220703124
    			voltage1:  (input)
    			3 channel-specific attributes found:
    				attr  0: raw value: 37
    				attr  1: scale value: 0.610351562
    				attr  2: scale_available value: 0.610351562 1.220703124
    			voltage0:  (output)
    			3 channel-specific attributes found:
    				attr  0: raw value: 0
    				attr  1: scale value: 0.610351562
    				attr  2: scale_available value: 0.610351562 1.220703124
    			voltage2:  (input)
    			3 channel-specific attributes found:
    				attr  0: raw value: 1
    				attr  1: scale value: 0.610351562
    				attr  2: scale_available value: 0.610351562 1.220703124
    			temp:  (input)
    			3 channel-specific attributes found:
    				attr  0: offset value: -753
    				attr  1: raw value: 831
    				attr  2: scale value: 376.789750000
    		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

    one more question. I am trying to use these DACs to get voltage levels of 0.1V to 1.6V to feed to my circuit. Do you know if I can do this using PyADDI-IIO?

  • Hi  , sorry for the delay. Have you set the two devices to two different addresses? You will also need to enable two instances of the device tree overlay, one with"

    ,addr=0x11

    appended.

    If you don't see the two devices after that, you can scan the I2C bus with:

    i2cdetect -y 1

    You should see a number for a device that does not have a driver bound to it, and "UU" for those that do.

    -Mark