This is the mail archive of the
ecos-discuss@sources.redhat.com
mailing list for the eCos project.
Re: Two timer in FIQ mode
- From: "Sicheri Marco" <m dot sicheri at ctsgroup dot it>
- To: "eCos Dev.List" <ecos-devel at sources dot redhat dot com>, "eCos Discus.List" <ecos-discuss at sources dot redhat dot com>
- Cc: "DAVE - Dave Supp" <support-B2 at dave-tech dot it>, "CTS - Bessolo Mirco" <m dot bessolo at ctsgroup dot it>
- Date: Mon, 22 Nov 2004 12:06:15 +0100
- Subject: [ECOS] Re: Two timer in FIQ mode
- Organization: CTS electronics
- References: <002d01c4ce24$a1634ac0$110110ac@Msicheri><20041119123534.GN2180@lunn.ch><1100871637.26873.8.camel@gienah.localdomain> <m36542lz25.fsf@xl5.calivar.com>
- Reply-to: "Sicheri Marco" <m dot sicheri at ctsgroup dot it>
For resolve this problem, we think:
In the vector.S when the interrupt occur, immediately disable all
interrupts.
Could it be right?
Thanks,
dS,
Marco Sicheri.
This is the history:
> Mark Salter <msalter@redhat.com> writes:
>
> > On Fri, 2004-11-19 at 07:35, Andrew Lunn wrote:
> > > On Fri, Nov 19, 2004 at 11:43:39AM +0100, Sicheri Marco wrote:
> > > > I all,
> > > > I Have the Samsung s3c44b0x.
> > > > I'd like use two timer in interrupt mode.
> > > > So that i use the TIMER2 and the TIMER3 (use the
cyg_interrupt_create()).
> > > >
> > > > First step: run only the timer2 in fiq mode every 1ms. It works ok
> > > > Second step: run only the timer3 in fiq mode every 2ms. It works ok
> > > > Now: run timer2 in FIQ mode and the timer3 in IRQ mode. They work
ok.
> > > > But: if i run timer2 in FIQ mode and the timer3 in FIQ mode, they
don't
> > > > work, and the system is lock.
> > >
> > > FIQ is not heavily used so i would not be supprised if there were a
> > > few bugs remaining. Probably its a reentrance problem, ie handling a
> > > second FIQ will still handling the first. Take a look at vectors.S and
> > > see if you can find such a problem.
> > >
> >
> > That is probably the case.
> >
> > It is good to keep in mind that FIQ support in vectors.S simply
> > uses the same handling as a normal IRQ. There is no advantage to
> > using an FIQ vs IRQ. The current code was intended to workaround
> > poorly designed hardware which used the FIQ input for normal
> > interrupts. Proper FIQ support would need to do something else.
>
> To underline this, FIQ is actually more expensive that IRQ because it
> converts the state to look like an IRQ and then drops into the IRQ
> handler. The intended way of using FIQ was always to either plug a
> jump into the hardware FIQ vector, or install a VSR table entry. In
> both cases these must point to an assembly routine that then handles
> the interrupt and returns, without interacting with the rest of eCos.
>
> --
> Nick Garnett eCos Kernel Architect
> http://www.ecoscentric.com/ The eCos and RedBoot experts
--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss