Post Go back to editing

Change sampling rate in AXI-SPI-Engine ADCs like AD4020

Hello everyone,

I'm currently using AD40xx ADCs connected to Zedboard through the AXI SPI Engine IP by ADI.  I'm also using meta-adi 2020.1 and also checked this with 2019_R2.  From measurements, it seems the sampling frequency is around 900,000 samples per second as shown below.  I was wondering if it is possible to increase sampling rate by software?

Channel 1 (yellow) is the CNV signal while Channel 2 (blue) is the SCK.  I'm thinking of reducing CNV's high pulse duration which is about 615ns seconds here to increase the sampling rate or frequency. The minimum CNV pulse length (tCNVH) from datasheet is just 10ns, so is it possible to reduce it to like 120ns?  After all, some of AD40XX ADCs like AD4020 have a sampling rate of 1.8MSPS so increasing sampling rate to more than 1MSPS should be possible to demonstrate this feature.

This is very much controlled from the AXI SPI engine HDL but I'm not very knowledgable in the details of the HDL, so I am looking at this route from the software and drivers if it is possible.   I've read the SPI engine has a 16-bit instruction set from this link:

https://wiki.analog.com/resources/fpga/peripherals/spi_engine/instruction_format

There is the command for the chip-select (corresponding to the CNV signal) but the spi-axi-spiengine.c driver has already set the delay parameter to 1 which I'm not sure is the minimum.  This is where I hit the dead-end.  Can this be adjusted further to reduce the tCNVH pulse length?

Parents
  • Hello,

    What HDL branch are you using? Are you altering it in any way? Using the no-OS example from here

    github.com/.../ad400x-fmcz

    the design should run close to 1.8MSPS

    ~Sergiu

  • Hello Sergiu ,

    I'm using both 2020.1 and 2019_R2 HDL versions with petalinux/meta-adi 2020.1 and 2019_R2 as well.  I haven't use the no-OS drivers yet as I'm using AD4020 Linux driver on the Zedboard Linux.

    No, I haven't altered the HDL, as I'm more of a Linux developer and not very experienced on the FPGA design so I really don't know where to dive deeper on the HDL details.

    Thanks for the waveform you shared.  As additional details, here are some of the measurements I did based on the oscilloscope waveform I shared above:

    entire conversion + spi transfer cycle = 1.130 us

    pulse high length of my CS or CNV sign = 615 ns

    SCK period = 23 ns

    But in your logic analyzer waveform,

    entire conversion + spi transfer cycle as you said is 576 ns

    pulse length of CS or CNV sign is ~300 ns

    It seems as if the timings in my Linux Zedboard setup increased by an order of 2 and hence my sampling rate got cut to half of what you are seeing...

    I'm not sure what's causing this.  Zedboard clocks?  As I've said, I neither altered the HDL for this nor made a lot of changes in the device tree scripts.

Reply
  • Hello Sergiu ,

    I'm using both 2020.1 and 2019_R2 HDL versions with petalinux/meta-adi 2020.1 and 2019_R2 as well.  I haven't use the no-OS drivers yet as I'm using AD4020 Linux driver on the Zedboard Linux.

    No, I haven't altered the HDL, as I'm more of a Linux developer and not very experienced on the FPGA design so I really don't know where to dive deeper on the HDL details.

    Thanks for the waveform you shared.  As additional details, here are some of the measurements I did based on the oscilloscope waveform I shared above:

    entire conversion + spi transfer cycle = 1.130 us

    pulse high length of my CS or CNV sign = 615 ns

    SCK period = 23 ns

    But in your logic analyzer waveform,

    entire conversion + spi transfer cycle as you said is 576 ns

    pulse length of CS or CNV sign is ~300 ns

    It seems as if the timings in my Linux Zedboard setup increased by an order of 2 and hence my sampling rate got cut to half of what you are seeing...

    I'm not sure what's causing this.  Zedboard clocks?  As I've said, I neither altered the HDL for this nor made a lot of changes in the device tree scripts.

Children
No Data