Forum Discussion
Altera_Forum
Honored Contributor
15 years agoI have realize the 320*240pixels data transmition,which the number of data is much larger than 65535,the code is as below:
for(buffer_counter=0;buffer_counter<=1;buffer_counter++) { alt_u32 *write_addr = (alt_u32 *) (DDR_SDRAM_BASE+0xE000*buffer_counter); alt_avalon_sgdma_construct_mem_to_mem_desc( &desc[buffer_counter], &desc[buffer_counter+1], read_addr, write_addr, 65530, 1, 0); } alt_avalon_sgdma_do_async_transfer(); (PS: buffer_counter is the type of "alt_u32") ////////////////////////////////////////////////////////// there is a question I am not understand: how to know the SGDMA transmition is over? I use the "alt_avalon_sgdma_register_callback" ,then add the code below after "alt_avalon_sgdma_do_async_transfer();",but the software seems stall there,so I hope someone could give me some advise!~ while(tx_done == 0) {} printf("The transmit SGDMA has completed\n");