This is the mail archive of the
ecos-discuss@sources.redhat.com
mailing list for the eCos project.
Re: Time base
- From: Jonathan Larmour <jlarmour at redhat dot com>
- To: Robin Farine <acnrf at dial dot eunet dot ch>
- Cc: Igor Trevisan <igor dot trevisan at bluewind dot it>,ecos-discuss at sources dot redhat dot com
- Date: Tue, 15 Jan 2002 14:46:05 +0000
- Subject: Re: [ECOS] Time base
- Organization: Red Hat UK Ltd.
- References: <3C431D42.28601.1FF615C@localhost> <1011081005.7311.4.camel@halftrack>
Robin Farine wrote:
>
> On Mon, 2002-01-14 at 18:02, Igor Trevisan wrote:
> > Hi!
> >
> > I've a problem with time-base: I need to check a certain event every
> > 5ms, so I need a time-base resolution that is less than the 5ms
> > interval I have to deal with;
> > I thought to create a high priority task that awakes every 5ms,
> > does some simple operations to handle "its" event and then
> > sleep for other 5ms.
> > How can I do this?
>
> If your platform has a hardware timer capable of generating interrupts
> and with the required resolution, then you could hook an ISR to the
> interrupt vector associated with that timer.
Or you can change the frequency of the kernel real-time clock. Look at
CYGPKG_KERNEL_COUNTERS_CLOCK_OVERRIDE in the kernel CDL. There have been
discussions on ecos-discuss before on how to change these values to program
a faster clock. You can search at http://sources.redhat.com/ml/ecos-discuss
Jifl
--
Red Hat, Rustat House, Clifton Road, Cambridge, UK. Tel: +44 (1223) 271062
Maybe this world is another planet's Hell -Aldous Huxley || Opinions==mine