AnsweredAssumed Answered

LINK Port DMA interrupt

Question asked by bombardiero on Aug 15, 2011
Latest reply on Sep 13, 2011 by jeyanthi.jegadeesan

Hi , im working on ADSP-21161N Kit

 

Here is my code

 

int source[10] = {1,2,3,4,5,6,2,8,9,10};

int dest[10];


int DMA=0;


int  transmiter[8] = {0,0,0,0,0,10,1,(unsigned int)source};//set PCI bit in CP bit 17


int reciever[8] = {0,0,0,0,0,10,1,(unsigned int)dest};//set PCI bit in CP bit 17


int TEST_LINKPORT(void)
{
    
    
    
      __builtin_sysreg_write(sysreg_IMASK, 0 );
    __builtin_sysreg_write(sysreg_IRPTL, 0 );

    
    
    sysreg_bit_set(sysreg_IMASK,  LPISUMI);
    sysreg_bit_set(sysreg_LIRPTL, LP0MSK);

    sysreg_bit_set(sysreg_MODE1,  IRPTEN);
 
     interrupt(SIG_LP0I, lpISR0);
    
    
    
    
    *pLCTL = 0;
    
    EnableDMA();
    
    unsigned int x=5;
    unsigned int y=10;
    
//    *pCP4 = (unsigned int)(TCB2_values + 7);

    *pCP4 = (unsigned int)(reciever + 7);
    *pCP5 = (unsigned int)(transmiter + 7) ;

    
     

    
 
    while(DMA==0)
    {
        asm("nop;");
    }
    DMA= 0;
    
    
}


void    lpISR0( int sig_int)
{
    
    DMA=1;

}



void EnableDMA()
{
    
    *pLCTL = L0EN | L0CHEN | L0DEN | L1EN | L1CHEN | L1DEN | L1TRAN;
}

 

 

but DSP never go to interrupt. Data are sent ok , dest[10]  = {1,2,3,4,5,6,2,8,9,10}; Code is stoped at  while(DMA==0)

Outcomes