1.10.13.12 1.11.14.12 1.12.14.12 1.13.13.12 MCPWM_ChannelPrimaryTriggerSet Function

C

void MCPWM_ChannelPrimaryTriggerSet (MCPWM_CH_NUM channel, uint16_t trigger)

Summary

Writes the primary trigger compare value to trigger ADC conversion

Description

This function writes primary trigger compare value to trigger ADC conversion

Precondition

MCPWM_Initialize() function must have been called first for the associated instance. And associated channel must be running.

Parameters

Param Description
channel MCPWM channel number
trigger compare value which is compared with time base

Returns

None

Example

MCPWM_Initialize();
MCPWM_Start();
MCPWM_ChannelPrimaryTriggerSet(MCPWM_CH_0, 0x25);

Remarks

When trigger compare value matches the counter of primary time base, interrupt can be generated. And this trigger is used to synchronize an ADC conversion with the primary time base.