RTEMS behaviour when using rtems_clock_tick incorrectly?

Sebastian Huber sebastian.huber at embedded-brains.de
Thu Jul 5 10:06:20 UTC 2012


the rtems_clock_tick() function should be called only by the clock driver.  In 
the RTEMS configuration you specify the micro seconds per tick.  The clock 
driver will then normally setup a hardware timer which triggers in the 
configured interval.  The interrupt service routine corresponding to the 
hardware timer will call rtems_clock_tick().

On 07/05/2012 11:53 AM, Leonard Bise wrote:
> Hello all,
> We're working on a project where we have a RTEMS application which uses the
> rtems_clock_tick function to signal that a tick elapsed.
> Now I just noticed that in some case the implementation is badly done and this
> function can be called two successive times in a very short amount of time.
> This happens because the rtems_clock_tick is called from an IRQ which is
> triggered when receiving a synch signal over the MIL-1553 bus. This IRQ in some
> error cases can be trigged two times in the lapse of a few milliseconds.
> For debugging purposes and to better understand the problem we have, could
> anyone shed some light on what could or would happen to RTEMS scheduling in
> case the ticks are very close to each other instead of being called roughly
> once per second?

In case the interval between rtems_clock_tick() calls doesn't fit to the value 
specified in the configuration the time of day will be wrong (maybe only 
sometimes).  Also the timeouts may be wrong.  I would say this could lead to a 
pretty unpredictable behaviour.

Sebastian Huber, embedded brains GmbH

Address : Obere Lagerstr. 30, D-82178 Puchheim, Germany
Phone   : +49 89 18 90 80 79-6
Fax     : +49 89 18 90 80 79-9
E-Mail  : sebastian.huber at embedded-brains.de
PGP     : Public key available on request.

Diese Nachricht ist keine geschäftliche Mitteilung im Sinne des EHUG.

More information about the users mailing list