Hi,
We are trying to use uDMA for data received from a CPLD using EPI. We are able to use EPIrea FIFO directly. However, all our efforts to use uDMA for receiving data from the EPI has failed. We have done the following:
MAP_SysCtlPeripheralEnable(SYSCTL_PERIPH_UDMA);
MAP_SysCtlDelay(10);
uDMAEnable(); //Enable the uDMA
uDMAControlBaseSet(&g_dmaCtrl[0]); //Set the uDMA control structure
MAP_uDMAChannelAttributeDisable(DMA_CH_USED,
// UDMA_ATTR_USEBURST |
UDMA_ATTR_ALTSELECT |
// UDMA_ATTR_HIGH_PRIORITY |
UDMA_ATTR_REQMASK
);
MAP_uDMAChannelAttributeEnable( DMA_CH_USED, // Set the attributes for the uDMA software channel.
UDMA_ATTR_USEBURST |
// UDMA_ATTR_ALTSELECT |
UDMA_ATTR_HIGH_PRIORITY
// | UDMA_ATTR_REQMASK
);
uDMAIntRegister(UDMA_INT_ERR, dmaErrorInterrupt);
The above is initialized after the EPI which has the following:
#define EPI_CFG_FLAGS (EPI_GPMODE_CLKPIN /*| EPI_GPMODE_RDYEN */| EPI_GPMODE_DSIZE_16 | EPI_GPMODE_ASIZE_NONE /*| EPI_GPMODE_READ2CYCLE*/) // all reads are 2 cc in tm4c129x
MAP_EPIModeSet(EPI0_BASE, EPI_MODE_GENERAL);
MAP_EPIConfigGPModeSet(EPI0_BASE, EPI_CFG_FLAGS, 0, 0);
//Set the EPI for non blocking reads
#define EPI_ADR_MAP_FLAGS (EPI_ADDR_PER_BASE_NONE | EPI_ADDR_RAM_SIZE_64KB | EPI_ADDR_RAM_BASE_NONE)
MAP_EPIAddressMapSet(EPI0_BASE, EPI_ADR_MAP_FLAGS);
MAP_EPINonBlockingReadConfigure(EPI0_BASE, 0, EPI_NBCONFIG_SIZE_16, 0);
MAP_EPINonBlockingReadConfigure(EPI0_BASE, 1, EPI_NBCONFIG_SIZE_16, 0);
MAP_EPIFIFOConfig(EPI0_BASE, EPI_FIFO_CONFIG_RX_1_2);
//Stop any read that is started by default
MAP_EPINonBlockingReadStop(EPI0_BASE, 0);
MAP_EPINonBlockingReadStop(EPI0_BASE, 1);
//Disable all the EPI interrupts
MAP_EPIIntDisable(EPI0_BASE, EPI_INT_TXREQ | EPI_INT_ERR |EPI_INT_RXREQ);
//EPIIntEnable(EPI0_BASE, EPI_INT_RXREQ | EPI_INT_DMA_RX_DONE);
EPIIntRegister(EPI0_BASE, dmaTransferInterrupt);
The clock rate is set to 30 MHz and we run at 120 MHz. We have done the design successfuly on lm3s9d96 and ported most of the code as they are almost the same. The question is are there any extra configurations that we need to set for uDMA to be able to use with EPI.
Any types of help is welcome and appreciated.
Thanks