Nios® V/II Embedded Design Suite (EDS)
Support for Embedded Development Tools, Processors (SoCs and Nios® V/II processor), Embedded Development Suites (EDSs), Boot and Configuration, Operating Systems, C and C++
12600 Discussions

stream transfer between uart and onchiop memory

Altera_Forum
Honored Contributor II
1,066 Views

Hello: 

 

I use the DMA controler to connect the data rom and Uart and use it to connect the instructing ram and data ram.But the uart can't receive the data.My code is below:  

 

IOWR_ALTERA_AVALON_DMA_STATUS(DMA_BASE,0); 

IOWR_ALTERA_AVALON_DMA_CONTROL(DMA_BASE,0); 

IOWR_ALTERA_AVALON_DMA_LENGTH(DMA_BASE,0xff); 

IOWR_ALTERA_AVALON_DMA_RADDRESS(DMA_BASE,(int)buffer); 

IOWR_ALTERA_AVALON_DMA_WADDRESS(DMA_BASE,UART_BASE); 

IOWR_ALTERA_AVALON_DMA_CONTROL(DMA_BASE,ALTERA_AVALON_DMA_CONTROL_GO_MSK|ALTERA_AVALON_DMA_CONTROL_LEEN_MSK|ALTERA_AVALON_DMA_CONTROL_WCON_MSK|ALTERA_AVALON_DMA_CONTROL_BYTE_MSK); 

 

 

 

Have problem? 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

while((IORD_ALTERA_AVALON_DMA_STATUS(DMA_BASE)& ALTERA_AVALON_DMA_STATUS_BUSY_MSK)!=0);
0 Kudos
2 Replies
Altera_Forum
Honored Contributor II
312 Views

Yes, me too. 

i can read uart through DMA, but can't write! 

why? SOPC configuration or else?
0 Kudos
Altera_Forum
Honored Contributor II
312 Views

To Simon.Embed; 

 

 

The receive you use what code ,like me? 

 

and in the pc you use what tool?
0 Kudos
Reply