ESP8266 consecutive Interrupt question

When an HW ISR is invoked are additional interrupt events queued-up while the ISR is processing and then they invoke the ISR as soon as it finishes the prior interrupt?

If the answer is yes, can those interrupts be somehow flushed (ignored, queue deleted, etc)?
Or, perhaps, should I disable ISR's while processing interrupts?

Thanks,
Frank

A tentative "yes" and interrupts flushed, no. BUT you can set a boolean to tell the other interrupt code to not do anything. BUT there are lots of interrupts that do not involve your code, so I don't think you want to flush all interrupts.
Paul

So if subsequent interrupts for my HW ISR are indeed queued while the prior interrupt is being processed it's pretty tough to debounce switches, etc..... IOW, the usual delay methods to debounce cannot work as those queued bounce spikes will still cause a subsequent interrupt.

I guess I can add logic to my ISR to simply exit if an interrupt occurs too soon after the last invocation. Alternatively, although I prefer SW, I can probably add HW debounce circuitry if necessary.

If there is a better solution I am all ears.

Thanks,
Frank

I guess there is absolutely NO reason to involve interrupts with switch testing.
Paul

Sorry, actually, it's a rotary encoder...

If you use the State Table Technique interrupts from rotary encode contact bounce are properly handled. In effect, you get debouncing for free.

Here's an implementation of that technique. It's been tested on ESP8266: https://github.com/gfvalvo/NewEncoder

Thanks, gfvalvo, I'll have to take a longer look at your suggestion. Although at a glance I think it's over my head.. And I have my sketch working pretty well and I don't want to start over. I just need to overcome the interrupt queueing problem I mentioned. Worse case, I think a simple HW debounce solution is possible.

Thanks, again,
Frank

If state table decoding is over your head, that probably will also be... and it will probably end up being a giant kludge.

The GitHub library I linked includes a very simple usage example.

Thank you all for the help..

Okay maybe it's not over my head if I am willing to spend the time to study it. Although at 80 years old it's hard to focus intensely on less enjoyable activities. I'll give it a try if some of my kludge ideas fail.

Again, thank you,
Frank