Forum Discussion
Altera_Forum
Honored Contributor
15 years agoURGENT: Peripheral to Memory DMA Transaction
Hello, may I know how to transfer data from peripheral to memory using DMA? It is quite confusing from memory-to-memory transfer. please help! thanks!
Altera_Forum
Honored Contributor
15 years agoyes.. my RAM (both SRAM and SDRAM) is 16 bit, peripheral is 32 bit and DMA is 32 bit as well... so for the IOWR during writing into source (SDRAM), do i have to use IOWR_16DIRECT?
update: now, initially... i use.. for(i=0; i<100; i++) { IOWR(src, i, i); printf("initial: %d\n", IORD(src, i)); } //same DMA code for(i=0; i<100; i++) { printf("end: %d\n", IORD_16DIRECT(dst, i*2)); } and the result... it is ok to for 0 until 49, then the rest all is 1. --- Quote Start --- end: 0 end: 1 end: 2 end: 3 end: 4 end: 5 end: 6 end: 7 end: 8 end: 9 end: 10 . . . end: 39 end: 40 end: 41 end: 42 end: 43 end: 44 end: 45 end: 46 end: 47 end: 48 end: 49 end: 0 end: 0 end: 0 end: 0 end: 0 end: 0 end: 0 end: 0 end: 0 end: 0 end: 0 end: 0 end: 0 end: 0 end: 0 end: 0 end: 0 end: 0 end: 0 end: 0 end: 0 end: 0 end: 0 end: 0 end: 0 end: 0 end: 0 end: 0 end: 0 end: 0 end: 0 end: 0 end: 0 end: 0 end: 0 end: 0 end: 0 end: 0 end: 0 end: 0 end: 0 end: 0 end: 0 end: 0 end: 0 end: 0 end: 0 end: 0 end: 0 end: 0 --- Quote End ---