6 years, 12 months ago.

K64F: SW2 interrupt not registering when used with PIT timer interrupt

So I am trying to create a game for two players where each player gets one button ie one using SW2 and the other using SW3. I consulted this: https://community.nxp.com/thread/391481 to set up interrupts for my buttons. They work fine without the PIT timers. However, once I implemented the PIT timer interrupts, only SW3 works (and I discovered that the PORTA_IRQHandler no longer work; to circumvent this, I changed its name to NMI_Handler since I noticed that SW3 is NMI). However, SW2 still does not work (it does not trigger an interrupt when it should). Why is this the case? I tried setting the NVIC priority but it still does not work.

Be the first to answer this question.