I am working with the AD9361 FMCOMMS2 board and a Zedboard. From hacking up the IIO Oscilloscope code, I have C code that lets me get IQ data from the 9361 reliably. With this code, I can get 0x100000 continuous samples (I believe due to the max buffer size in the 9361 driver). I verified this by making an FPGA load where instead of sending actual IQ samples to the PS, a 32-bit counter (sent to both channels) is sent to the PS which is incremented with every valid IQ sample.
I would like to be able to stream IQ into the PS, and was hoping to leverage the iio-fm-radio. However, I am seeing discontinuities in the counts. I tested this with the attached code and my modified FPGA image.
Here's my output with a count error every 32768 samples
Sucessfully mapped block 0 (offset 0, size 1048576) at 0xb6e4b000
Sucessfully mapped block 1 (offset 100000, size 1048576) at 0xb6d4b000
Sucessfully mapped block 2 (offset 200000, size 1048576) at 0xb6c4b000
Sucessfully mapped block 3 (offset 300000, size 1048576) at 0xb6b4b000
Starting FM modulation
sample #268948 count error: 0xb7fff, 0xa8000
sample #301716 count error: 0xaffff, 0xc0000
sample #334484 count error: 0xc7fff, 0xb8000
sample #367252 count error: 0xbffff, 0xd0000
sample #400020 count error: 0xd7fff, 0xc8000
sample #432788 count error: 0xcffff, 0xe0000
sample #465556 count error: 0xe7fff, 0xd8000
sample #498324 count error: 0xdffff, 0xf0000
sample #531091 count error: 0xf7fff, 0xe8000
sample #563859 count error: 0xeffff, 0x100000
sample #596627 count error: 0x107fff, 0xf8000
sample #629395 count error: 0xfffff, 0x110000
sample #662163 count error: 0x117fff, 0x108000
sample #694931 count error: 0x10ffff, 0x120000
sample #727699 count error: 0x127fff, 0x118000
It's very possible I'm missing something stupid, but like I said my code based off the oscilloscope does allow me to stream.