[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Microseconds per tick
- Date: Fri, 27 Mar 2009 09:26:34 -0000
- From: manuel.coutinho at edisoft.pt (Manuel Coutinho)
- Subject: Microseconds per tick
Yes, you can only ask RTEMS to wait (task wait, wait for semaphore, message
queue, etc) for an integer number of clock ticks.
You should define the number of microseconds per tick as the greatest common
divisor (GCD) of all the time intervals you need.
Task wake after for 10 000 us and semaphore wait for a maximum of 12 000 us
=> the GCD of these numbers is 2000 us.
Therefore a clock tick should be 2000 us and the task should wake after 5
clock ticks and the semaphore for 6 clock ticks.
From: rtems-users-bounces at rtems.org [mailto:rtems-users-bounces at rtems.org]
On Behalf Of Aitor.Viana.Sanchez at esa.int
Sent: Friday, March 27, 2009 8:22 AM
To: Leonard Bise
Cc: rtems-users at rtems.com; rtems-users-bounces at rtems.org
Subject: Re: Microseconds per tick
somebody will correct me if i am wrong.
RTEMS time functionality operates with clock_tics granularity, for instance
that a task can only sleep for a integer number of clock ticks.
#define CONFIGURE_MICROSECONDS_PER_TICK 20000 /* 20 ms per clock tick */
rtems-users-bounces at rtems.org wrote on 03/27/2009 09:11:56 AM:
> Hi all,
> I'm quite new to RTEMS and I'm not very experienced so I hope you
> can give me an hand!
> We are working with a board using a LEON2 Sparc processor running at
> 80Mhz, I figured that the microseconds per tick value would be 0.
> 0125 (is this correct?).
> Shall I simply configure my application with this define ? #define
> CONFIGURE_MICROSECONDS_PER_TICK 0.0125 ?
> I hope you can help, thanks in advance.
> ps: By the way I posted once using the wrong mail address and it
> said it was awaiting approval from the moderators, please delete
> this one. This is the correct address.
> rtems-users mailing list
> rtems-users at rtems.com
-------------- next part --------------
An HTML attachment was scrubbed...