2.62.8 MCPWM_ChannelPrimaryDutySet Function

C

void MCPWM_ChannelPrimaryDutySet(MCPWM_CH_NUM channel, uint16_t duty)

Summary

Writes the primary duty cycle value of given MCPWM channel

Description

This function writes the primary duty cycle value

Precondition

MCPWM_Initialize() function must have been called first for the associated instance.

Parameters

ParamDescription
channelMCPWM channel number
dutyduty cycle value which determines ON time of waveform

Returns

None

Example

MCPWM_Initialize();
MCPWM_Start();
MCPWM_ChannelPrimaryDutySet(MCPWM_CH_0, 0x200);

Remarks

In edge-aligned mode, this specifies the trailing edge of the ON time. In center-aligned mode, this specifies the leading edge transition.