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