AnsweredAssumed Answered

Two-way transmission of external DMA chain??

Question asked by qian on Nov 27, 2010
Latest reply on Nov 30, 2010 by qian


Hi,
  I'm using the ADSP-21469 EZ-Board.
I want to use my flow chart to illustrate this problem .

dma2.jpg
DMA1 used in the audio processing function .

I used DMA0 for carry data.

my realize the code:
void dma0ISR(int sig_int)
{  
   
    int temp_idx;
    int* temp_addr;
    switch(partDMA)
    {
        case 1:
            *pDMAC0 = 0;
     *pIIEP0 =
        *pIMEP0 =
        *pICEP0 =
       
        *pECEP0 =
        *pEIEP0 =
        *pEMEP0 = 1;
        *pELEP0 = 0;
        *pEBEP0 = 0;
        partDMA++;
      
        *pDMAC0 = DEN | TRAN | DFLSH;
       
        break;
       
     case 2:
            *pDMAC0 = 0;
     *pIIEP0 = inBuffer+2);
        *pIMEP0 =
        *pICEP0 =
       
        *pECEP0 =
        *pEIEP0 =
        *pEMEP0 = 1;
        *pELEP0 = 0;
        *pEBEP0 = 0;
        partDMA++;
       
     
        *pDMAC0 = DEN | TRAN | DFLSH;
       
        break;  
       
     case 3:
            *pDMAC0 = 0;
     *pIIEP0 =
        *pIMEP0 =
        *pICEP0 =
       
        *pECEP0 =
        *pEIEP0 =
        *pEMEP0 = 1;
        *pELEP0 = 0;
        *pEBEP0 = 0;
        partDMA++;
       
     
        *pDMAC0 = DEN | TRAN | DFLSH;
       
        break;       
       
       case 4:
            *pDMAC0 = 0;
     *pIIEP0 =+4);
        *pIMEP0 =
        *pICEP0 =
       
        *pECEP0 =
        *pEIEP0 =
        *pEMEP0 = 1;
        *pELEP0 = 0;
        *pEBEP0 = 0;
        partDMA++;
      
     
        *pDMAC0 = DEN | TRAN | DFLSH;
       
        break;   
              
       
     case 5:
        *pDMAC0 = 0;
     *pIIEP0 =
        *pIMEP0 =
        *pICEP0 =
    
        *pECEP0 =
        *pEIEP0 =
        *pEMEP0 = 1;
        *pELEP0 = 0;
        *pEBEP0 = 0;
        partDMA++;
       
        *pDMAC0 = DEN | DFLSH;
     break;
     case 6:
        *pDMAC0 = 0;
     *pIIEP0 =
        *pIMEP0 =
        *pICEP0 =
    
        *pECEP0 =
        *pEIEP0 =
        *pEMEP0 = 1;
        *pELEP0 = 0;
        *pEBEP0 = 0;
        partDMA++;
       
        *pDMAC0 = DEN | DFLSH;
     break;
    
  case 7:
        *pDMAC0 = 0;
     *pIIEP0 =
        *pIMEP0 =
        *pICEP0 =
    
        *pECEP0 =
        *pEIEP0 =
        *pEMEP0 = 1;
        *pELEP0 = 0;
        *pEBEP0 = 0;
        partDMA++;
       
        *pDMAC0 = DEN | DFLSH;
     break;
    
case 8:
        *pDMAC0 = 0;
     *pIIEP0 =
        *pIMEP0 =
        *pICEP0 =
    
        *pECEP0 =
        *pEIEP0 =
        *pEMEP0 = 1;
        *pELEP0 = 0;
        *pEBEP0 = 0;
        partDMA++;
       
        *pDMAC0 = DEN | DFLSH;
     break;
           
     default: 
        partDMA=0;
        break;
    }
}

If use the DMA0 chain.  Can it be Achieved this requirement?

DeepV has provided an example of a DMA chain,But this is a ASM,I do not understand the how to use it.

I hope to have a C example, to achieve this two-way transmission.

Thanks.

Outcomes