Forum Discussion
Altera_Forum
Honored Contributor
20 years agoDMA and Uart
hi ! i would like to start implement DMA controller with uart I already generate and download my system into fpga startix II dev board succefully . I saw also documents about DMA , bit into...
Altera_Forum
Honored Contributor
20 years agoi tryed different way .
In sopc builder connecting write port dma to ext bus ram and read port dma to uart. After setting flag end of packet for the uart After without setting end of packet i wrote following code : # include "dma_test.h" typedef struct COMM { float data1; float data2; float data3; int data4; int data5; int data6; int data7; }Master; Master data_send; # define DMA_0_STATUS_REG 0# define DMA_0_READ_ADDR_REG 1# define DMA_0_WRITE_ADDR_REG 2# define DMA_0_LENGHT_REG 3 # define DMA_0_CONTROL_REG 6 int main(void) { data_send.data4=10; data_send.data5=100; data_send.data6=33; data_send.data7=44; IOWR(DMA_0_BASE,DMA_0_READ_ADDR_REG,&data_send); IOWR(DMA_0_BASE,DMA_0_WRITE_ADDR_REG,UART_0_BASE); IOWR(DMA_0_BASE,DMA_0_LENGHT_REG ,28); IOWR(DMA_0_BASE,DMA_0_CONTROL_REG ,ALTERA_AVALON_DMA_CONTROL_BYTE_MSK | ALTERA_AVALON_DMA_CONTROL_GO_MSK | ALTERA_AVALON_DMA_CONTROL_WCON_MSK ); printf("data_send:%u\r ",sizeof(data_send)); while(true) { } return(0); } i set fixed address for write port dma (uart) and else but nothing was sent . i can't understand what i need and what i have to do Impossible to find good documentation for dma-uart , what to do in sopc builder and what to do in sw. Maybe need to set something for the uart ,but how I need this to communicate different devices fpga in a new project but if i don't know dma-uart i will make sending one byte at time , and load cpu for increasing buffer receive and transmiter . Uncredible ..... not possible to find more informations about this ciao walter