1.41.21.7 TCx_CHy_TimerFrequencyGet Function

C

/* x = TC instance number, y= channel number */
uint32_t TCx_CHy_TimerFrequencyGet ( void );

Summary

Provides the given timer's counter-increment frequency.

Description

This function provides the frequency at which the given counter increments. It can be used to convert differences between counter values to real time or real-time intervals to timer period values.

Precondition

TCx_CHy_TimerInitialize() function must have been called first for the given channel.

Parameters

None

Returns

The frequency (in Hz) at which the timer's counter increments.

Example

uint32_t frequency;

TC0_CH1_TimerInitialize();
frequency = TC0_CH1_TimerFrequencyGet();

Remarks

None