One of the 200 interrupts does not get executed sometimes due to a single statement

Dec 14, 2006 23 Replies

Without hardware information its impossible to answer. On most processors the isr is entered because the interrupt flag has been set so there is no requirement to check it again. If you clear the flag at the start of the isr then you wont miss an interrupt that occurs during the isr, the hardware will just rerun the isr. You would miss then if there were 2 or more occuring. Correctly prioritising will solve most problems. Later in this thread you mention software interrupts, you cannot get this sort of problem with those as their code generated.

I am using Vxworks with PowerPC. I Need to handle interrupts that may occur when the other interrupt is being handled.(Nested Interrupts). I find that sometimes , one of the interrupt gets lost and the corresponding alarm gets generated as that interrupt got skipped off.

Regards, Karthik Balaguru

I make the assumption here that increments/decrements/tests of int's are atomic. Perhaps a comment to that effect should be added to alert a developer for whom this is not the case.

Oh, I thought

interrupt_flag = 0;

effectively would re-enable that interrupt, so the routine could possibly be re-entered at that point, just counting and re-enabling.

Rufus

Join the Discussion

Have something to add? Share your thoughts — no account required.

Didn't find your answer?

Ask the community — no account required