Reduce GC calls

no, again I don’t think you’ve understood what you’ve done - or not explained what your experiments showed.

Why do you say no more interrupts for 5 seconds?

You may be finding that your interrupt handler is not being called for a period of time, but that doesn’t mean the processor isn’t handling this.

Step back here and tell us what you’re trying to achieve and we can tell you how best to deal with this - the answer will probably still be effective hardware debounce.

Also, the debounce article to end all articles: [url]Spurious Vector!

[quote]Why do you say no more interrupts for 5 seconds?
[/quote]
Because I set the timespan at 5000 ms …
BTW: The article about debouch is interesting.

To summarise the whole discussion (sorry I heyacked the topic I’am afraid) my sole purpose is to debounch a 4-switch joystick.

I think this is what happens:
I presume the cpu uses an edge-triggered flip-flop to detect the edge of the switch. After receiving the first interrupt the processor blocks interrupts. Only after timespan ts the interrupthandler enables the interrupt again. Then the handler waits for the next edge of the switch to occur.
By implementing the debouch proces this way the cpu can never be overloaded with interrupts.
Unless time ts is not set or set too low; then you may expect an overload of interrupts. And that is what happened in my application, it seemed I had set ts at 200 ms , but it was not (the reason for that is not quit clear however, but my testprogramme behaves well now).