1.2.19.29 1.3.22.29 1.4.20.29 1.5.21.29 1.6.21.29 1.7.22.29 1.29.21.29 1.30.15.21 1.31.15.21 1.32.24.29 1.33.15.21 1.37.15.21 1.38.20.29 1.39.17.29 1.40.19.29 RTC_Timer16CounterGet Function
C
uint16_t RTC_Timer16CounterGet ( void )
Summary
Get the current 16-bit counter value.
Description
This function returns the current 16-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 16-bit Timer Counter mode
Parameters
None.
Returns
uint16_t returns the current 16 bit counter value.
Example
// The following code example stops the counter when the counter value // has reached 0xFFF. RTC_Initialize(); RTC_Timer16PeriodSet(0); RTC_Timer16CounterSet(0); RTC_Timer16Start(); while(RTC_Timer16CounterGet() < 0xFFF); // Stop the counter. RTC_Timer16Stop();
Remarks
None.