Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

The application programmer should refer to µC-OS-III API Reference for a detailed description of these services.

...

Relative and Periodic modes might not look different, but they are. In Relative mode, it is possible to miss one of the ticks when the system is heavily loaded, missing a tick or more on occasion. In Periodic mode, the task may still execute later, but it will always be synchronized to the desired number of ticks. In fact, Periodic mode is the preferred mode to use to implement a time-of-day clock.

In V3.07, the behavior of Periodic mode was altered slightly. Rather than schedule the next delay based on when the previous delay completed, we always assume the previous delay completed at a multiple of the period specified. In other words, both versions synchronize the delays to an imagined function which has the specified period, but prior versions have the function beginning at the time when the first periodic delay was requested whereas V3.07 has it beginning at time 0. Future versions may provide support for both behaviors.

Finally, you can use the absolute mode to perform a specific action at a fixed time after power up. For example, turn off a light 10 seconds after the product powers up. In this case, you would specify OS_OPT_TIME_MATCH while “dly” actually corresponds to the desired value of OSTickCtr you want to reach. However, you should use the OS_OPT_TIME_MATCH with care because somewhere else in your code you can change the value of OSTickCtr by calling OSTimeSet() as described in Time Services.

...