AnsweredAssumed Answered

Problems Disabling Hardware Interrupt -K20 DX256, MQX4.0, CW10.3

Question asked by Tom Junkans on Aug 23, 2013
Latest reply on Sep 5, 2013 by Tom Junkans

Hellow Kinetis Developers,

I set up a pin on the K20 to interrupt on a negative edge -> lwgpio_int_init(&DataReadyPin, LWGPIO_INT_MODE_FALLING)

This works great.

But after the first interrupt I need to disable the interrupt and use the line for some handshaking. But the interrupt keeps happening, and it driving me nuts

 

No other interrupt is assigned to the port I am using (I already solved that issue) but the ISR keeps getting called. ??

 

Here is my interrupt init. code:

lwgpio_init(&DataReadyPin, BSP_DATARDY, LWGPIO_DIR_INPUT, LWGPIO_VALUE_NOCHANGE)

lwgpio_set_functionality(&DataReadyPin, BSP_DATARDY_MUX_GPIO)

lwgpio_set_attribute(&DataReadyPin, LWGPIO_ATTR_PULL_UP, LWGPIO_AVAL_ENABLE);

lwgpio_int_init(&DataReadyPin, LWGPIO_INT_MODE_FALLING);

_int_install_isr(lwgpio_int_get_vector(&DataReadyPin), commCard_DrIsr, (void *) &DataReadyPin);

 

Now my code waits for the semephore the ISR sets:

/* An interrupt now occurred from the smartcard that fired this semaphore */ So now I attempt to kill the interrupt below.

lwgpio_int_enable(&DataReadyPin, FALSE);

This does not work, so I tried the below also:

_bsp_int_init(lwgpio_int_get_vector(&DataReadyPin), 3, 0, FALSE);

Nothing works, the ISR keeps getting called.

 

Any ideas or other help is much appreciated, thanks.

 

Cheers,

Tom

Outcomes