Forum Discussion
Altera_Forum
Honored Contributor
15 years agoalt_dma_txchan_ioctl is a higher level HAL function ;).
With that code you will configure it to perform word transfers. And you will be constantly writing to the same address (tx_data_to) and the reading address increments by 0x04 after each read. You can use the code on page 29 of the document Daixiwen linked. Just add the configuration like this: if ((txchan = alt_dma_txchan_open("/dev/dma_0")) == NULL) { printf ("Failed to open transmit channel\n"); exit (1); } else { alt_dma_txchan_ioctl(txchan, ALT_DMA_SET_MODE_32, NULL); alt_dma_txchan_ioctl(txchan, ALT_DMA_TX_ONLY_ON, tx_data_to); alt_dma_txchan_ioctl(txchan, ALT_DMA_RX_ONLY_OFF, NULL); }