MIMXRT1166 GPIO Interrupt - Missing Something In Setup?

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

MIMXRT1166 GPIO Interrupt - Missing Something In Setup?

972 Views
I0nizer
Contributor II

     I'm trying to set up a GPIO rising edge interrupt that will set a flag upon firing. I am using the MCUXpresso Config Tool and made sure to set the pin interrupt to rising edge on the pin and also enabled the combined GPIO interrupt in the CM7_NVIC peripheral. I used the handler template and tried to follow the example project I saw as best as I could. 

     However, whenever the interrupt fires I get stuck in some infinite loop of the program and cannot communicate with the MCU. It doesn't put it in an unrecoverable state, but I do have to either power cycle or re-flash the MCU. Is there anything I am missing from the setup that could be interfering with my work?

0 Kudos
Reply
1 Reply

907 Views
EdwinHz
NXP TechSupport
NXP TechSupport

Hi @I0nizer,

Further information would be needed to pinpoint the cause of the unescapable infinite loop, like where in the code this infinite loop occurs, as well as the whole ConfigTools setup you did. However, I recommend looking at the implementation that the example project "evkmimxrt1160_igpio_input_interrupt_cm7" does, since this already does the implementation of what you are trying to achieve.

BR,
Edwin.

0 Kudos
Reply
%3CLINGO-SUB%20id%3D%22lingo-sub-2253377%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3EMIMXRT1166%20GPIO%20Interrupt%20-%20Missing%20Something%20In%20Setup%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2253377%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3E%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3BI'm%20trying%20to%20set%20up%20a%20GPIO%20rising%20edge%20interrupt%20that%20will%20set%20a%20flag%20upon%20firing.%20I%20am%20using%20the%20MCUXpresso%20Config%20Tool%20and%20made%20sure%20to%20set%20the%20pin%20interrupt%20to%20rising%20edge%20on%20the%20pin%20and%20also%20enabled%20the%20combined%20GPIO%20interrupt%20in%20the%20CM7_NVIC%20peripheral.%20I%20used%20the%20handler%20template%20and%20tried%20to%20follow%20the%20example%20project%20I%20saw%20as%20best%20as%20I%20could.%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3BHowever%2C%20whenever%20the%20interrupt%20fires%20I%20get%20stuck%20in%20some%20infinite%20loop%20of%20the%20program%20and%20cannot%20communicate%20with%20the%20MCU.%20It%20doesn't%20put%20it%20in%20an%20unrecoverable%20state%2C%20but%20I%20do%20have%20to%20either%20power%20cycle%20or%20re-flash%20the%20MCU.%20Is%20there%20anything%20I%20am%20missing%20from%20the%20setup%20that%20could%20be%20interfering%20with%20my%20work%3F%3C%2FP%3E%3C%2FLINGO-BODY%3E