1.3.23.10 1.4.24.10 1.5.22.10 1.6.24.10 1.7.25.10 1.29.26.10 1.30.16.10 1.31.16.10 1.32.29.10 1.33.18.10 1.37.16.10 1.38.24.10 1.39.21.10 1.40.23.10 TCx_Timer32bitCounterGet Function

C

/* x = TC instance number */
uint32_t TCx_Timer32bitCounterGet( void );

Summary

Reads the timer current count value.

Description

This function reads the timer count value.

Precondition

TCx_TimerInitialize() function must have been called first.

Parameters

None.

Returns

Timer's current count value.

Example

uint32_t counter = 0;
TC0_TimerInitialize();
TC0_TimerStart();
counter = TC0_Timer32bitCounterGet();

Remarks

The caller must know the number of significant bytes of timer. Period value is right-aligned.