Message from discussion Flag for missed interrupt?
Received: by 10.180.107.167 with SMTP id hd7mr1348457wib.0.1351391094586;
Sat, 27 Oct 2012 19:24:54 -0700 (PDT)
From: rickman <gnu...@gmail.com>
Subject: Re: Flag for missed interrupt?
Date: Sat, 20 Oct 2012 19:17:34 -0400
Organization: A noiseless patient Spider
References: <M7qdnUwSuZA5WB_NnZ2dnUVZ5uSdnZ2d@giganews.com> <firstname.lastname@example.org> <y_ydncaxJO1ZUB_NnZ2dnUVZ5t2dnZ2d@giganews.com> <email@example.com> <firstname.lastname@example.org> <email@example.com>
Injection-Date: Sat, 20 Oct 2012 23:17:45 +0000 (UTC)
Injection-Info: mx04.eternal-september.org; posting-host="575a8d3a503cd2ab981bf514a483fac2";
logging-data="14010"; mail-complaints-to="ab...@eternal-september.org"; posting-account="U2FsdGVkX1/nXf3tf896XknZzSWueyRn"
User-Agent: Mozilla/5.0 (Windows NT 6.0; rv:12.0) Gecko/20120428 Thunderbird/12.0.1
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
On 10/20/2012 7:07 PM, hamilton wrote:
> On 10/20/2012 4:27 PM, rickman wrote:
>> On 10/20/2012 3:42 PM, hamilton wrote:
>>> On 10/20/2012 10:13 AM, Vladimir Vassilevsky wrote:
>>>> I need to know the fact that particular interrupt request was missed at
>>>> least once. Knowing how many times this request was missed is less
>>> I for one is a little confused about this statement.
>>> If the interrupt service routine is the only place the interrupt flag is
>>> cleared, then how can you not see the flag elsewhere ?
>>> If an interrupt flag can be cleared in two places, there is a bigger
>>> Looking at interrupt bits should not clear them.
>>> Maybe a little better description is in order.
>>> I am also assuming that these are hardware interrupts.
>> He is talking about an interrupt overrun error flag. If an interrupt if
>> not serviced before the interrupt is set again, data may have been lost.
>> Like an ADC conversion with no FIFO, etc. UARTs typically have this
>> sort of flag.
> Yes, this is not the problem.
> A lost hardware interrupt is because the code is way too busy to get
> back to it.
> If the software turns off the Global Interrupt for insistence and does
> not turn it back on in time, it can lose interrupts.
> This is not the interrupting devices fault.
> If the Global Interrupt flag is ON, then interrupts will flow.
> Maybe the processor is too small, not fast enough, or there are too many
> interrupts going on for that processor technology.
> Maybe one of the interrupt service routines is doing to much or is not
> fast enough to get the Global Interrupt turned back on.
> Bottom line, this is a software problem !
> Back to my question, what else is going on with this processor ??
> PS: Yes, I know about Overrun flags on UARTs. Slow down the Baud Rate
> fixes that.
You aren't getting what the OP is asking. He is not asking about the
cause of the problem. He is very capable of figuring that out on his
own. He is asking why there is not the debug capability that lets he
know for sure that this is the problem he is seeing!
He is debugging a problem and suspects an interrupt overrun, but is not
certain. So he would like an error flag that would tell him this is so.
I don't know anything about his setup, but using a couple of I/O lines
might let him scope the problem. One I/O line would be connected to the
interrupt via hardware if possible (some MCUs will let you bring this
signal out) and the other I/O line will be toggled in the interrupt
routine. If you see the former set without the latter toggling then you
know you missed an interrupt. But then I do FPGAs a lot more often than
MCUs; this is an easy thing to do in an FPGA. I'm not sure how many
MCUs will let you bring the interrupt signal out to a pin. But then the
interrupt may be from an external device in which case he would be in