We are trying to implement a data acquisition system on ZC706 board. DMA is used to transfer data from the ADC to the PL DDR (SODIMM memory).
The entire project runs perfectly on SDK, however on porting the system design to Xillinux we are facing issues.
I have used to following code to memory map my DMA base address, however its unable to get mapped.
void *dma_base;
int dma_fd = open("/dev/mem", O_RDWR);
if (dma_fd < 1) {
printf("ERROR Opening mem\n");
return 1;
}
dma_base = mmap(NULL, 64*1024, PROT_READ | PROT_WRITE, MAP_SHARED, dma_fd, XPAR_AXI_DMA_0_BASEADDR);
printf(" Dma Reg is : %02x \n", *((uint32_t *) ((uint32_t*)dma_base)));
This code section is functional for all other base address mapping. Is there any specific way to memory map DMA base address?