Forum Discussion
Altera_Forum
Honored Contributor
15 years agoI can change it from read to write by doing the following:
IOWR_32DIRECT(DMA_TESTER_BASE, 24,0x2FC); printf("WRITE_DMA_CONTROL_REG: 0X%8X\n", IORD_32DIRECT(DMA_TESTER_BASE, 24)); But then it messes up the read transfers, so I need to do this via the drivers in stead of the registers (like it says in the datasheet) From the datasheet (Embedded Peripherals IP User Guide) : if your program uses the hal device driver to access the dma controller, accessing the device registers directly interferes with the correct behavior of the driver. If I change it to this: alt_dma_txchan_ioctl(txchan, ALT_DMA_SET_MODE_32, null); alt_dma_txchan_ioctl(txchan, ALT_DMA_TX_ONLY_ON, tx_data); alt_dma_txchan_ioctl(txchan, ALT_DMA_RX_ONLY_OFF, null); and alt_dma_rxchan_ioctl(rxchan, ALT_DMA_SET_MODE_32, null); alt_dma_rxchan_ioctl(rxchan, ALT_DMA_RX_ONLY_OFF, null); alt_dma_rxchan_ioctl(rxchan, ALT_DMA_TX_ONLY_OFF, null); the register simple remains at FC and I get a normal memory copy...