AnsweredAssumed Answered

Interrupt does nothing

Question asked by javierhernandezdeniz on Apr 1, 2019
Latest reply on Apr 1, 2019 by javierhernandezdeniz

Hello,

 

I have this code in order to print a message when the SW3 is pressed but enter in the IF conditional and not print the message and it does not go back into the loop.

 

I'm using McuExpresso and SDK2.5, the gpios are initialized from pin_mux.c and worsk fine with the numbers and letters in the 7 segment led display, but not the interrupt.

 

Should I initialize the interrupt also in pin_mux.c, instance of the source file? (as it's in the examples)

/* Init input switch GPIO.*/
#if (defined(FSL_FEATURE_PORT_HAS_NO_INTERRUPT) && FSL_FEATURE_PORT_HAS_NO_INTERRUPT)
GPIO_SetPinInterruptConfig(BOARD_SW_GPIO, BOARD_SW_GPIO_PIN, kGPIO_InterruptFallingEdge);
#else
PORT_SetPinInterruptConfig(BOARD_SW_PORT, BOARD_SW_GPIO_PIN, kPORT_InterruptFallingEdge);
#endif
EnableIRQ(BOARD_SW_IRQ);
GPIO_PinInit(BOARD_SW_GPIO, BOARD_SW_GPIO_PIN, &sw_config);

 

 

Best regards

Outcomes