1.8.22.17 1.25.23.17 1.26.20.17 1.27.23.17 1.28.25.17 1.34.23.17 1.35.16.17 1.36.18.17 1.41.21.17 1.42.20.17 TCx_CHy_CompareASet Function
C
/* x = TC instance number, y= channel number */ /* 16 bit counter */ void TCx_CHy_CompareASet ( uint16_t value ) /* 32 bit counter */ void TCx_CHy_CompareASet ( uint32_t value )
Summary
Sets the Compare-A value of the given timer channel in compare mode.
Description
This function sets the Compare-A value of the given timer channel, which decides the ON time the waveform generated in compare mode.
Precondition
TCx_CHy_TimerInitialize function must have been called first for the given channel to configure channel in compare mode.
Parameters
Param | Description |
---|---|
value | Compare-A value(type varies with the bit width of the counter) |
Returns
None.
Example
TC0_CH1_CompareInitialize();
TC0_CH1_CompareASet(0x100U);
Remarks
This function is applicable only for compare mode.