Hello
I have some problems to setup the EDMA3 to use McBSP0 to send out data.
The McBPS0 is configured to 32 Timeslots, each timeslot is 8 bit. I feed on the CLKS pin 2.048MHZ. The BaudRate genretator creates the FSGX,CLKX signals. Using multichanel 8 partition mode.
The EDMA3 is configured to take data from a Ping/Pong buffer withouth chanel sorting and transmit to the DXR register.
My problem is: The EDMA will take the fist byte from the buffer and sent out. After that nothing happend. No more data are taken from the buffer and sent out.
Here is the code part what I use to configure the McBPS and EDMA3. I do not use the DSP/Bios.
------------------------------------------------------------------------------------------------------------
Uint32 tmp; CFG_PINMUX1 = (CFG_PINMUX1 & 0x33CFFFF) | 0x1420000 ;
//Set McBPS0 pin in PINMUX
//Select External Clock on CLKS pin for Sample rate Gen
//Select FramePeriod,Framewidth
mcbspRegs0->SRGR = CSL_FMK(MCBSP_SRGR_FSGM,1)
| CSL_FMK(MCBSP_SRGR_FPER,255) ;
mcbspRegs0->PCR = CSL_FMK(MCBSP_PCR_CLKRM,1)
| CSL_FMK(MCBSP_PCR_CLKXM,1)
| CSL_FMK(MCBSP_PCR_FSRM,1)
| CSL_FMK(MCBSP_PCR_FSXM,1);
mcbspRegs0->RCR = CSL_FMKT(MCBSP_RCR_RWDLEN1,8BIT)
| CSL_FMK(MCBSP_RCR_RFRLEN1,31);
mcbspRegs0->RCR = CSL_FMKT(MCBSP_XCR_XWDLEN1,8BIT)
| CSL_FMK(MCBSP_XCR_XFRLEN1,31);
//Set Multichanel mode
mcbspRegs0->MCR = CSL_FMK(MCBSP_MCR_XMCME,1)
| CSL_FMK(MCBSP_MCR_RMCME,1);
mcbspRegs0->RCERE0 = 0xffffffff;
//Enable all RX 32 Timeslotes
mcbspRegs0->XCERE0 = 0xffffffff;
//Enable all TX 32 Timeslotes
//Take out from reset the Sample Rate Generator, eneble FSYNC generation
mcbspRegs0->SPCR = CSL_FMK(MCBSP_SPCR_GRST,1)
| CSL_FMK(MCBSP_SPCR_FRST,1);
//----Setup EDMA3 for PCM0------------------------------------
edma3ccRegs->EESR = 4;
//Enable Event for chanel 2( XEVT0);
//PaRam for Transmit -EDMA channel 2
edma3ccRegs->PARAMSET[2].OPT=0x00100000;
//Options TCINTEN set
edma3ccRegs->PARAMSET[2].SRC=(Uint32)TX_Buff_PCM0_PING; //Source Address transmit from here
tmp = (TSLOTS_PCM0 << 16) | 1; //BCNT =TSLOTS_PCM0, ACNT =1
edma3ccRegs->PARAMSET[2].A_B_CNT=tmp;
edma3ccRegs->PARAMSET[2].DST=(Uint32)&(mcbspRegs0->DXR);
//Dest Address. This is the DXR register Address
tmp = (1<<16) ;
//DestBIDX =1, SRCBIDX =0
edma3ccRegs->PARAMSET[2].SRC_DST_BIDX=tmp;
tmp = (TSLOTS_PCM0 << 16) | (((Uint32)&(edma3ccRegs->PARAMSET[64])&0xFFFF));
//BCNTRLD =TSLOTS_PCM0,LINk=Param[64]
edma3ccRegs->PARAMSET[2].LINK_BCNTRLD=tmp;
edma3ccRegs->PARAMSET[2].SRC_DST_CIDX=0;
//Src,DST Cindex
edma3ccRegs->PARAMSET[2].CCNT=1;
//C count value 1
//Reload PONG PaRam for Transmit -EDMA channel 2 (64)
edma3ccRegs->PARAMSET[64].OPT=0x00100000;
//Options TCINTEN set
edma3ccRegs->PARAMSET[64].SRC=(Uint32)TX_Buff_PCM0_PONG;
//Source Address transmit from here
tmp = (TSLOTS_PCM0 << 16) | 1; //BCNT =TSLOTS_PCM0, ACNT =1
edma3ccRegs->PARAMSET[64].A_B_CNT=tmp;
edma3ccRegs->PARAMSET[64].DST=(Uint32)&(mcbspRegs0->DXR);
//Dest Address. This is the DXR register Address
tmp = (1<<16) ;
//DestIDX =1, SRCBIDX =0
edma3ccRegs->PARAMSET[64].SRC_DST_BIDX=tmp;
tmp = (TSLOTS_PCM0 << 16) | (((Uint32)&(edma3ccRegs->PARAMSET[65])&0xFFFF));
//BCNTRLD =TSLOTS_PCM0,LINk=Param[64]
edma3ccRegs->PARAMSET[64].LINK_BCNTRLD=tmp;
//Link and BCNT reload value
edma3ccRegs->PARAMSET[64].SRC_DST_CIDX=0;
//Src,DST Cindex
edma3ccRegs->PARAMSET[64].CCNT=1;
//C count value 1
//Reload PING PaRam for Transmit -EDMA channel 2 (64)
edma3ccRegs->PARAMSET[65].OPT=0x00100000;
//Options TCINTEN set
edma3ccRegs->PARAMSET[65].SRC=(Uint32)TX_Buff_PCM0_PING;
//Source Address transmit from here
tmp = (TSLOTS_PCM0 << 16) | 1; //BCNT =TSLOTS_PCM0, ACNT =1
edma3ccRegs->PARAMSET[65].A_B_CNT=tmp;
edma3ccRegs->PARAMSET[65].DST=(Uint32)&(mcbspRegs0->DXR);
//Dest Address. This is the DXR register Address
tmp = (1<<16) ;
//DestIDX =1, SRCBIDX =0
edma3ccRegs->PARAMSET[65].SRC_DST_BIDX=tmp;
tmp = (TSLOTS_PCM0 << 16) | (((Uint32)&(edma3ccRegs->PARAMSET[64])&0xFFFF));
//BCNTRLD =TSLOTS_PCM0,LINk=Param[64]
edma3ccRegs->PARAMSET[65].LINK_BCNTRLD=tmp;
edma3ccRegs->PARAMSET[65].SRC_DST_CIDX=0;
//Src,DST Cindex
edma3ccRegs->PARAMSET[65].CCNT=1;
//C count value 1
//Enable Receiver, Transmitter
mcbspRegs0->SPCR = mcbspRegs0->SPCR
| CSL_FMK(MCBSP_SPCR_RRST,1)
| CSL_FMK(MCBSP_SPCR_XRST,1);
------------------------------------------------------------------------------------------------------------
What Do I miss ?