Spaces:
Sleeping
Sleeping
Ticket Name: TDA2: why Utils_DmaCopy1D work not ok | |
Query Text: | |
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"); } | |
Responses: | |
Hi , Can you disable cache and try this out , i.e alloc the buffer from non cached region . Regards Chetan.M | |
thank you! i try it! I have a question as follow: when i use edma ,cpu can access memory until edma complete?or it can work during this time? | |
Hi , Yes CPU can access memory but not advisable to write to the same memory which dma is been performed . Cpu is not blocked till dma complete . Regards Chetan.M | |
thank you! it is mean cpu can write if i write the different memory when edma is not complete? and the last your reply means cpu is blocked? but if cpu is blocked,how it can access memory.or you means cpu is not blocked?i think cpu may not blocked your mean. | |
Cpu is not blocked till dma complete i mentioned NOT Blocked Regards Chetan.M | |