1 year, 3 months ago.

Disabling and enabling IRQ's on the LPC1114

Hi, I am using

select_int.fall(&select_isr);

to enable an unterrupt.

Depending on the system status, I then disable the interrupt thus

select_int.fall(NULL);

I use __enable_irq(); after initializing the interrupts before the main _WFI loop.

However, the controller is still responding to the interrupt. I can see this because in the main loop (which if _WFI driven) I can see it loop through when it should only be responding to another interrupt.

The interrupts are set up right att the beginning of the program and when all enabled, the system works ok. But, I am expecting that when I disable certain interrupts, they will not cuase the main program to loop - they should not see the IRQ if I understand it correctly.

Any ideas? I am a little confused on this one.

1 Answer

1 year, 3 months ago.

Hi,

If you are using InterruptIn class, you can disable by calling:

select_int.disable_irq();

https://os.mbed.com/handbook/InterruptIn#api