Jump to main content

##

# 1.2.11.4.9 SYS_TIME_FrequencyGet Function

## C

    uint32_t SYS_TIME_FrequencyGet ( void )

## Summary

Gets the frequency at which the hardwaer timer counts.

## Description

For tick-less mode this API returns the frequency at which the hardware timer runs. For tick-based mode, this API returns the frequency at which the hardware timer generates a periodic tick. This frequency determines the maximum resolution of all services provided by SYS_TIME.

## Precondition

The SYS_TIME_Initialize function should have been called before calling this function.

## Parameters

None

## Returns

If the timer has been initialized and is ready:

- For tick-less mode this API returns the frequency at which the hardware timer runs.
- For tick-based mode, this API returns the frequency at which the hardware timer generates a periodic tick.

Returns 0 if the timer is not initialized.

## Example

    uint32_t frequency = SYS_TIME_FrequencyGet();

## Remarks

This frequency is determined by hardware capabilities and how they are configured and initialized.