1.8.22.18 1.25.23.18 1.26.20.18 1.27.23.18 1.28.25.18 1.34.23.18 1.35.16.18 1.36.18.18 1.41.21.18 1.42.20.18 TCx_CHy_CompareBSet Function
C
/* x = TC instance number, y= channel number */ /* 16 bit counter */ void TCx_CHy_CompareBSet ( uint16_t value ) /* 32 bit counter */ void TCx_CHy_CompareBSet ( uint32_t value )
Summary
Sets the Compare-B value of the given timer channel in compare mode.
Description
This function sets the Compare-B 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-B value (type varies with the bit depth of the counter ) |
Returns
None.
Example
TC0_CH1_CompareInitialize();
TC0_CH1_CompareBSet(0x200U);
Remarks
This function is applicable only for compare mode.