Clock and Hardware Timer usage

Cedric Aubert cedric_aubert at
Wed Jul 2 15:12:54 UTC 2003

> It isn't for synchronization or precision.  It is to
> fire events that occur on second boundaries.  RTEMS
> interval based timers and wall-time based timers. 
> updates to the wall-time side of the internal
> you won't trigger events.  For example, these two
> require this type of input:
> When a user actually obtains the time, it is OK to
get the
> at least the fractional portion of the system time
> hardware.
> > > Remember that RTEMS has "interval timers" and
> > timers".

Ok for a software view but I speaking about the
hardware view :

You will have only one timer, with a varying HW
interval IT.

OK, we should have for RTEMS wall-time at least one of
this IT each second.

> That's OK for gets and sets but misses events
triggered from
> wall-time.

To me they should be like other timeout, programmed
with the
varying HW interval timer.

> Whatever portion of the TOD is obtained from the
> hardware timer should be the same regardless of
> hardware.  So there should only be two modes of
> operation -- fractional portion updated in software
> and fractional portion maintained in hardware.


> > To my mind :
> >
> > - Read RTC only one time at boot up. -> Write RTC
> > Value to TOD ( at 1 sec )
> > - Should have at less a interrupt at a half of the
> > HW Timer Value (to
> > assume rollover). -> Update TOD ( at 0.5 Max value
> > - Write TOD by System -> Write TOD from param ( at
> > ns ), Write TOD to RTC
> > ( at 1 sec )
> > - Read TOD by System -> Read Current HW Timer
Value to
> > Update TOD ( at 1
> > timer step )
> This sounds right for a separate TOD timer except
> need to do something about the timer events that can
> on 1 second boundaries.  The above gives you a
separate TOD
> timer which maintains an accurate TOD.

For me, no need of separate TOD Timer, using the same
varying HW interval

And for the Software Timer Events that can fire on 1
second boundaries, they
should use this same varying HW interval timer, with
other software timeout
a timer queue in fact.

I think, we confused some vocabulary about timer,
should be better to
each timer if is a HW Timer or SW Timer. :-)

To me, hardware need to RTEMS for all software kind of
use :

- one varying HW interval timer
- one RTC

That all.

After you should have a Queue Timer Manager where SW
TimeSliceTimeout, SW
WallTimeTimeout and
SW UserTimeout are waiting to be programmed. Each IT
we had program the
shortest timeout of
all this one.

And TOD should be made with RTC Value and HW timer.

I think we are on the good way to understand each
other !! :-)))))


Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month!

More information about the users mailing list