Clock and Hardware Timer usage

Cedric Aubert cedric_aubert at yahoo.fr
Thu Jul 3 15:48:25 UTC 2003


> "Victor V. Vengerov" wrote:
> >
> > Cederic,
> >
> > Cedric Aubert wrote:
> >
> > >
> > >To me, hardware need to RTEMS for all software
kind of
> > >use :
> > >
> > >- one varying HW interval timer
> > >- one RTC
> > >
> > >That all.
> > >
> > I have missed part of discussion, but I'll add my
2 kopeyki.
> >
> > Consider following:
> > - not every hardware has RTC, although it may keep
clock
> >   (think about CD/cassete player which is running
in low-power
> >    mode when turned off and handle timer
interrupts to keep
> >    clock)
> > - Frequently, RTC chip has so simple interface
that it is hard to
> >   use from software efficiently. There are   many
RTC chips
> >   which are I2C/SPI accessible. Access to them is
slow enough
> >   to perform it in everyday operations. I beleive,
even access to
> >   PC clock may be slow enough: although it has
simple I/O port
> >   interface, actual delays may be hidden in
hardware.
> >
> > So, even if your concept is correct, it may be
hard to apply it
> > to the current state of technology.
> >
> > Please, sorry if my comment do not fit into
context of this
> > discussion: I have not read/understand it
completely.
>
> I agree with both those statements.  I really
believe there is
> more potential benefit with the capability to use a
variable
> interval timer.

I am not agree with this point. The current state of
technology
can do this. I have a 68000 that do it. So it's work
good.

I agree with there is more potential benefit with the
capability to use a
variable
 interval timer.

>
> Of course, I haven't considered that there is
currently a way
> to obtain "ticks since boot" through the API.  If
you don't get a
> clock tick at a regular period, then this won't get
incremented
> correctly.  This could break programs... :(

In my mind you still have a tick but not the real HW
timer IT is the tick
but
it will be concatened with other.

today Timer IT is like this (100 ms Period for
example):


    ticks++     ticks++     ticks++     ticks++    
ticks++
	IT		IT		IT		IT		IT
______|___________|___________|___________|___________|_____\
Time
									      /


May be tomorrow will be possible to do this :

	User ask a 180 ms      End of user timeout
	    Timeout                  /|\
		 |                      |
    ticks++  |  ticks++     ticks++ |     ticks++    
ticks++
      IT    \|/   IT          IT    IT     IT         
IT
______|___________|___________|_____|______|___________|_____\
Time
             |__________180 ms_____\|                 
      /
                                   /

Is it more clear ??? :-)

The difficulty is to take care about program duration
of the HW timer (could
be easy to do with
a counter timer because don't stop and can read the
current value of it)
If we had only one timer, but should be possible to
offer possibilty of this
kind of
timeout with another HW timer.

>
> > Victor
> >
> > --
> > Victor V. Vengerov
> > OKTET Ltd.
> > Ulianovskaya st., 1, office 533, St.-Petersburg
198504 Russia
> > phone: +7 812 4284384(work),+7 812
9389372(mobile),+7 812 4281653(home)
>
> --
> Joel Sherrill, Ph.D.             Director of
Research & Development
> joel at OARcorp.com                 On-Line
Applications Research
> Ask me about RTEMS: a free RTOS  Huntsville AL 35805
> Support Available                (256) 722-9985
>


__________________________________
Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month!
http://sbc.yahoo.com



More information about the users mailing list