thank oyu for your reply.
Yes, i have tested the gpio and the interrupt number and they are corrected.
I try to do so: in the main cycle i have replaced the flag test with the direct gpio pin test:
EnableIRQ(EXAMPLE_SW_IRQ);
GPIO_PinInit(EXAMPLE_SW_GPIO, EXAMPLE_SW_GPIO_PIN, &sw_config);
/* Enable GPIO pin interrupt */
GPIO_PortEnableInterrupts(EXAMPLE_SW_GPIO, 1U << EXAMPLE_SW_GPIO_PIN);
while(1)
{
// if(g_InputSignal)
// {
// delay();
// if(1 == GPIO_PinRead(EXAMPLE_SW_GPIO, EXAMPLE_SW_GPIO_PIN))
// {
// PRINTF("%s is turned on.\r\n", EXAMPLE_SW_NAME);
// }
// /* Reset state of switch. */
// g_InputSignal = false;
// }
delay();
if(0 == GPIO_PinRead(EXAMPLE_SW_GPIO, EXAMPLE_SW_GPIO_PIN))
{
PRINTF("%s is turned on.\r\n", EXAMPLE_SW_NAME);
}
/* Reset state of switch. */
g_InputSignal = false;
}
where:
#define EXAMPLE_SW_GPIO GPIO5
#define EXAMPLE_SW_GPIO_PIN (0U)
#define EXAMPLE_SW_IRQ GPIO5_Combined_0_15_IRQn
#define EXAMPLE_GPIO_IRQHandler GPIO5_Combined_0_15_IRQHandler
#define EXAMPLE_SW_NAME "SW8"
In this way, the program run correctly and i see on the serial link the right output when i press the button.
If i re-enable the interrupt, nothing happens...