This is the mail archive of the ecos-discuss@sources.redhat.com mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

RE: timer


Hi,
  I tried running the intr.c(from tests)program HAL
interrupt API test.

I disabled the provide real time clock option.

This is the output which i get

PASS: Hal interrupt test
EXIT: OK

The isr routine is not getting called.

I am using MBX 860 as my target.

Regards,
mekala





--- Gary Thomas <gthomas@cambridge.redhat.com> wrote:
> 
> On 15-May-2001 mekala natarajan wrote:
> > Can someone tell me the timer chip(and clock
> > frequency) that is used in MBX kit. 
> > 
> > (eg.,For i386 pc target, the timer chip is 8254
> whose
> > clock frequency is 1193180HZ, from which we derive
> at
> > the kernel clock of 10ms.)
> > 
> > Basically i want to run my application within a
> time
> > frame of 2ms(which is less than a tick).Within
> this
> > 2ms frame, i need to get the current time at
> various
> > points of the frame which will be in terms of
> > microseconds.But ecos get current time system call
> > will return time in terms of ticks. For this to
> happen
> > i reduced the tick resolution to 500us. But with
> this
> > configuration performance is degrading, since most
> of
> > time is getting wasted in processing the
> interrupt.
> > 
> > Now i don't want to use the kernel clock.
> > 
> > How can i solve this problem. 
> > 
> > Can i directly access the timer chip and derive
> the 
> > desired periodicity from this.
> > 
> > Is this possible?
> > 
> > If yes.How can i do this?
> > 
> 
> The HAL_CLOCK_READ() will get you just what you
> want.  It will
> return the time (in hardware clock ticks) since the
> last system
> clock timer interrupt.  Thus it is a measure of time
> within the
> current "tick" (heartbeat). You can easily convert
> the value 
> returned into us or ms.
> 
> Look at 'kernel/current/tests/tm_basic.cxx' for
> examples of how
> to use it and how to convert the result into common
units.


__________________________________________________
Do You Yahoo!?
Yahoo! Auctions - buy the things you want at great prices
http://auctions.yahoo.com/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]