1.2.24.12 1.3.24.12 1.4.25.12 1.5.23.12 1.6.25.12 1.7.26.12 1.29.27.12 1.30.17.12 1.31.17.12 1.33.19.12 1.37.17.12 1.40.24.12 TCCx_Timer32bitCounterGet Function

C

/* x = TCC instance number */
uint32_t TCCx_Timer32bitCounterGet( void );

Summary

Reads the timer current count value

Description

This function reads the timer count value.

Precondition

TCCx_TimerInitialize() function must have been called first.

Parameters

Returns

None

Timer's current count value.

Example

uint32_t counter = 0;
TCC0_TimerInitialize();
TCC0_TimerStart();
counter = TCC0_Timer32bitCounterGet();

Remarks

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