Microseconds per tick

Manuel Coutinho manuel.coutinho at edisoft.pt
Fri Mar 27 09:26:34 UTC 2009



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.


Kind regards

Manuel Coutinho



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 */ 

Best regards, 


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 
> I hope you can help, thanks in advance.
> Léonard. 
> 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
> http://rtems.rtems.org/mailman/listinfo/rtems-users

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rtems.org/pipermail/users/attachments/20090327/957c77f8/attachment-0001.html>

More information about the users mailing list