1.2.19.11 1.3.22.11 1.4.20.11 1.5.21.11 1.6.21.11 1.7.22.11 1.29.21.11 1.30.15.5 1.31.15.5 1.32.24.11 1.33.15.5 1.37.15.5 1.38.20.11 1.39.17.11 1.40.19.11 RTC_Timer32CounterGet Function

C

uint32_t RTC_Timer32CounterGet ( void )

Summary

Get the current 32-bit counter value.

Description

This function returns the current 32-bit count value. This function can be used to retrieve the counter value at the end of a time measurement.

Precondition

RTC_Initialize must have been called for the associated RTC instance. The RTC peripheral should have been configured in 32-bit Timer Counter mode

Parameters

None.

Returns

uint32_t returns the current 32 bit counter value.

Example

// The following code example stops the counter when the counter value
// has reached 0xFFF.

RTC_Initialize();
RTC_Timer32CompareSet(0);
RTC_Timer32CounterSet(0);
RTC_Timer32Start();
while(RTC_Timer32CounterGet() < 0xFFF);

// Stop the counter.
RTC_Timer32Stop();

Remarks

None.