Hi,
I have 2 Plutos (Rev. C) that share the same external clock, I’m working with the Python lib-iio and pyadi-iio libs. I am basically calling the .rx() [or buffer.refill()] function in parallel threads and then executing some quite time-consuming DSP-operations (lasting a few seconds) in my code, everything located inside a loop. However, I notice that after a few iterations with perfectly phase aligned signals (after removing the initial ADC-offset), suddenly the phase-offset between the received samples of the Plutos changes randomly.
I’ve read many posts in this forum to find an answer, I basically understand that the Pluto stops collecting data when the buffers are full (https://ez.analog.com/adieducation/university-program/f/q-a/557389/missing-every-other-transmission-between-two-plutosdrs-using-gnuradio/455544) and the data is discontinuous then. I assume that this is the case, I’m sampling with 3e6 MSps and have a buffer-size of 6M samples.
My questions:
- Why does this random sample-offset occur every single iteration after the buffers are full?
- I must execute these time-consuming DSP-operations, I can’t optimize them any further. I don’t need all the continuous data, just a few thousand samples every couple of seconds would be enough. How can I do this without overfilling the buffers and inducing the unwanted random phase offsets?
- Is there a way to let the Plutos send the data automatically to the host PC just in time when the buffers are full, and how can I do that? Or is requesting the data every time from the host PC the only way to get data?
- Is it possible to delete the local buffer in the Pluto via a special command in the libraries mentioned or differently, so that I can clear the old data inside the buffers repeatedly and prevent these buffers from overfilling? Alternatively, is there any function to tell the Pluto to stop filling the buffer?
- Is a cyclic RX-buffer possible and would it solve my problem?
- What do the buffer.set_blocking_mode and buffer.cancel commands do actually? analogdevicesinc.github.io/.../buffer.html
- Is there any documentation (other than wiki.analog.com/.../libiio_internals) about what is going on in detail both within the Pluto and the host-PC when calling the .rx() or buffer.refill() functions?
- When I set a big buffer-size (e.g. 10M samples), what is happening during the time in which data is sent to the host PC? Is the process of collecting data to the buffer halted until the transmission has ended?
Thank you very much for your help, sorry for the many questions, I spent days searching for answers but couldn’t find anything useful. I really like your hardware (the ADALM2000 too), appreciate your support and recommend your products to my engineer colleagues.