1.2.11.4.9 SYS_TIME_FrequencyGet Function

1.2.11.4.9 C

uint32_t SYS_TIME_FrequencyGet ( void )

1.2.11.4.9 Summary

Gets the frequency at which the hardware timer counts.

1.2.11.4.9 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.

1.2.11.4.9 Precondition

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

1.2.11.4.9 Parameters

None.

1.2.11.4.9 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.

1.2.11.4.9 Example

uint32_t frequency = SYS_TIME_FrequencyGet();

1.2.11.4.9 Remarks

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