1.18.19.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.