Hello Daniele,
you forget to say important details as
- what MCU are you using?
- do you use KDS? which version?
- which KSDK version?
This can be caused by reserved pin.
I created the example for you, it is for FRDM-K64F with component fsl_gpio with the SW2 interrupt.
Maybe it can help you, maybe not.
Please, let me know.
Best Regards,
Iva