Dear all,
I am facing a problem in which I hope someone can help me out.
I have used the matlab code supplied by other forum members to communicate with ADC08D1520RB. The code needed some modifications (the SPI routines, some headers, etc). After re-hauling the code I managed to acquire a defined number samples - or at least - get the board to respond to the commands.
As far as the FPGA register set is concerned, read and writes to the options registers are confirmed.
As far as the 1520 is concerned, values cannot be confirmed since the registers are write-only. When initiating an on-command calibration the FPGA picks it up and pulse-stretches the corresponding LED. This way I know the calibration (header, address, command) are being sent correctly.
This is where I encounter some problems. I am trying to set the ADC in Test Pattern Mode. My settings are:
%----------------------- Extended Configuration
TPO = 1;
RTD = 0;
DEN = 1;
IS = 0;
DLF = 0;
%----------------------- Configuration Register
nSD = 1;
DCS = 1;
DCP = 0;
nDE = 0;
OV = 1;
OED = 0;
After these settings, executing command WvGetSamplingFrequency, returns the correct sampling rate for channel 2 (I channel - DES mode) which is 3040 MHz give or take. The FPGA options registers are also set accordingly, Lovely Jobly.
I issue a capture command (WvBoardWriteCaptureStart, WvBoardReadCaptureData, WvBoardWriteCaptureEnd) but what I get is not the TPO. I get noise-like spectrum with a dominant at 750MHz which is OK given the fact that it is an interleaved ADC, this is not the TPO though. BUT !!! Check this out;
if I set OED = 1 (issuing then WvGetSamplingFrequency reports 1885MHz which is wrong). Then I can see (not always) the familiar TPO. Most of the times it comes out as scrambled version as I can see from the spectrum.
The structure I use for issuing the capture command has several fields which I am not sure they are correctly set:
TransferSize Number of samples ?
tot_num_acqs Total number of FPGA words (4 bytes)?
num_bufs_used 1 buffer (DES mode) ?
num_acqs_per_buf Number of samples ?
num_bufs_per_set 1 buffer ?
MultiplexedChannelIndex Which channel is multiplexed ? I guess set to 1 based on the verilog code.
I am happy to provide the modified code for other users of the same board as soon as this gets resolved. I have taken the time to document it properly as well and make the output a bit more talkative.
The verilog code I use is the original one without any modifications.
I apologise for the long post, If anyone has any tips to offer I would appreciate it.
EDIT: The DLL debug output file does not report anything funny.
-E.