Deterministic Realtime Reaction


The OO RTX needs a regular heartbeat. If your product does not come with an RTOS extention, you must provide a heartbeat yourselves, and a common way to do that is to use a timer interrupt. The Interrupt Service Routine must call WSTRTOS_incrementRxfTicks() which allows the schedular in the OO RTX to see if timeout events must be sent to objects in your Rhapsody model. Obviously, when you program a tm( 10 ) in your UML model, you want this timout event to occur after 10 msec, so you must understand and maybe modify the relation between the timer interrupt frequency and the scheduling of timeout events..

Your target will impose some limits, some processors have a smaller interrupt latency than others:

Tick Timer Granularity

If we have a system tick of say 20ms and we ask for a timeout of 65ms, then the resulting timeout will actually be between 80ms and 100ms, depending on when the timeout is started relative to the system tick.




If precise timeouts are required, then it is recommended to use a hardware timer in combination with triggered operations.

The framework internally manages the timeout value resulting from an tm(xx) transition using an timeUnit data type. Depending on its size, this type imposes limits for a timeout value.


You need to verify the timer initialization code is appropriate for your target derivate and configuration. Please refer to the implementation of your target bridge, specifically the implementation of the function WSTTarget_Init() in WSTTarget.cWSTRTOS_Init() in WSTRTOS.c and the constant RIC_MS_PER_TICK in WSTRTOS.h.


Copyright (c) Willert Software Tools GmbH. All rights reserved.