Disabling interrupts

Hi,

using this LowPower.attachInterruptWakeup()

After wake up i'll perfom a task and i need to disable a re-interrupt during this time. Only after the task is done it should be possible to interrupt again.
How can I do this?

How can I do this?

sei()/cli()
-or-
interrupts()/noInterrupts()

Is this your issue report on GitHub?

Hi Paul, thanks I tried your suggestions and recognized that I need to disable only certain interrupts.
Is this also possible?

timtailors:
Hi Paul, thanks I tried your suggestions and recognized that I need to disable only certain interrupts.
Is this also possible?

Which interrupts do you thing you need to disable? Which interrupts should remain enabled?

I have several triggers that wakes up the chip from sleep and also I need to wake up the chip when pressing the knob of an encoder.

LowPower.attachInterruptWakeup(TRIGGER_A_PIN, trigger_a_int_func, RISING);
LowPower.attachInterruptWakeup(TRIGGER_B_PIN, trigger_b_int_func, RISING);
LowPower.attachInterruptWakeup(ENCODER_KNOB_PIN, encoder_int_func, RISING);

The problem is that my menu library gets confused when I push the knob down as an interrupt is triggered even if the chip is already awake.
So my wish is to active interrupt capability right before sleeping for that encoder knob and disable interrupt -only of that knob- right after woken up.
I could nowhere find any solution to this that's why I create an issue because of the lacking information in the manual of this lib and hopefully add an explanation to the manual.

What you need to do is remove your interrupt handler and reassign it, as appropriate.

How you do that, with that library, I haven't a clue.

I suspect, though, that the real problem is with what you do in the interrupt service routine itself. Unless the ISR sets flags that the menu handler reads, the menu handler shouldn't even know that the encoder switch was pressed.

Typically, the wakeup handlers are supposed to do nothing more than handle the fact that the device is supposed to wake up. This would entail turning any capabilities back on that were turned off before the device went to sleep.