I am working on a project with KW41Z. I am trying to get 2 external interrupts from SW3 and SW4 buttons. When I tried this example it didn't work at all.
Sometimes I get a print on button push SW3 but it doesn't work when I push the button again. I cant understand why the same code sometimes works and sometimes doesn't.
Furthermore I saw this post Input interrupt Handler example on KW41Z and I cant get both buttons working. Shouldn't this be working if I add these lines of code (since both buttons have the same handler)?
PORT_SetPinInterruptConfig(BOARD_SW_PORT, BOARD_SW4_GPIO_PIN, kPORT_InterruptFallingEdge);
GPIO_PinInit(BOARD_SW_GPIO, BOARD_SW4_GPIO_PIN, &sw_config);