I have been using the VC707 with a FMCOMMS3 board attached. I am trying to determine the suitability of the AD9361 for our target application. Currently I am trying to evaluate the ability of the device to create a continuous frequency sweep (beginning at f = 200MHz and finishing at f = 300MHz). I am using the No-OS files contained here : GitHub - analogdevicesinc/no-OS: Software drivers for systems without OS
I would just like to confirm some details about operation:
1. In the Config.h file I have uncommented DAC_DMA_EXAMPLE, so the output should be coming from sine_lut(). I have also read in past discussions that I can replace sine_lut() with my own values or even a new LUT with a different length. I would like to know if it is OK for me to use a LUT I have defined called chirp_lut(). This LUT has a length of 32768 and contains datapoints for a twos complement chirp function. My goal is to use this LUT as a 'sweep' function.
2. If I want to receive the data (i.e. I have transmitted and am going to receive the continuous data), my understanding is that I should modify adc_core.c to implement a 'double buffer scheme' for the DMA where the first buffer fills with data and while the second buffer is filling, the data from the first buffer is processed and prepared again for capture. I am very much a hardware engineer and do not properly understand how to write the code to do this, I believe it shouldn't be too difficult, I just do not know where to start - Could you please offer some advice on this?
3. After using the SDK to run the configuration I have set up, do you have any advice for how I can build in 'triggers' for commencing a sweep or commencing another function? Would this require a modification of the Main.c where I would create some form of input handlers? Again, I am not a software engineer and these solutions are not obvious to me.
If it helps, my overall goal is to attach a simple LC resonator circuit, transmit a sweep function and plot the reflected spectra which will be captured. The goal is to determine the resonant frequency.
Any advice would be greatly appreciated!
1. That's right, sine_lut can be replaced - it was added there just as an example. The maximum length of one transfer is by default 2^24 (16777216) bytes (DMA_TRANSFER_LENGTH is by default set to 24), so you should be good.
2. We have implemented an example for the Zynq platforms (ADC_DMA_IRQ_EXAMPLE should be defined) - on the MicroBlaze platforms it should be similar - we'll try to do that too.
3. Yes, the main() function should be modified. Have a look at CONSOLE_COMMANDS example - the serial terminal is used for interacting with the user.
Thanks for clarifying that I am on the right track. Please see below for my progress on each of the 3 initial questions. I have attached a photo of my benchtop setup for ease of understanding, please see image 1.
1. I have added chirp_lut() which builds without error and I have made sure to reference it when setting data_i1, data_q1, data_i2 and data_q2. I want to try and compare the difference between using sine_lut() and chirp_lut(). I have connected a portable Spectrum Analyzer to observe the output spectrum for both cases and results are as follows:
-Sine_lut() - Spectra attached in Image 2. I observe two tonal peaks on the output spectrum. The LO, TX_attenuation and RF bandwidth are shown in image 3. I would think these are the two output mixer products observed by mixing the sine_lut() frequency with the LO of 200MHz. Do you agree with this? My only concern is that it would appear that the LO does not center on 200MHz, but rather centers on 199.36MHz. Is this an acceptable error tolerance?
-Chirp_lut() - Spectra attached in Image 4. I observe a 3.45MHz bandwidth on the output spectrum, centered on the LO frequency of 200MHz. The LO, TX_attenuation and RF bandwidth are shown in image 5. I have configured chirp_lut() to have a 10MHz bandwidth and I am concerned that I am not seeing this. Is there another parameter in the AD9361 I need to set for an appropriate output range?
2. I have seen your examples of implementing a continuous cyclic capture using Interrupts for the Zynq platforms. When you say that something similar can be done for a microblaze environment, would you be able to explain this in a little more detail and I will try to implement it myself?
3. Thanks for pointing out the console commands, I had not thought to add to these. I will add something so a user can switch between 'sweep mode' and 'tone mode'.
1. It's not expected to have the LO so far from what you want - have a look here for some examples: https://wiki.analog.com/resources/eval/user-guides/ad-fmcomms2-ebz/software/baremetal-filter
2. We are working on this - we should be able to commit something in a couple of days.
Is there any reason you could think of as to why the LO might be so far from the target frequency?
Please let me know when you have an update on the streaming function and thanks again for working on this.
I also wanted to check if you knew a way to boot the .BIT and .ELF files from BPI memory on the VC707? I have read quite a bit of information mostly referencing the iMpact software. I would like to avoid using it if possible. My understanding is that I could 'combine' the two files into a .MCS file and simply program it to BPI flash using Vivado, then set the boot DIP switches accordingly. However when I do this I have no console access at all so I have no immediate way of verifying whether the AD9361 initializes as expected or not. I suspect this means I have not programmed the flash correctly.
I usually work in a purely HDL environment and have never been required have a bootable .ELF before. Any advice or reference blogs/articles/instructions would be greatly appreciated.
Support for continuous cyclic capture using interrupts for the MicroBlaze environment has been added. It has not been merged with master yet, but code is available. Will be merged soon.