Jump to main content

##

# 2.11.6 CCPx_TimerFrequencyGet Function

## C

    /* x = CCP instance number */

    uint32_t CCPx_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

CCPx_TimerInitialize() function must have been called first.

## Parameters

None.

## Returns

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

## Example

    uint32_t frequency = 0;
    CCP1_TimerInitialize();
    frequency = CCP1_TimerFrequencyGet();

## Remarks

None.