This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

QDMA相关问题请教



大家好,我在测试QDMA时出现了如下问题:大致代码如下:

int channel;
char strBuf1[512];
char strBuf2[512];
memset(strBuf1, 0, 512);
memset(strBuf2, 0 ,512);
strBuf1[0] = 1;
strBuf1[1] = 2;

if (EDMA_getResource(EDMA_QDMA0, &tcc, &channel, &param, 1, 0))
{
    printf("getResource fail\n");
    return -1;
}
edmaParams.channelNO = channelaa;
edmaParams.acnt = 512;
edmaParams.bcnt = 1;
edmaParams.ccnt = 1;
edmaParams.srcBidx = 0;
edmaParams.destBidx = 0;
edmaParams.srcCidx = 0;
edmaParams.destCidx = 0;
edmaParams.srcAddr = (unsigned int)strBuf1;
edmaParams.destAddr =(unsigned int)strBuf2;
if (EDMA_setChannelParams(&edmaParams))
{
    printf("setParams fail!\n");
    return -1;
}
EDMA_tranStrat(&channel);
usleep(10 * 1000 * 1000);
printf("%d, %d\n", strBuf2[0], strBuf2[1]);

我是通过edmak.ko通过内核进行的QDMA操作,我发现中断回调可以正常调用,说明传输完成,但是printf("%d, %d\n", strBuf2[0], strBuf2[1]);这个打印仍然不变?

我已经确认过了PRAM中的参数,不知有可能是什么原因导致的,还望赐教...还有个小小的问题啊,QDMA可以直接操作虚拟地址么?