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.

GPIO ISR not returning value

Hi.

My Interrupt Service Routine for GPIO Pin Read Doesn't store the status of Pin Interrupt in "teed" Variable

Code:

ISR for GPIO Pin 4

void
GPIOIntHandler(void)

unsigned int teed;
teed = GPIOIntStatus(GPIO_PORTF_BASE, 1);  //Unable to store the value of status register.Error:undefined value
GPIOIntClear(GPIO_PORTF_BASE , GPIO_PIN_4);
}

int
main(void)
{

.....

......

GPIOIntEnable(GPIO_PORTF_BASE , GPIO_PIN_4);

GPIOIntTypeSet(GPIO_PORTF_BASE , GPIO_PIN_4 , GPIO_BOTH_EDGES);

IntMasterEnable();
GPIOIntRegister(GPIO_PORTF_BASE , GPIOIntHandler);


while(1)

{

if( (GPIOPinRead(GPIO_PORTF_BASE, s1) == s1)) // Read if Pin is High
 {
   GPIOPinWrite(GPIO_PORTF_BASE, RED_LED|BLUE_LED|GREEN_LED, RED_LED);
  }
 else // Read if Pin is Low(Button Pressed)
  {
  GPIOPinWrite(GPIO_PORTF_BASE, RED_LED|BLUE_LED|GREEN_LED, GREEN_LED);
  }

 }
}

ISR Working Fine on pin press