Post Go back to editing

General Clarification of issues with FMCOMMS3 board (on ZedBoard) and libiio/IIO


   I will caveat this by saying that I'm experimenting using the "stock" version of the SD Card supplied with the board (from 2016).  Therefore, some tools (iio_attr) are not available to me.  I'm awaiting arrival of new SDCards to update to the Feb-2021 image (yes, I ordered 16GB cards) based upon the provide website I found.  I am primarily a SW Engineer, with a strong HW background.  My experience with data acquisition has been with voice codecs, not so much with RF data (i.e. I/Q pairs).  I've read through the libiio documentation on line, as well as the Linux IIO subsystem information available.  

   Using the iio_readdev utility:  When I use:   -b 4096 -s 4096 on channel voltage0 to retrieve RX data from RX1A input (set to A Balanced).  With this setup, the output file is 8192 bytes in size.  The iio_info says for the RX device (cf-9361-lpc), there are 4 defined channels:  voltage0 -> voltage3.  These also show up in the ad9361-phy as well (except voltage3, only 0-2 are there).  Given that this is a 2 channel device, why are there 4 voltages?

  When I look a the output file, it's only 8Kbytes big (8192 bytes).  I would have expected a file of 16KBytes, based upon the following:

Each "sample" == 1 I/Q pair, each of these are 2 bytes (really 12 bits, MSB aligned).  So this is 4 bytes per "sample".   I requested 4K samples, therefore, I should have had a file size of 16KB.  When I plotted this via gnuplot (thank you for providing this), It shows me only that there are 2048 samples (X-axis), NOT the 4096 expected.  Why is this??

When I grab voltage0 and voltage2 (assuming that we need both voltages as a balanced pair?) - then I get a 16KByte buffer.  When this gets plotted, it seems "odd".

My questions:

1) what do you define as a "sample"? 

2) Can you explain the anomaly above? (why looking at 1 voltage is only half the expected size)

I will have more questions regarding libiio and the "streaming" that goes on under the hood that I need to understand for our application (which is unique in a way).

Thank you in advance for your expertise and response.

Best Regards,

Stephen Beckwith