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.

EMMIF EMA_WAIT Interrupt

I am using a custom 6746 board and CCS v5.2 to develop an application that reads from the EMIFA.  I'm using the EMIFA_INT to determine when the data is ready.  To enable this functionality I used the configuration tool to set HWI4 interrupt by setting the interrrupt selection number to 55  (the EMIFA_INT event number from the data sheet) and set it the function  to _runTaskIC (which is an external "C" funtion in my C++ program).  To enable the interrupt, I set the GIE in the CSR register to 1 and also the IER,  IE04 register to 1 and eanbled the INTMSKSET (WR_MASK_SET) in the EMIFa0DSP register.  When I run the program no interrupts are set even though when I pause I see the INTRAW (WR), INTMSK (WR_MASKED), INTMSKCLR(WR_MASK_CLR) are all set to one. Am I missing something to enable the HWI chain?  

Thanks,

Dave Meyers

  • Dave,

    The only two thing I can think of that might be a problem would be not clearing INTRAW / INTMSK WR bits before starting. Otherwise, having INTMSK.WR set should result in an interrupt.

    It does look like you have done the right things, so we can try to debug it some by turning off IER.bit4 to see if IFR.bit4 will get set. It is a fairly short logical path from EMA_WAIT to IFR, so each step along the way needs to be examined.

    Someone else may have some more direct advice, but this is what I can suggest.

    Regards,
    RandyP

  • Randy,

    In my interrupt service routine I cleared of the INTRAW register and now I'm getting repeated interrupts observed by setting a breakpoint.  However, my SEM_post does not work.  When I move the INTRAW clear out of the ISR to the posted task  the task runs but the SEM_post in this routine now has stopped working.  It appears as though the INTRAW clear kills the semaphore and the associated task never runs.  I'm using the dispatcher for this interrupt  so the code is simple (see below).  Am I missing something here?

    void isrIC(void)
    {
    #define INTRAW 0x68000040
    uint32_t *intraw = (uint32_t *) INTRAW;
    *intraw = 0;

    SEM_post(&sem0);
    }

    Dave