Has anybody used central_dma to copy data between peripherals and processors, or between two buffers in bram mermory. I have added it to the design and configure but, I receive a DMA BUS TIMEOUT.
Best Regards
Has anybody used central_dma to copy data between peripherals and processors, or between two buffers in bram mermory. I have added it to the design and configure but, I receive a DMA BUS TIMEOUT.
Best Regards
Obviously one of the addresses you are trying to access does not exist. Check the address map. Otherwise the CENTRAL_DMA has low performance since the data needs to travel twice: source_peripheral -> DMA and DMA ->
destination_peripheral Not to mention that is not capable of long bursts.
Cheers,
Guru
This was my first opinion, so I create two buffers in internal memory as follows:
#include "xparameters.h" #include "xdmacentral.h" #include "xutil.h"
//==================================================== #define uint unsigned int void dma_init(uint config); void dma_transfer (int *src, int *dst, uint length);
int main (void) { int i; int array[100]; int array1[100]; for (i = 0; i < 100 ; i++) { array[i]=1; array1[i]=0; } dma_init(0xC0000004); dma_transfer(&array[0],&array1[0],60); return 0; }
// Function to control DMA
void dma_init(uint config) { int *dma = (int *)0x41e00000; *dma = 0xA; // Reset dma++; *dma = config; // Config } void dma_transfer (int *src, int *dst, uint length) { int *dma = (int *)0x41e00008; *dma = (int)src; // Src Address dma++; *dma = (int)dst; dma++; *dma = length;
Is it possible to avoid this timeout?
Guru I have seen a post in which you said that dma registers are located at: baseaddr + 0x400.
but in the documentation it said that registers positions are: baseaddr + 0x4.
am I ok?
again, my best regards
pablo
Where is the stack memory?
Everything resides on Internal BRAM.
o
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D
Use the predefined functions (driver) for DMA engine. Verify the DMA registers, source and destiantion operation using XIo_Out32 and XIo_In32 as defined in "xio.h". The timeout only happens if somethins is WRONG. You could identify the problem using the Chipscope bus analyser, but that is another story.
Cheers,
Guru
ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.