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.
Hi All,
System : Linux 4.1 Beaglebone black
I'm working on data transfer using DMA on timer trigger. I want to update TMAR(offset = 0x4C) register after every trigger in order to change a time period for next transfer. For this purpose, I have configured DMA in A-sync mode and set SRCBIDX,SRCCIDX to zero. I'm using APIs from EDMA.C and EDMA.h.
When I assigned destination address by edma_set_dest (dma_ch, (unsigned long)(TMAR_address), INCR, W32BIT);
where TMAR_address is calculated using
Timer_base = ioremap(0x48044000,4*1024);
TMAR_address = Timer_base + (offset)/4; (since Timer_base is 4 byte pointer)
I saw garbage value being transferred.
My question is
1) How to assign address of peripheral register to DMA using edma_set_dest. Since edma_set_dest accepts data in dma_addr_t.
2) Is memory mapping used by DMA and CPU is different? In that case, can someone shed light on how to calculate register address that can be fed to DMA as destination address? I have verified that memory to memory transfer is working but not device to memory. Therefore the problem is related to destination address only.
Regards,
Satish