I am trying to use EDMA3 on the L138 without the edma driver or the CSL. In the first instance I want to tie the EDMA to the timer3 :12 event on EDMA1_CC0 using TC2 and event channel 26. I have verified that the event is occuring and can even see my linked parameter RAM tables being updated when I change (for debug purposes) parameters in my linked PaRAM set and the event PaRAM set gets updated. Unfortunately I have never seen any data being written to the destination. Is there some other setting (ie slave memory setting ) that needs to be made external to the DMA module.
Heres what my code looks like
void DAC_DMA_Init(Uint32 EventID, L138_Edma3ccParamSetRegs_t *DMA_parmSet)
{ USTIMER_reset(); // make sure timer 3 is off
OMAPL138_lpscTransition(PSC1, DOMAIN0, LPSC_EDMACC1, PSC_ENABLE); OMAPL138_lpscTransition(PSC1, DOMAIN0, LPSC_EDMACC1, PSC_ENABLE);
OMAPL138_lpscTransition(PSC1, DOMAIN0, LPSC_EDMACC1, PSC_ENABLE);
OMAPL138_lpscTransition(PSC1, DOMAIN0, LPSC_EDMATC2, PSC_ENABLE);
EDMA1_CC0->PARAMSET[EventID] = *DMA_parmSet; // Implement the T3:12 synchronization Event
EDMA1_CC0->PARAMSET[127] = *DMA_parmSet; // Populate the T3:12 Link parameter set at 127
EDMA1_CC0->ECR = 0xFFFFFFFF ; // Clear any pending Event
EDMA1_CC0->EESR = 1 << EventID; // Enable Timer Event E26
}
void test_DMA(void)
{
int index;
L138_Edma3ccParamSetRegs_t *DAC_paramSet;
DAC_paramSet->OPT = 0x00000100; // FWID = 16 bit DAC_paramSet->SRC = (Uint32)&r[2048]; // Source Address - sine table from IFFT DAC_paramSet->DST = (Uint32)&(FPGA_DAC->DAC_Data); // Dest Address DAC_paramSet->A_B_CNT = 0x04000002 ; //1024 bytes, 2 bytes = 1 16 bit word DAC_paramSet->SRC_DST_BIDX = 0x00000002; // Source idx increments 2 (Int16) locations DAC_paramSet->LINK_BCNTRLD = 0x04004FE0; // Value to reload after transfer, PaRAM set 127 DAC_paramSet->CCNT = 0;
DAC_DMA_Init( L138_EDMA3_CHA_TIMER64P3_EVT12, DAC_paramSet);
init_DACTIMER(1000); // start timer 3 and data output