1.8.22.20 1.25.23.20 1.26.20.20 1.27.23.20 1.28.25.20 1.34.23.20 1.35.16.20 1.36.18.20 1.41.21.20 1.42.20.20 TCx_CHy_CompareFrequencyGet Function

C

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

Summary

Provides the given timer's counter-increment frequency in compare mode.

Description

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

Precondition

TCx_CHy_CompareInitialize 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_CompareInitialize();
frequency = TC0_CH1_CompareFrequencyGet();

Remarks

None