1.8.22.4 1.25.23.4 1.26.20.4 1.27.23.4 1.28.25.4 1.34.23.4 1.35.16.4 1.36.18.4 1.41.21.4 1.42.20.4 TCx_CHy_TimerPeriodSet Function

C

/* x = TC instance number, y= channel number */

/* 16 bit timer */
void TCx_CHy_TimerPeriodSet ( uint16_t period );

/* 32 bit timer */
void TCx_CHy_TimerPeriodSet ( uint32_t period );

Summary

Sets the period value of a given timer channel.

Description

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

Precondition

TCx_CHy_TimerInitialize function must have been called first for the given channel.

Parameters

Param Description
Period Period value of timer which decides the timer delay (type is based on the timer bit width)

Returns

None.

Example

TC0_CH1_TimerInitialize();
TC0_CH1_TimerPeriodSet(0x500U);

Remarks

None