1.10.22.8 1.11.22.8 1.12.23.8 1.13.21.8 1.14.16.8 1.15.17.8 1.16.23.8 1.17.19.8 1.18.19.8 1.19.19.8 1.20.23.8 1.21.24.8 1.22.27.8 1.23.25.8 1.24.22.8 TMRx_PeriodSet Function

C

void TMRx_PeriodSet(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

TMRx_Initialize() function must have been called first for the given timer.

Parameters

Param Description
period new period value to set

Returns

None.

Example

uint16_t period = 0x100;
TMR2_Initialize();
TMR2_PeriodSet(period);

Remarks

If timer is operating on 32 bit mode then argument should be uint32_t type.