1.11.14.10 MCPWM_ChannelSecondaryTriggerSet Function

C

void MCPWM_ChannelSecondaryTriggerSet (MCPWM_CH_NUM channel, uint16_t trigger)

Summary

Writes the secondary trigger compare value to trigger ADC conversion

Description

This function writes secondary 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_ChannelSecondaryTriggerSet(MCPWM_CH_0, 0x25);

Remarks

When trigger compare value matches the counter, interrupt can be generated and this trigger is used to synchronize an ADC conversion with the PWM.