[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Microseconds per tick



Hi

 

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. 

 

Example:

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

 


Hi, 

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. 

e.g. 
#define CONFIGURE_MICROSECONDS_PER_TICK 20000 /* 20 ms per clock tick */ 


Best regards, 

Aitor 

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.
> 
> 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://rtems.rtems.org/pipermail/rtems-users/attachments/20090327/957c77f8/attachment-0001.html