This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

how to read adc ad7616 data from DDR

Greetings! I'm trying to read out the ADC capture data from memory. A little background about what I did so far is, my SPI communication is good as I successfully did the ad7616 self-test and read out the correct values. Now, I'm trying to check the interface by applying input on only one channel that is A0. I enabled the stack sequencer through the configuration register and set the value 0f each sequencer by writing respective values on the sequencer registers. I'm applying DC 3V3 on channel A0. Again just for clarification for one more time, I'm applying DC3v3. I checked the output of the SDOA (using only 1wire) pin using the logic analyzer and read out 0x2A76 (2a76 divided by 32768 and multiply by 10) which is equal to 3V3. But when read out values from memory that's always print 0xFFFF. The code I'm using to read and print out the values is following: 

uint16_t index;

uint32_t data;

uint32_t size=20;

uint16_t sample_q;

uint16_t sample_i;


adc_capture(size, ADC_DDR_BASEADDR);

Xil_DCacheInvalidateRange(ADC_DDR_BASEADDR, size * 16);

for(index = 0; index < size; index ++)


data = Xil_In32(ADC_DDR_BASEADDR + (index * 4));

sample_q = (data & 0xFFFF);

sample_i  = (data >> 16) & 0xFFFF;

xil_printf("%04X\n\r, sample_i);

xil_printf("%04X\n\r, sample_q);


Any suggestions why it's like this? 

[edited by: Moris98 at 5:10 AM (GMT -4) on 20 Oct 2021]
[locked by: buha at 6:01 AM (GMT -4) on 20 Oct 2021]
Parents Reply Children
No Data