AnsweredAssumed Answered

ADFMCOMMS-1 ZedBoard Reference Design DMA Configuration

Question asked by a55moham on Nov 21, 2016
Latest reply on Nov 25, 2016 by a55moham
Branched from an earlier discussion

Hi,

 

I used this technique of submit and wait but I found the data is not continuous, so I added in the beginning of the wait function:

do {
adc_dma_read(AXI_DMAC_REG_IRQ_PENDING, &reg_val);
}
while(reg_val != (AXI_DMAC_IRQ_SOT | AXI_DMAC_IRQ_EOT));
adc_dma_write(AXI_DMAC_REG_IRQ_PENDING, reg_val);

which is part of the latest code of adc_capture. Then I did the following call:

 

buffer_transfer_id[0] = adc_capture_submit(captureSize, buffer_addr[0]);
buffer_transfer_id[1] = adc_capture_submit(captureSize, buffer_addr[1]);

adc_capture_wait(buffer_transfer_id[0]);

adc_capture_wait(buffer_transfer_id[1]);

 

The code is stuck in the second call of adc_capture_wait in the do-while loop I added above, so I changed the condition to be:

do {
adc_dma_read(AXI_DMAC_REG_IRQ_PENDING, &reg_val);
}
while((reg_val & AXI_DMAC_IRQ_EOT) != ( AXI_DMAC_IRQ_EOT));

 

And it worked fine for up to 3 calls of submit and wait but when I do 4 like the following:

 

buffer_transfer_id[0] = adc_capture_submit(captureSize, buffer_addr[0]);
buffer_transfer_id[1] = adc_capture_submit(captureSize, buffer_addr[1]);
buffer_transfer_id[2] = adc_capture_submit(captureSize, buffer_addr[2]);
buffer_transfer_id[3] = adc_capture_submit(captureSize, buffer_addr[3]);

adc_capture_wait(buffer_transfer_id[0]);

adc_capture_wait(buffer_transfer_id[1]);

adc_capture_wait(buffer_transfer_id[2]);

adc_capture_wait(buffer_transfer_id[3]);

 

it stuck again in the last call of "adc_capture_wait" in the same while loop because reg_val is expected to be 2 and it is zeros.

 

Could you help me in identifying the problem and how to solve it. I do not want to use interrupts because I want to process data in buffer while I am receiving the second (ping pong).

 

Thanks,

Ahmed

Outcomes