AnsweredAssumed Answered

21161N External Port DMA issue

Question asked by SriDevi on Apr 20, 2011
Latest reply on May 6, 2011 by jeyanthi.jegadeesan

Hi,

I am facing a problem with External port DMA operation in 21161N. Occasionally this functionality End of DMA interrupt is generated before we receive the required number of samples from the external device.  External device shows it transferred less number of samples than the expected to DSP.  Customized board does not have provision to probe DMAR1 and DMAG1 signals. Can you please help to proceed further?

 

_InitDMA :

        entry;
        i4=_siBufferInDMA1;
        ustat1=0;
        bit set ustat1 HSHAKE | PMODE4 | FLSH | INT32;
        dm(DMAC11)=ustat1;
        dm(IIEP1)=i4;
        dm(EIEP1)=i4;
        r0=1;dm(IMEP1)=r0;
        r0 = dm(_iNbInput);
        dm(CEP1)=r0;
        dm(ECEP1)=r0;
        bit clr ustat1 FLSH ;
        bit set ustat1 DEN ;
        dm(DMAC11)=ustat1;

        r0 = dm(_siVirtWriteNb);
        r0 = pass r0;
        if eq jump EndInit;

        i4=_siBufferOutDMA1;
        ustat1=0;
        bit set ustat1 HSHAKE | TRAN | PMODE4 | FLSH |INT32;
        dm(DMAC12)=ustat1;
        dm(IIEP2)=i4;
        dm(EIEP2)=i4;
        r0=1;dm(IMEP2)=r0;
        r0 = dm(_siVirtWriteNb);
        dm(CEP2)=r0;
        dm(ECEP2)=r0;
        bit clr ustat1 FLSH ;
        bit set ustat1 DEN;
        dm(DMAC12)=ustat1;

 

EndInit:

 

 

 


_ReadBuffer:
        entry;
        puts=r0;

  r0=dm(_lReadDMACounter);
  r0=r0+1;
  dm(_lReadDMACounter)=r0;

        r0=i4;
        puts=r0;
        r0 = ustat1;
        puts=r0;
        r0=dm(_FlagIn);
        btst r0 by 0;
        if sz jump ReadDMA0;
        i4=_siBufferInDMA2;
        jump ReadDMA;

ReadDMA0: 
        i4=_siBufferInDMA1;

ReadDMA:
        ustat1=DM(DMAC11);
        bit clr ustat1 DEN;
        dm(DMAC11)=ustat1;
        dm(IIEP1)=i4;
        dm(EIEP1)=i4;
        r0 = dm(_iNbInput);
        dm(CEP1)=r0;
        dm(ECEP1)=r0;
        bit set ustat1 DEN ;
        dm(DMAC11)=ustat1;

        r0=get;
        ustat1=r0;
        r0=get;
        i4=r0;
        r0=get;
        exit;

Outcomes