I have an Epiq Sidekiq Z2 running the PlutoSDR based image. I'm running version 0.3 from the epiqsolutions github. I am trying to transmit a BPSK Direct Sequence Spread Spectrum signal which is generated on the fly with the code running on the Z2 itself.
The code logic is as follows: read in binary data, and the spreading sequence for 0 and 1. For every sample in binary data, memcopy either spreading sequence for 0 or 1 into the IIO Buffer. Once buffer size is reached, iio_buffer_push is called. The spread output (4812192 samples) is larger than a single IIO Buffer (1203048), so this repeats 4 times. The code is heavily based on the ad9371-iiostream.c example.
When looking at a recording of the transmitted waveform, there are discontinuities in the data. Also I've implemented an underflow/overflow check based on iio_adi_xflow_check.c, and underflows are reported while the software is running.
Does libiio guarantee the output to be continuous between buffers or should I manage that myself? Is this just the ARM processor not able to keep up? I've tried to modify the buffer size, number of kernel buffers (iio_device_set_kernel_buffers_count), and max DMA block size. None of those parameters appear to have made an impact.
Thanks for your help!
No, libiio only guarantees data within a buffer is transmitted contiguously.
You can change the CMU to increase the memory available to Linux. Also, setting the iio_device_set_kernel_buffers_count to 1 should allow the biggest buffer.
I might also recommend reducing the sample rate to see if that helps, just to check if it's just the ARM not keeping up.