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.

OMAP-L138 ARM Interrupt DSP

Other Parts Discussed in Thread: OMAP-L138

Hi all,

When I test ARM interrupt DSP to implement ARM/DSP communication on OMAP-L138 platform, use CHIPSIG3 in SYSCFG.CHIPSIG.

I found a strange problem that my ISR of CHIPSIGINT3 got invoked only once though I have write a 1 to CHIPSIG_CLR.BIT[3]. And I also cleared EVTCLR.

I am using DSP/BIOS 5.41 in CCS3.3.  The interrupt source is CHIPINT3 and its #EVT is 67. I have mapped EVT67 to HWI_13 using HWI_eventmap.

Here is my code in DSP using DSP/BIOS(also enable use dispatch):

void main()

{
          Init_int13();             
   
    LOG_printf(&trace, "hello world!");
}

void Init_int13()
{
    unsigned int *EVTMASK2 = (unsigned int*)0x01800088;
    unsigned int *EVTSET2 = (unsigned int*)0x01800028; 


    *EVTMASK2  |= (1<<3);
    *EVTSET2  |= (1<<3);

 
 HWI_eventMap(13, SYSCFG_CHIPINT3);
 HWI_dispatchPlug(ZDINTERRUPTID, (Fxn)Int13_ISR, 0, NULL);
 ICR = (0x1<<13); 

IER |= (0x1 << 13);
 CSR |= 0x1;
}

 void Int13_ISR()
{
   
     unsigned int *EVTCLR2  = (unsigned int*) 0x01800048;    
   
     if(SYSCONFIG->CHIPSIG & (1<<3) == 1)
   {
       SYSCONFIG->KICKR[0] = KICK0R_UNLOCK;
       SYSCONFIG->KICKR[1] = KICK1R_UNLOCK;

             SYSCONFIG->CHIPSIG_CLR |= (1<<3);   //disable syscfg_chipint3 intrrupt 
           *EVTCLR2 |= (1<<3);
              // lock the system config registers.
     SYSCONFIG->KICKR[0] = KICK0R_LOCK;
       SYSCONFIG->KICKR[1] = KICK1R_LOCK;
    }
          
      LOG_printf(&trace, "config INT13.");

return;
      
    }

Best wishes!

lex

  • Lex --

    I think you have a coding error.


    This if test looks bogus.  I don't think you should compare to '1' since that will always eval to 0.

    Should this?

         if(SYSCONFIG->CHIPSIG & (1<<3) == 1)
       {
           SYSCONFIG->KICKR[0] = KICK0R_UNLOCK;

           SYSCONFIG->KICKR[1] = KICK1R_UNLOCK;            

    SYSCONFIG->CHIPSIG_CLR |= (1<<3);   //disable syscfg_chipint3 intrrupt 
               *EVTCLR2 |= (1<<3);
                  // lock the system config registers.
         SYSCONFIG->KICKR[0] = KICK0R_LOCK;
           SYSCONFIG->KICKR[1] = KICK1R_LOCK;
        }

    be changed to this?

         if(SYSCONFIG->CHIPSIG & (1<<3))
       {
           SYSCONFIG->KICKR[0] = KICK0R_UNLOCK;

           SYSCONFIG->KICKR[1] = KICK1R_UNLOCK;            

    SYSCONFIG->CHIPSIG_CLR |= (1<<3);   //disable syscfg_chipint3 intrrupt 
               *EVTCLR2 |= (1<<3);
                  // lock the system config registers.
         SYSCONFIG->KICKR[0] = KICK0R_LOCK;
           SYSCONFIG->KICKR[1] = KICK1R_LOCK;
        }

     

    I've attached some sample code from our IPC product that might be useful.  4452.interrupt.zip

     

    Regards,
    -Karl-

  • xiaoxia li said:

    void main()

    {
              Init_int13();             
       
        LOG_printf(&trace, "hello world!");
    }

    void Init_int13()
    {
        unsigned int *EVTMASK2 = (unsigned int*)0x01800088;
        unsigned int *EVTSET2 = (unsigned int*)0x01800028; 


        *EVTMASK2  |= (1<<3);
        *EVTSET2  |= (1<<3);

     
     HWI_eventMap(13, SYSCFG_CHIPINT3);
     HWI_dispatchPlug(ZDINTERRUPTID, (Fxn)Int13_ISR, 0, NULL);
     ICR = (0x1<<13); 

    IER |= (0x1 << 13);
     CSR |= 0x1;
    }

    While Karl's response is probably exactly your problem, you are doing a no-no here - global interrupts should not be enabled before returning from main(), and your Init_int13() function, which is called from main(), is enableing GIE with that last statement "CSR |= 1;".

    BIOS will enable GIE for your app at the appropriate time, so you should remove your enabling code.  Also, if you need to manipulate GIE (which you can safely do *after* main() returns), you should do so with the HWI module APIs.

    Regards,

    - Rob