This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

DM3730: IVA2.2 DSP and EDMA3 and McBSP in 3D mode

Other Parts Discussed in Thread: DM3730

Hi Guys,

 

Hope you don't mind me jumping in here, but this thread was very useful for me, and I've a small query with my EDMA config on the MCBSP of the DM3730

 

I managed to get the McBSP EDMA running correctly, however I'm looking to transfer audio and kick off an interrupt after a given number of samples, and often these are much greater than the FIFO of the given McBSP.  As such, I'm trying to modify my PARAM set to do a 3D transfer where

 

A: 2 32-bit Samples (i.e. 1 Left sample, 1 Right sample)

B: 4 Samples per channel (i.e. 8)

C: Number of samples per frame/4 (i.e. we have N/4 transfers per frame, where a frame may be up to 2048 samples per channel etc ...)

 

And then this goes into a Ping/Pong buffer in the following mode (this lives in a general function, so excuse the random variables):

 

Basically, the question here is I'm not sure how to do intermediate chaining in the ping/pong buffer so I get an interrupt after the Ping buffer fills (which should happen after CCNT A/B transfer).  Of course, it was working with A/B before I started breaking it. ;)

I /think/ I'm nto that far off, but I'm not really sure how the chaining pulls together here.

 

All help gratefully received on this one!

 

cheers,

 

p.

 

  ACNT = 2 * sizeof(int);
  BCNT = 4;
  CCNT = (config->Threshold)/4;

 

mcbsp_params_ping.ACNT = ACNT; //sizeof(unsigned int);
  mcbsp_params_ping.BCNT = BCNT; //4;//config->Threshold;
  mcbsp_params_ping.CCNT = CCNT; //(config->Threshold)/4;//1
  mcbsp_params_ping.SRC = (unsigned int *)config->SrcPing;//(int *) RXBUFF2;//
  mcbsp_params_ping.DST = (unsigned int *)config->DstPing;
 
  if(config->Direction == MCBSP_INPUT)
  {
      mcbsp_params_ping.SBIDX = 0;//sizeof(int);
      mcbsp_params_ping.DBIDX = sizeof(unsigned int);
     
      mcbsp_params_ping.SCIDX = 0;
      mcbsp_params_ping.DCIDX = sizeof(unsigned int) * 4; //0;
  }
  else
  {
      mcbsp_params_ping.SBIDX = sizeof(unsigned int);
      mcbsp_params_ping.DBIDX = 0;//sizeof(int);
     
      mcbsp_params_ping.SCIDX = sizeof(unsigned int) * 4;//0;
      mcbsp_params_ping.DCIDX = 0;
  }
 
  mcbsp_params_ping.SAM = 0;
  mcbsp_params_ping.DAM = 0;
  mcbsp_params_ping.TCC = config->TCC_Ping;
  mcbsp_params_ping.TCCMODE = 0;
  mcbsp_params_ping.FWID = 0x2;
  mcbsp_params_ping.TCINTEN = 1;
  mcbsp_params_ping.ITCINTEN = 0;
  mcbsp_params_ping.ITCCHEN = 1;
  mcbsp_params_ping.BCNTRLD = BCNT;//0;//sizeof(RXBUFF1)/sizeof(int);
  mcbsp_params_ping.LINK = config->ChanPong << 5; //mcbsp2_ping << 5;
  mcbsp_params_ping.STATIC = 0;
  mcbsp_params_ping.SYNCDIM=1;
 
  mcbsp_params_pong.ACNT = ACNT; //sizeof(int);
  mcbsp_params_pong.BCNT = BCNT; //4;//config->Threshold;
  mcbsp_params_pong.CCNT = CCNT; //(config->Threshold)/4;//1;
  mcbsp_params_pong.SRC = (unsigned int *)config->SrcPong;
  mcbsp_params_pong.DST = (unsigned int *)config->DstPong;
 
  if(config->Direction == MCBSP_INPUT)
  {
      mcbsp_params_pong.SBIDX = 0;//sizeof(int);
      mcbsp_params_pong.DBIDX = sizeof(unsigned int);
     
      mcbsp_params_pong.SCIDX = 0;
    mcbsp_params_pong.DCIDX = sizeof(unsigned int)* 4;//0;
  }
  else
  {
      mcbsp_params_pong.SBIDX = sizeof(unsigned int);
      mcbsp_params_pong.DBIDX = 0;//sizeof(int);
     
      mcbsp_params_pong.SCIDX = sizeof(unsigned int)* 4;//0;
    mcbsp_params_pong.DCIDX = 0;
  }
 
  mcbsp_params_pong.SAM = 0;
  mcbsp_params_pong.DAM = 0;
  mcbsp_params_pong.TCC = config->TCC_Pong;
  mcbsp_params_pong.TCCMODE = 0;
  mcbsp_params_pong.FWID = 0x2;
  mcbsp_params_pong.TCINTEN = 1;
  mcbsp_params_pong.ITCINTEN = 0;
  mcbsp_params_pong.ITCCHEN = 1;
  mcbsp_params_pong.BCNTRLD = BCNT;//0;
  mcbsp_params_pong.LINK = config->ChanPing2 << 5;
  mcbsp_params_pong.STATIC=0;
  mcbsp_params_pong.SYNCDIM=1;
 
 
  mcbsp_params_ping2.ACNT = ACNT; //sizeof(unsigned int);
  mcbsp_params_ping2.BCNT = BCNT; //4;//config->Threshold;
  mcbsp_params_ping2.CCNT = CCNT; //(config->Threshold)/4;//1;
  mcbsp_params_ping2.SRC = (unsigned int *)config->SrcPing;//(int *) RXBUFF2;//
  mcbsp_params_ping2.DST = (unsigned int *)config->DstPing;
 
  if(config->Direction == MCBSP_INPUT)
  {
      mcbsp_params_ping2.SBIDX = 0;//sizeof(int);
      mcbsp_params_ping2.DBIDX = sizeof(unsigned int);
     
      mcbsp_params_ping2.DCIDX = 4*sizeof(unsigned int);//0;
    mcbsp_params_ping2.SCIDX = 0;
  }
  else
  {
      mcbsp_params_ping2.SBIDX = sizeof(unsigned int);
      mcbsp_params_ping2.DBIDX = 0;//sizeof(int);
     
      mcbsp_params_ping2.DCIDX = 0;
      mcbsp_params_ping2.SCIDX = 4*sizeof(unsigned int);//0;
  }

  mcbsp_params_ping2.SAM = 0;
  mcbsp_params_ping2.DAM = 0;
  mcbsp_params_ping2.TCC = config->TCC_Ping;
  mcbsp_params_ping2.TCCMODE = 0;
  mcbsp_params_ping2.FWID = 0x2;
  mcbsp_params_ping2.TCINTEN = 1;
  mcbsp_params_ping2.ITCINTEN = 0;
  mcbsp_params_ping2.ITCCHEN = 1;
  mcbsp_params_ping2.BCNTRLD = BCNT;//0;//sizeof(RXBUFF1)/sizeof(int);
  mcbsp_params_ping2.LINK = config->ChanPong << 5; //mcbsp2_ping << 5;
  mcbsp_params_ping2.STATIC = 0;
  mcbsp_params_ping2.SYNCDIM=1;

 

  • Patrick,

    You may want to change the title of this new thread to your liking. This separate thread will give you a broader set of people looking to answer your question. I never look through answered threads when I am looking to spend some time answering questions.

    There may be a few points that you need some better understanding of the operation of the EDMA3. It is not clear what you had working before or how much you changed from there, but you should have only needed to change CCNT and the two C-IDX values to get what you needed.

    You do not need to do any chaining, only linking.

    The TI Processor Wiki Pages give you access to the "C6000 Workshop with BIOS". You can search for it without the quotes and find this workshop material plus other helpful links.

    In the Training section of TI.com, there is a training video set for the C6474. It may be helpful for you to review the EDMA3/QDMA/IDMA Module, which will apply to your current questions even though the target is a different processor. You can find the complete video set at http://focus.ti.com/docs/training/catalog/events/event.jhtml?sku=OLT110002 .

    Regards,
    RandyP

     

    If you need more help, please reply back. If this answers the question, please click  Verify Answer  , below.