- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I would like to begin a DMA transaction between SDRAM and a UART on my Nios Development kit.
This is the code: while(1) { IOWR_8DIRECT(DMA_BASE,1,SDRAM_BASE); // read address IOWR_8DIRECT(DMA_BASE,2,UART_0_BASE); // write address IOWR_8DIRECT(DMA_BASE,3,768); //length IOWR_8DIRECT(DMA_BASE,6,0x281); // config IOWR_8DIRECT(DMA_BASE,6,0x289); //GO! i=IORD_8DIRECT(DMA_BASE,0); //read status usleep(1000000); } i equals 0 if I put a breakpoint on the usleep line (after the delay, it always equals 0) ; at least the BUSY or DONE bit should be high. I obtain nothing on the output pin (seen with an oscilloscope; I obtain data if I "fputc" them). Any ideas? Regards, Marco LazzaroniLink Copied
1 Reply
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Marco,
Try using IOWR_32DIRECT instead of IOWR_8DIRECT - the DMA registers are aligned to 4-byte boundaries.
Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page