AnsweredAssumed Answered

AD9361 and LIBIIO

Question asked by SashaSad on Apr 23, 2017
Latest reply on May 15, 2017 by larsc

Hello everybody, we're developing application based on “ad9361-iiostream” example (library LIBIIO v0.8). Our FPGA platform contains core axi_ad9361 version 2015.2, but it's built in Vivado 2016.4. Linux was built by means of SDK Petalinux 2016.4 from sources downloaded from analog device repository (branch xcomm_zynq). Linux has integrated LIBIIO library. Device tree is based on generated SDK Petalinux 2016.4. Next devices AD9361_PHY, HDL_ADC, HDL_DAC and our custom DSP core (let's call it DSP_FPGA) are included in the device tree. Our DSP_FPGA is situated in FPGA design in following way:

                                                      RX-HDL_ADC->DSP_FPGA->DMA

                                                      TX-DMA->DSP_FGPA->HDL_DAC

We're using DMA-engine from Xilinx.

When we run application on the stage of creating buffers we have next issue:

   root@plnx_arm:/usr/bin# ./iioapp

   * Acquiring IIO context

   ...

   Could not create RX buffer: Invalid argument

   * Destroying buffers

 

When we read parameters of devices and channels we get this:

 

Associated with context device #2 has name cf-ad9361-lpc
            This device has following parameters:
            Device ID:  iio:device2
            Device word-parametr: 1
            ******************************************
            List of associated with cf-ad9361-lpc-device channels and it's parameters:
            Linked channel #0 has name (null)
            This channel has following parameters:
            Channel ID:  voltage1
            Channel total length of the sample, in bits: 0
            Channel length of valuable data in the sample, in bits: 0

 

Everything looks like when the time to read channel parameter format.length comes, there isn't anything to read except zeros (I mean iio_device_create_buffer() → iio_device_get_sample_size() chain of functions). Do I have to fill this channels parameters by myself or example is supposed to work properly without any changes? Shouldn't the application adjust all the parameters by itself based on drivers information of found devices? What do I have to do to fix my problem?

Outcomes