AnsweredAssumed Answered

Pin Interrupt PA0, BF548

Question asked by Johan@Hannes on Jul 4, 2012
Latest reply on Jul 9, 2012 by Prashant
Branched to a new discussion

Hi guys,

 

I#m trying to initiate an GPIO interrupt, and cannot run into ISR since flag is not set. I've checked examples and will post the code below-but i can't  get it running.

 

Code:

 

//Definitions

#define GPIOA0_IAR_SETT *pSIC_IAR2&=~0x0000F000;*pSIC_IAR2|=0x00002000;*pSIC_IMASK0|=(((UINT32)1)<<19); 

//Prio lvl.9, unmask Interrupt for PINT0

 

//Funcitons

VOID GPIO_InterruptInit()

{

 

   UINT16 u16I=0;

 

   *pPORTA_DIR_CLEAR |=(PA0);

   *pPORTA_DIR_SET &=~(PA0);

   *pPORTA_INEN |=(PA0);                                             //Input enable

    ssync();

 

   for(u16I=0;u16I<0x50;u16I++)

   {

   }

 

   //Return pointer not used - initialize the interrupts

   (VOID)register_handler(ik_ivg9, &(GPIO_ISR)); 

 

    *pPINT0_ASSIGN |= B0MAP_PAL ;

 

      /* set to rising edge sensitivity */

    *pPINT0_INVERT_CLEAR |= PA0;

    *pPINT0_EDGE_SET |= PA0;

 

 

    /* W1C potential latches due to history  - needed?*/

    //*pPINT3_LATCH |= PH7;

 

    /* unmask interrupts */ 

    *pPINT0_MASK_SET |= PA0;

     GPIOA0_IAR_SETT                                                   //Interrupt assignement Reg.Lvl.9

}

Outcomes