1.3.23.8 1.4.24.8 1.5.22.8 1.6.24.8 1.7.25.8 1.29.26.8 1.30.16.8 1.31.16.8 1.32.29.8 1.33.18.8 1.37.16.8 1.38.24.8 1.39.21.8 1.40.23.8 TCx_Timer16bitPeriodSet Function

C

/* x = TC instance number */
void TCx_Timer16bitPeriodSet( uint16_t period );

Summary

Sets the period value of a given timer.

Description

This function writes the period value. When timer counter matches period value,counter is reset and interrupt can be generated.

Precondition

TCx_TimerInitialize() function must have been called first.

Parameters

Param Description
period new period value to set for timer

Returns

None.

Example

uint16_t period = 0x500;
TC0_TimerInitialize();
TC0_Timer16bitPeriodSet(period);

Remarks

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