Post Go back to editing

Increasing AD4134 ODR and Continuous Streaming With SPI Engine + DMAC

Category: Software
Product Number: AD4134
Software Version: 2023_r2 Patch Release of HDL

Hello,

I'm currently working with the 2023_r2 Patch1 release of the Analog Devices HDL Github repository and using the Zedboard reference HDL design for the EVAL-AD4134 board. I am using an modified version of the AD7134_fmcz no-OS project and am able to readout data correctly with mostly default settings. 

Increasing the AD4134 ODR
I am interested in increasing the output data rate of the AD4134 from its default of approximately 333 kHz to 500 kHz. The datasheet suggests that it is possible to increase the maximum ODR from its default of 374 kHz up to 1496 kHz when using the sinc filters. I enabled the filters across all channels using the functions available in the AD7134 driver but was only able to set the data rate to 374 kHz by using a period of 2661 nanoseconds for both the axi_pwm_init_trigger and axi_pwm_init_odr. Shorter periods yield incorrect readout values but do not appear to have any PLL or chip errors.

Continuous Streaming of Samples With the SPI Engine and DMA
I am also curious about whether it is possible to continuously stream data from the AD4134 to the PS with minimal dead time using the Analog Devices SPI Engine and the DMAC. The data transfer using the spi_engine_offload_transfer function takes approximately 0.200 seconds to complete for 20,480 samples per channel in a single frame (roughly 2 Mb). I am transferring frames over TCP/UDP from the Zedboard to a computer but this has minimal impact on the dead time between frames. Most of the dead time can be attributed to the time waiting for the spi_engine_offload_transfer to complete. Is it possible to continuously transfer samples using the spi_engine_offload_transfer function with a single DMA controller?

My Questions:

1. Are there examples demonstrating how to raise the AD4134 ODR beyond 374 kHz? How should the ODR relate to the trigger rate used for SPI Engine offload? What specific timing constraints should be considered when pushing the ODR higher?
2. Is the SPI Engine offload rate inherently limited to a certain maximum number of continuous samples, or is it primarily determined by DMA buffer length and timeout behavior? My DMA length width is currently set by CONFIG.DMA_LENGTH_WIDTH 29 in common/ad4134_bd.tcl. Switching from polling (axi_dmac_transfer_wait_until_complete) to DMA IRQ notification only reduced overhead slightly.
3. Does the DMAC’s internal queue only break a single large transfer request into smaller chunks, or can I issue up to four separate requests (i.e., multiple frames) and have them queued?
4. Is it possible to submit multiple transfer requests to the DMA at once and have transfer occur with minimal deadtime?
5. Would it be better to use two or more DMAs and use the IRQs to mux their outputs?
6. Can the SPI Engine Offload module be programmed once with a single command sequence if I’m only performing repeated sample reads? Or must the offload program be rewritten each time before a transfer?

If there’s additional information that would help clarify my setup or results, please let me know.

Regards,
Paul

  • Increasing the AD4134 ODR:

    DCLK Frequency Selection
    The user must ensure an adequate DCLK frequency is used to
    clock out the full length of the data frame in time.
    The maximum supported DCLK frequency on the AD4134 is 48Mhz

    Output Data Rate
    AD4134 can be programmed to any output data rate from 10 SPS
    to 1496 kSPS. Depending on the MODE pin configuration, the ODR
    can be generated by the AD4134 or provided externally. When the
    AD4134 generates the ODR, the mode is called master mode, and
    when ODR is provided externally, the mode is called slave mode.

    DCLK (Minimum) = 374 kSPS × 4 Channels per DOUTx × (24 + 8 + 6) = 44.88 Mbps

    So, for different clock DCLK ODR can be set.

    24 - ADC no of bits /channel
    6 -CRC checksum
    2 -status bit

    4 channels × (24+8) bits = 128 bits each ODR period for a 1-pin serialized case.

    With DCLK fixed at 48 MHz, 48 MHz / 128 ≈ 375 kSPS.

    That matches your observation that 2661 ns (1/2661 ns) 374 kSPS) is ok

    Reduce Frame to 24 bits/channel × 4 channels = 96 bits per ODR.

    With DCLK = 48 MHz → max ODR ≈ 48 MHz / 96 ≈ 500 kSPS

    The AD4134 can output the data from four ADC channels in parallel
    using four output pins, or serialize the data and output them using
    fewer pins. Paralleling the output enables a higher output data
    rate for a given DCLK frequency. 

    For parallel mode selectin Format 1 - 1 and Format 0- 0 to get 1496 kSPS.
    The output channel format is controlled by the FORMAT0/ pin and
    FORMAT1/SCLK pin in pin control mode and the format bits in the
    DIGITAL_INTERFACE_CONFIG register in SPI control mode.

    Table 32 lists all the output channel format options.

Before You Switch


Switching languages will make ADI Explorer unavailable. Resume your session by switching back to English and reopening ADI Explorer.