www.beck-ipc.com

@CHIP-RTOS C Library - RTOS API


RTX_Get_RTI_Ticks

Get system's Real-Time Interrupt (RTI) count.

unsigned long RTX_Get_RTI_Ticks (void);

Return Value

Real-Time interrupt count

Comments

This 32 bit up count rolls over to zero each 2**32 real-time interrupts, which is approximately each 1193 hours of continuous operation (= 49.71 days) when operating at 1 kHz RTI rate.

A faster way to access the system's RTI up counter is to read the long word referenced by the _pRti_Tick.   This alternate approach using inline code should be considered, especially when system time is required from within time-critical code such as Interrupt Service Routines.   Keep in mind that you must momentarily mask interrupts around the 32 bit read from this location in order to assure consistent data.   Also do not forget to call RTX_FineTickInit once at the start of your program so that this pointer will be initialized.

SC1x Comments

For SC1x program's, this function is mapped to the RTX_GetTickCount API, which is equivalent for the fixed 1 kHz RTI rate.   This allows common source code to be used for the two system types.

See Also

RTOS API

This library function invokes a RTOS software interrupt. Refer to this RTOS API function's documentation for more details.

Related Topics

RTX API   Overview

Supported since or modified in @CHIP-RTOS version

    SC12SC13SC11SC1x3SC2x
    n/an/an/aV1.05V1.00

Supported by @CHIP-RTOS C Library since version

    CLIB
    V2.04

This API List
List of C Libraries
@CHIP-RTOS Main Index


End of document