Buffered Interrupt


I have a small issue with an application I am working on. The application is very simple.
I monitor two inputs. A trigger input and an error input.

The main purpose of the programme is to count the number of trigger. Because the accuracy is important I have setup an interrupt for the trigger.

My second input looks for an error signal.

Everything is working okay with the exception of one small problem.
When the interrupt routine is called I disable the interrupt routine and display the counter. When I enable the routine again the counter has always increased by 1 ?

If the second trigger occurred before the interrupt was disabled how can I clear this to stop the routine been called when it is enabled ?

Any advice is appreciated.


My apologies if I have not followed etiquette or posted this in the wrong category… This is my first post and we all have to start somewhere…


Sorry, I think I may have been premature in posting my question.

I did more searching on the internet and found some information out disabling interrupts.

I changed my command from

and this has fixed the problem… I am not sure why, but thanks for anyone who read my question.