Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

[VxW] tickGet() in vxworks?

1,528 views
Skip to first unread message

Subramanian, Yogalakshmi (Yogalakshmi)

unread,
Oct 21, 2003, 2:52:40 AM10/21/03
to vxwe...@csg.lbl.gov
Hi All,
I am trying to use the tickGet() ,for getting the timestamp between the two
consecutive frames.
I wanted to know how the return value of the tickGet() can be used for
millsec manipulation.
Is any conversion required for this.If so,can anyone help me how to go for
that.

Thanks and regards
Yoga

> Lucent Technologies O
> Golf View Campus Phone: +91 80 505 2426
> Wind Tunnel Road, Fax:: +91 80 527 1777/5271747
> Bangalore - 560017
> India e-mail: yogala...@lucent.com
>
"Control Anger, Before It Controls You"

Matthieu Sevestre

unread,
Oct 22, 2003, 3:34:35 AM10/22/03
to
You can use sysClkRateGet () that indicates the number of ticks per
second... with a simple calculation, you are able to get the elapsed time
between two values you got using tickGet()

Easy !

Matt


Joe Durusau

unread,
Oct 22, 2003, 8:20:12 AM10/22/03
to

tickGet returns the time in ticks, since the time was last reset.
It's speed depends on a system option. Most commonly, it counts
at a 1/60th of a second rate.

Speaking only for myself,

Joe Durusau

Patrick and Susanne

unread,
Oct 24, 2003, 3:08:22 PM10/24/03
to

Yoga,

(1000 * tickGet() / sysClkRateGet()) will give the current time in ms.
You may redefine the formula to it in the floating point.

Patrick

Susanna Jacobson

unread,
Oct 24, 2003, 3:32:53 PM10/24/03
to vxwe...@csg.lbl.gov

Martin Roth

unread,
Oct 26, 2003, 3:32:59 AM10/26/03
to
If you are trying to calculate milliseconds from tickGet() , the accuracy
will always be the accuracy of one tick. If you defined a tick as 16.666
msec (60 ticks per second), the accuracy (maximum error) is 16.666 msec.
If this accuracy is not acceptable for you, you have two choices:
1) To increase the system clock rate frequency by sysClkRateSet() call. This
will make the tick shorter. You should be very careful with this solution!!
2) To use one of the hardware timers and this depends on your processor.
If you are using PPC, you can use he Time Base register values.
It is a 64 bit high resolution timer. The frequency of this timer is
the bus frequency /4 on 82xx. So if the bus is 66 Mhz the Time Base is 16.5
Mhz.
In order to get the value of Time Base use the vxTimeBaseGet()
call. Prototype: void vxTimeBaseGet(UINT32 *, UINT32 *)
Example: vxTimeBaseGet(&tbu,&tbl)
tbu - Time base upper 32 bits
tbl -time Base lower 32 bits
If you want to know the time between two events, first sample the Time Base
register for the first and second event.
Now you need to perform a simple 64 bit arithmetic's (time2-time1)*1000/f in
order to get the time in msec.

Martin Roth
Motorola Israel


"Susanna Jacobson" <SRJac...@lbl.gov> wrote in message
news:mailman.33.106702...@csg.lbl.gov...

0 new messages