Hi, David,
I have downloaded the SDK package of FRDM-K64F based on MCUExpresso tools from the link:
www.nxp.com/ksdk
I have tested the example frdmk64f_gpio_input_interrupt, after I press SW3 on FRDM-K64F board, the void BOARD_SW_IRQ_HANDLER(void) can be entered multiple times. Pls have a test yourself and check the register setting.
void BOARD_SW_IRQ_HANDLER(void)
{
/* Clear external interrupt flag. */
GPIO_PortClearInterruptFlags(BOARD_SW_GPIO, 1U << BOARD_SW_GPIO_PIN);
/* Change state of button. */
g_ButtonPress = true;
/* Add for ARM errata 838869, affects Cortex-M4, Cortex-M4F Store immediate overlapping
exception return operation might vector to incorrect interrupt */
#if defined __CORTEX_M && (__CORTEX_M == 4U)
__DSB();
#endif
}
BOARD_SW_GPIO_PIN is 4.
BTW, the PORTA_PCR4 register is 0xA0143, pls chcek the register in debugger in your code.
The PTA4 is multiplexed with NMI pin, pls pay attention the NMI pin setting.
Hope it can help you
BR
Xiangjun rong