libiio - continuous streaming

I am trying to stream data from Ad7768 to Windows PC. Prototype hardware is based on CN054 & De10 board. libiio.dll is linked to C++ Windows code. I replicated behavior of "capture_process" function from iio_oscilloscope  which is invoked by timer and calls io_buffer_refill. My sample rates are very low <40 kSPS.

I don't fully understand how io_buffer_refill works and what happens on server side and documentation I found was not all that great and clear. What happens to the samples if there is a long delay between calls to io_buffer_refill?  What about the other way around (if io_buffer_refill is called 2nd time before ADC had time to acquire enough samples)? Would it return some of the same data which was already returned previously?

How can I check that 2 consequitive calls to io_buffer_refill fetch consequitive uninterrupted sampels, and not discontinues or overlapping chunks?

Parents Reply
  • 0
    •  Analog Employees 
    on Jan 6, 2021 6:52 PM in reply to Alexo57

    hmmm this might be a limitation with designs that use the SPI engine. Since data and control go over SPI you cannot do both simultaneously, and the driver will block until buffers are closed. I don't know if this applies to the DMA since its under the same driver but does not use the SPI engine.

    That overflow app was designed for high-speed devices where control and data are on separate busses.

    Let me check with the driver maintainers.

    -Travis

Children