Hello.
Q1> I cannot jump from Main () to ISR(ButtonKeyIntHandler) when the PA [2] through PA[5] button is pressed.
Please explain what is wrong
Best Regards,
Jame,Shin
ButtonKeyIntHandler ( )
{
uint32_t ui32Ints;
ui32Ints = GPIOIntStatus(GPIO_PORTA_BASE, true);
if(ui32Ints == GPIO_INT_PIN_2)
{
....
}
if(ui32Ints == GPIO_INT_PIN_3)
{
....
}
if(ui32Ints == GPIO_INT_PIN_4)
{
....
}
if(ui32Ints == GPIO_INT_PIN_5)
{
....
}
}
Main( )
{
..
// Set for Interrupt Configure GPIO PA[2], PA[3], PA[4]; PA[5]
//
SysCtlPeripheralEnable(SYSCTL_PERIPH_GPIOA);
GPIOPadConfigSet(GPIO_PORTA_BASE, GPIO_PIN_2|GPIO_PIN_3|GPIO_PIN_4|GPIO_PIN_5, GPIO_STRENGTH_8MA,GPIO_PIN_TYPE_STD_WPU);
GPIOIntTypeSet(GPIO_PORTA_BASE, GPIO_PIN_2|GPIO_PIN_3|GPIO_PIN_4|GPIO_PIN_5, GPIO_FALLING_EDGE);
GPIOIntRegister(GPIO_PORTA_BASE, ButtonKeyIntHandler);
//
// GPIO Commit Control PA[5:2], GPIO Lock
//
HWREG(GPIO_PORTA_BASE + GPIO_O_LOCK) = GPIO_LOCK_KEY;
HWREG(GPIO_PORTA_BASE + GPIO_O_CR) |= (GPIO_PIN_2 | GPIO_PIN_3 | GPIO_PIN_4 | GPIO_PIN_5);
….
GPIOIntEnable(GPIO_PORTA_BASE, GPIO_INT_PIN_2|GPIO_INT_PIN_3|GPIO_INT_PIN_4|GPIO_INT_PIN_5);
while(1)
{
..
}
}