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.

problem with gpio interrupt enble

I got ur reply.. ya ok. below i have attached my program . On below program, i have problem with the line which are highlighted i red. WHile using the IntRegister() and  GPIOIntEnable() i got the result . Instaead of these inbuilt function, what i should have to use while accessing the HWREG Access Model

what is the mistake i have made in the line which are highlighted in blue. Can u please send me the HWREG access model example syntax for that   Blue Line

//GPIOIntDisable(GPIO_PORTE_BASE, GPIO_INT_PIN_4);

HWREG(GPIO_PORTE_BASE + GPIO_O_IM)= 0x00;//inrupt disable

//GPIOIntClear(GPIO_PORTE_BASE, GPIO_INT_PIN_4);
HWREG(GPIO_PORTE_BASE + GPIO_O_ICR)= 0xFF;//Intrupt Clear

GPIOIntRegister(GPIO_PORTE_BASE, GPIO_IntHandler);

//GPIOIntTypeSet(GPIO_PORTE_BASE, GPIO_PIN_4, GPIO_FALLING_EDGE);
HWREG(GPIO_PORTE_BASE + GPIO_O_IS)= 0x00;// Edge Sensitive
HWREG(GPIO_PORTE_BASE + GPIO_O_IEV)= 0x00;//Falling edge

GPIOIntEnable(GPIO_PORTE_BASE, GPIO_INT_PIN_4);
//HWREG(GPIO_PORTE_BASE + GPIO_O_IM)= 0xFF;//Intrupt Enable

  • Hi rukmani,

    The problem is that you want just to enable GPIO_INT_PIN_4 but you are enabling everything (and some more) by using 0xFF.
    Just check which value is the macro GPIO_INT_PIN_4 (whould be 0b1 << 4) and try using that as parameter.