1.40.19.32 RTC_Timer16FrequencyGet Function

C

uint32_t RTC_Timer16FrequencyGet ( void )

Summary

Returns the frequency at which the 16-bit timer counter is operating.

Description

This function returns the frequency at which the 16-bit timer counter is operating. The return value can be used to compute the period that needs to be set in order to operate the timer counter at a desired frequency.

Precondition

None.

Parameters

None.

Returns

Returns the frequency at which the 16-bit timer counter is operating.

Example

// Compute the period required to operate the timer at 1KHz.

uint16_t desiredFrequency = 1000;
uint16_t period = RTC_Timer16FrequencyGet()/desiredFrequency;
RTC_Initialize();
RTC_Timer16PeriodSet(period);

Remarks

None.