Quantcast
Channel: Forums - Recent Threads
Viewing all articles
Browse latest Browse all 262198

TDA2: why Utils_DmaCopy1D work not ok

$
0
0

Part Number:TDA2

HI:

     I  want to use mem copy with dma ,use  function Utils_dmaCopy1D,but I find the dest memory is not work ok.  the data is always 0.   ( dma callback  can  be  work,but the data is not right); 

    how can i let it work right with  Utils_DmaCopy1D.

THANK YOU!

the code as follow  below:

void dma_memtest()
{
Utils_DmaChCreateParams dmaChPrm;
Utils_DmaChObj dmaobj;
Utils_DmaCopy1D dmaParams;
Int32 status;
dmaChPrm.eventQ = 0;

Utils_DmaChCreateParams_Init(&dmaChPrm);


status = Utils_dmaCreateCh(
&dmaobj,
&dmaChPrm
);

UTILS_assert(status == SYSTEM_LINK_STATUS_SOK);

gspidestBUf = Utils_memAlloc
(
UTILS_HEAPID_DDR_CACHED_SR,
1024,
4
);
gspisrcBUf = Utils_memAlloc
(
UTILS_HEAPID_DDR_CACHED_SR,
1024,
4
);

memset(gspisrcBUf,0x77,300);
dmaParams.destAddr = gspidestBUf;
dmaParamsrcAddr =(Ptr)gspisrcBUf;//(Ptr)0x4809a13C;
dmaParams.length =32;
Utils_dmaCopy1D(&dmaobj, &dmaParams);


Utils_dmaDeleteCh(&dmaobj);
HexToStr(tmp,gspisrcBUf,32);
Vps_printf("\r\nsrc:");
Vps_printf((const char*)tmp);
Vps_printf("\r\n");
HexToStr(tmp,gspidestBUf,32);
Vps_printf("\r\ndst:");
Vps_printf((const char*)tmp);
Vps_printf("\r\n");
}


Viewing all articles
Browse latest Browse all 262198

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>