This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

IRQ Help

Hi there,

I am trying to using 2 IRQ's for 2 external interrupt in my program. The problem comes when I enable ENT2(ENT1 has already been activated). None of the interrupts works correctly at this stage. I doubt on acknowledging the interrupt at the end of ISR. When we acknowledge a ISR for ex ENT2, does it mean acknowledging for even ENT1? and so the EXT1 does not execute?

ext_irq.c

void EINT1Init( void )
{

PINSEL4 |= 0x00400000;/* set P2.10 as EINT0 and //P2.0~7 GPIO output */ EXTMODE |= EINT1_EDGE; EXTPOLAR = 0; /* INT0 is falling edge by default */

install_irq( EINT1_INT, (void *)EINT1_Handler, 2 ); return;
}

/*****************************************************************************
** Function name: EINT0_Handler
**
** Descriptions: external INT handler
**
** parameters: None
** Returned value: None
**
*****************************************************************************/
void EINT1_Handler (void) __irq
{

#if DEBUG myprintf("In EINT0_Handler\n");
#endif EXTINT |= EINT1; //code of interrupt isr VICVectAddr = 0; /* Acknowledge Interrupt */
}

void delay(void)
{ long int i=0; for(i=0;i<9;i++); return;
}

/**********************************************************************/
/**********************************************************************/
void EINT2Init( void )
{

PINSEL4 |= 0x01000000;/* set P2.12 as EINT0 and //P2.0~7 GPIO output */ EXTMODE |= EINT2_EDGE; EXTPOLAR = 0; /* INT0 is falling edge by default */

install_irq( EINT2_INT, (void *)EINT2_Handler, 5 ); return;
}

/*****************************************************************************
** Function name: EINT0_Handler
**
** Descriptions: external INT handler
**
** parameters: None
** Returned value: None
**
*****************************************************************************/
void EINT2_Handler (void) __irq
{

#if DEBUG myprintf("In EINT2_Handler\n");
#endif EXTINT |= EINT2; //code of interrupt isr FIO1PIN ^= ~(1 << 18); VICVectAddr = 0; /* Acknowledge Interrupt */
}

Kindly help on this....Thanks..

0