1.3.23.32 1.4.24.32 1.5.22.32 1.6.24.32 1.7.25.32 1.29.26.32 1.30.16.32 1.31.16.32 1.32.29.32 1.33.18.32 1.37.16.32 1.38.24.32 1.39.21.32 1.40.23.32 TCx_Compare32bitCounterGet Function
C
/* x = TC instance number */
uint32_t TCx_Compare32bitCounterGet( void );
Summary
Reads the timer current count value.
Description
This function reads the timer count value.
Precondition
TCx_CompareInitialize() function must have been called first.
Parameters
None.
Returns
Timer's current count value.
Example
uint32_t counter = 0;
TC0_CompareInitialize();
TC0_CompareStart();
counter = TC0_Compare32bitCounterGet();
Remarks
The caller must know the number of significant bytes of timer. Period value is right-aligned.