Question about disabling interrupts | Cypress Semiconductor
Question about disabling interrupts
Hello, I am wondering if someone could help me clarify the expected behaviour when disabling interrupts as I can’t quite get my head around it at the moment.
I have setup a falling edge interrupt on a digital input pin, and have an ISR that clears the interrupt and sets a flag. This all works as expected, however after the interrupt has been triggered once I expect a series of falling edges so would like to disable the interrupt until these have finished. I’ve tried using the _stop() and _disable() interrupt API commands and while these do prevent the interrupt from firing whist it is disabled, as soon as I use the _start()/ _enable() commands the ISR is triggered again. I have tried using the _ClearInterrupt() and _ClearPending() commands just before I re-enable the interrupt but this makes no difference. I realise that I haven’t disabled the interrupt signal from the digital pin, but would have thought that using _disable() would mean that this signal is ignored, or at the very least using the ClearInterrupt just before re-enabling the Interrupt would mean that any pending interrupts would be cancelled. Can anyone explain why the ISR is still being triggered please?
Thanks in advance.