This is the mail archive of the
ecos-discuss@sourceware.org
mailing list for the eCos project.
RE: how to handle missed interrupt issue?
- From: "alys" <alys-work at mail dot ru>
- To: "'Andrew Lunn'" <andrew at lunn dot ch>, "'Dave Milter'" <davemilter at gmail dot com>
- Cc: <ecos-discuss at sourceware dot org>
- Date: Thu, 5 Feb 2009 18:27:56 +0300
- Subject: RE: [ECOS] how to handle missed interrupt issue?
- Reply-to: <alys-work at mail dot ru>
If one interrupt is "pending"(waits for enabling interrupts), and next
occurs, somewhere in status register should be a flag - interrupt
overflow.
If it is set - you have interrupts lost. So you can check this flag and
have a fun.
Best regards.
Alys.
> -----Original Message-----
> From: ecos-discuss-owner@ecos.sourceware.org [mailto:ecos-discuss-
> owner@ecos.sourceware.org] On Behalf Of Andrew Lunn
> Sent: Thursday, February 05, 2009 6:00 PM
> To: Dave Milter
> Cc: ecos-discuss@sourceware.org
> Subject: Re: [ECOS] how to handle missed interrupt issue?
>
> > Now I want implement function to change circular buffer pointer,
> > but if I do such simple thing:
> > cyg_drv_isr_lock()
> > change pointer
> > cyg_drv_isr_unlock()
> >
> > there is probability that I lost interrupt between
cyg_drv_isr_lock()
> > and cyg_drv_isr_unlock(),
>
> You should not loose the interrupt. The interrupt controller will
> still capture the interrupt during the period interrupts are
> disabled. Once interrupts are enabled again you then get the
> interrupt.
>
> The only problem you have is if more than one interrupt occurs from
> the same device during the time interrupts are disabled. After
> interrupts are enabled again you only get one interrupt from the
> interrupt controller.
>
> Andrew
>
> --
> Before posting, please read the FAQ:
http://ecos.sourceware.org/fom/ecos
> and search the list archive:
http://ecos.sourceware.org/ml/ecos-discuss
--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss