KL82 SDK 2.3.1 examples with interrupt not firing

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

KL82 SDK 2.3.1 examples with interrupt not firing

552 Views
marcwillem
Contributor II

Hello,

I think i found an error in the current SDK 2.3.1 build for the KL82 chips:

Affects:

Every sample using an interrupt with an IRQ >31, cf. KL82P121M72SF0RM page 73ff.

Problem:

Interrupt cannot be enabled and will not fire as the NVIC doenst supports IRQs>31.

E.g. EnableIRQ(CMP0_IRQn) will return an error flag, indicating that the interrupt cannot be enabled.

Solution:

Use INTMUX0 to map the interrupt to one of the INTMUX interrupts.

Example:

// set up the routing of CMP0 interrupt to the INTMUX0 interrupt.

INTMUX_Init(INTMUX0);
INTMUX_EnableInterrupt(INTMUX0,0,CMP0_IRQn); // CH0
EnableIRQ(INTMUX0_0_IRQn);

// handler

void INTMUX0_0_IRQHandler(void);

I hope this helps someone.

Cheers,

Marc

1 Reply

451 Views
danielchen
NXP TechSupport
NXP TechSupport

Hi Marc:

Since there is no interrupt source for CMP0, we need to map the interrupt to INTMUX0. yes, you are right.

Thank you very much for your sharing.

Regards

Daniel

0 Kudos