CMSIS-RTOS2  Version 2.0.0
Real-Time Operating System: API and RTX Reference Implementation
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Timer Configuration

The CMSIS-RTOS RTX provides several parameters to configure the Timer Management functions.

Object-specific Memory Allocation

See Object-specific Memory Pools.

User Timer Thread

Callback functions called when a time period expires are executed by the os_TimerThread. The priority of the Timer subsystem within the complete RTOS system is inherited from the priority of the os_TimerThread. This is configured by OS_TIMER_THREAD_PRIO. Stack for callback functions is supplied by os_TimerThread. OS_TIMER_THREAD_STACK_SIZE must satisfy the stack requirements of callback function with the highest stack usage.

Timer Configuration Options

config_wizard_timer.png
RTX_Config.c: Timer Configuration
Name #define Description
Object specific Memory allocation OS_TIMER_OBJ_MEM Enables object specific memory allocation.
Number of Timer objects OS_TIMER_NUM Defines maximum number of objects that can be active at the same time. Applies to objects with system provided memory for control blocks. Value range is [1-1000].
Timer Thread Priority OS_TIMER_THREAD_PRIO Defines priority for timer thread. Default value is 40. Value range is [8-48], in multiples of 8. The numbers have the following priority correlation: 8=Low; 16=Below Normal; 24=Normal; 32=Above Normal; 40=High; 48=Realtime
Timer Thread Stack size [bytes] OS_TIMER_THREAD_STACK_SIZE Defines stack size for Timer thread. May be set to 0 when timers are not used. Default value is 200. Value range is [0-1073741824], in multiples of 8.
Timer Callback Queue entries OS_TIMER_CB_QUEUE Number of concurrent active timer callback functions. May be set to 0 when timers are not used. Default value is 4. Value range is [0-256].