M480 BSP V3.05.005
The Board Support Package for M480 Series
Macros | Functions

Macros

#define EPWM_ENABLE_COMPLEMENTARY_MODE(epwm)
 This macro enable complementary mode. More...
 
#define EPWM_DISABLE_COMPLEMENTARY_MODE(epwm)
 This macro disable complementary mode, and enable independent mode. More...
 
#define EPWM_ENABLE_GROUP_MODE(epwm)
 This macro enable group mode. More...
 
#define EPWM_DISABLE_GROUP_MODE(epwm)
 This macro disable group mode. More...
 
#define EPWM_ENABLE_TIMER_SYNC(epwm, u32ChannelMask, u32SyncSrc)
 Enable timer synchronous start counting function of specified channel(s) More...
 
#define EPWM_DISABLE_TIMER_SYNC(epwm, u32ChannelMask)
 Disable timer synchronous start counting function of specified channel(s) More...
 
#define EPWM_TRIGGER_SYNC_START(epwm)
 This macro enable EPWM counter synchronous start counting function. More...
 
#define EPWM_ENABLE_OUTPUT_INVERTER(epwm, u32ChannelMask)
 This macro enable output inverter of specified channel(s) More...
 
#define EPWM_GET_CAPTURE_RISING_DATA(epwm, u32ChannelNum)
 This macro get captured rising data. More...
 
#define EPWM_GET_CAPTURE_FALLING_DATA(epwm, u32ChannelNum)
 This macro get captured falling data. More...
 
#define EPWM_MASK_OUTPUT(epwm, u32ChannelMask, u32LevelMask)
 This macro mask output logic to high or low. More...
 
#define EPWM_SET_PRESCALER(epwm, u32ChannelNum, u32Prescaler)
 This macro set the prescaler of the selected channel. More...
 
#define EPWM_GET_PRESCALER(epwm, u32ChannelNum)
 This macro get the prescaler of the selected channel. More...
 
#define EPWM_SET_CMR(epwm, u32ChannelNum, u32CMR)
 This macro set the comparator of the selected channel. More...
 
#define EPWM_GET_CMR(epwm, u32ChannelNum)
 This macro get the comparator of the selected channel. More...
 
#define EPWM_SET_FTCMR(epwm, u32ChannelNum, u32FTCMR)
 This macro set the free trigger comparator of the selected channel. More...
 
#define EPWM_SET_CNR(epwm, u32ChannelNum, u32CNR)
 This macro set the period of the selected channel. More...
 
#define EPWM_GET_CNR(epwm, u32ChannelNum)
 This macro get the period of the selected channel. More...
 
#define EPWM_SET_ALIGNED_TYPE(epwm, u32ChannelMask, u32AlignedType)
 This macro set the EPWM aligned type. More...
 
#define EPWM_SET_LOAD_WINDOW(epwm, u32ChannelMask)
 Set load window of window loading mode for specified channel(s) More...
 
#define EPWM_TRIGGER_SYNC(epwm, u32ChannelNum)
 Trigger synchronous event from specified channel(s) More...
 
#define EPWM_CLR_COUNTER(epwm, u32ChannelMask)
 Clear counter of specified channel(s) More...
 
#define EPWM_SET_OUTPUT_LEVEL(epwm, u32ChannelMask, u32ZeroLevel, u32CmpUpLevel, u32PeriodLevel, u32CmpDownLevel)
 Set output level at zero, compare up, period(center) and compare down of specified channel(s) More...
 
#define EPWM_TRIGGER_BRAKE(epwm, u32ChannelMask, u32BrakeType)
 Trigger brake event from specified channel(s) More...
 
#define EPWM_SET_DEADZONE_CLK_SRC(epwm, u32ChannelNum, u32AfterPrescaler)
 Set Dead zone clock source. More...
 

Functions

uint32_t EPWM_ConfigCaptureChannel (EPWM_T *epwm, uint32_t u32ChannelNum, uint32_t u32UnitTimeNsec, uint32_t u32CaptureEdge)
 Configure EPWM capture and get the nearest unit time. More...
 
uint32_t EPWM_ConfigOutputChannel (EPWM_T *epwm, uint32_t u32ChannelNum, uint32_t u32Frequency, uint32_t u32DutyCycle)
 This function Configure EPWM generator and get the nearest frequency in edge aligned(up counter type) auto-reload mode. More...
 
void EPWM_Start (EPWM_T *epwm, uint32_t u32ChannelMask)
 Start EPWM module. More...
 
void EPWM_Stop (EPWM_T *epwm, uint32_t u32ChannelMask)
 Stop EPWM module. More...
 
void EPWM_ForceStop (EPWM_T *epwm, uint32_t u32ChannelMask)
 Stop EPWM generation immediately by clear channel enable bit. More...
 
void EPWM_EnableADCTrigger (EPWM_T *epwm, uint32_t u32ChannelNum, uint32_t u32Condition)
 Enable selected channel to trigger ADC. More...
 
void EPWM_DisableADCTrigger (EPWM_T *epwm, uint32_t u32ChannelNum)
 Disable selected channel to trigger ADC. More...
 
int32_t EPWM_EnableADCTriggerPrescale (EPWM_T *epwm, uint32_t u32ChannelNum, uint32_t u32Prescale, uint32_t u32PrescaleCnt)
 Enable and configure trigger ADC prescale. More...
 
void EPWM_DisableADCTriggerPrescale (EPWM_T *epwm, uint32_t u32ChannelNum)
 Disable Trigger ADC prescale function. More...
 
void EPWM_ClearADCTriggerFlag (EPWM_T *epwm, uint32_t u32ChannelNum, uint32_t u32Condition)
 Clear selected channel trigger ADC flag. More...
 
uint32_t EPWM_GetADCTriggerFlag (EPWM_T *epwm, uint32_t u32ChannelNum)
 Get selected channel trigger ADC flag. More...
 
void EPWM_EnableDACTrigger (EPWM_T *epwm, uint32_t u32ChannelNum, uint32_t u32Condition)
 Enable selected channel to trigger DAC. More...
 
void EPWM_DisableDACTrigger (EPWM_T *epwm, uint32_t u32ChannelNum)
 Disable selected channel to trigger DAC. More...
 
void EPWM_ClearDACTriggerFlag (EPWM_T *epwm, uint32_t u32ChannelNum, uint32_t u32Condition)
 Clear selected channel trigger DAC flag. More...
 
uint32_t EPWM_GetDACTriggerFlag (EPWM_T *epwm, uint32_t u32ChannelNum)
 Get selected channel trigger DAC flag. More...
 
void EPWM_EnableFaultBrake (EPWM_T *epwm, uint32_t u32ChannelMask, uint32_t u32LevelMask, uint32_t u32BrakeSource)
 This function enable fault brake of selected channel(s) More...
 
void EPWM_EnableCapture (EPWM_T *epwm, uint32_t u32ChannelMask)
 Enable capture of selected channel(s) More...
 
void EPWM_DisableCapture (EPWM_T *epwm, uint32_t u32ChannelMask)
 Disable capture of selected channel(s) More...
 
void EPWM_EnableOutput (EPWM_T *epwm, uint32_t u32ChannelMask)
 Enables EPWM output generation of selected channel(s) More...
 
void EPWM_DisableOutput (EPWM_T *epwm, uint32_t u32ChannelMask)
 Disables EPWM output generation of selected channel(s) More...
 
void EPWM_EnablePDMA (EPWM_T *epwm, uint32_t u32ChannelNum, uint32_t u32RisingFirst, uint32_t u32Mode)
 Enables PDMA transfer of selected channel for EPWM capture. More...
 
void EPWM_DisablePDMA (EPWM_T *epwm, uint32_t u32ChannelNum)
 Disables PDMA transfer of selected channel for EPWM capture. More...
 
void EPWM_EnableDeadZone (EPWM_T *epwm, uint32_t u32ChannelNum, uint32_t u32Duration)
 Enable Dead zone of selected channel. More...
 
void EPWM_DisableDeadZone (EPWM_T *epwm, uint32_t u32ChannelNum)
 Disable Dead zone of selected channel. More...
 
void EPWM_EnableCaptureInt (EPWM_T *epwm, uint32_t u32ChannelNum, uint32_t u32Edge)
 Enable capture interrupt of selected channel. More...
 
void EPWM_DisableCaptureInt (EPWM_T *epwm, uint32_t u32ChannelNum, uint32_t u32Edge)
 Disable capture interrupt of selected channel. More...
 
void EPWM_ClearCaptureIntFlag (EPWM_T *epwm, uint32_t u32ChannelNum, uint32_t u32Edge)
 Clear capture interrupt of selected channel. More...
 
uint32_t EPWM_GetCaptureIntFlag (EPWM_T *epwm, uint32_t u32ChannelNum)
 Get capture interrupt of selected channel. More...
 
void EPWM_EnableDutyInt (EPWM_T *epwm, uint32_t u32ChannelNum, uint32_t u32IntDutyType)
 Enable duty interrupt of selected channel. More...
 
void EPWM_DisableDutyInt (EPWM_T *epwm, uint32_t u32ChannelNum)
 Disable duty interrupt of selected channel. More...
 
void EPWM_ClearDutyIntFlag (EPWM_T *epwm, uint32_t u32ChannelNum)
 Clear duty interrupt flag of selected channel. More...
 
uint32_t EPWM_GetDutyIntFlag (EPWM_T *epwm, uint32_t u32ChannelNum)
 Get duty interrupt flag of selected channel. More...
 
void EPWM_EnableFaultBrakeInt (EPWM_T *epwm, uint32_t u32BrakeSource)
 This function enable fault brake interrupt. More...
 
void EPWM_DisableFaultBrakeInt (EPWM_T *epwm, uint32_t u32BrakeSource)
 This function disable fault brake interrupt. More...
 
void EPWM_ClearFaultBrakeIntFlag (EPWM_T *epwm, uint32_t u32BrakeSource)
 This function clear fault brake interrupt of selected source. More...
 
uint32_t EPWM_GetFaultBrakeIntFlag (EPWM_T *epwm, uint32_t u32BrakeSource)
 This function get fault brake interrupt flag of selected source. More...
 
void EPWM_EnablePeriodInt (EPWM_T *epwm, uint32_t u32ChannelNum, uint32_t u32IntPeriodType)
 Enable period interrupt of selected channel. More...
 
void EPWM_DisablePeriodInt (EPWM_T *epwm, uint32_t u32ChannelNum)
 Disable period interrupt of selected channel. More...
 
void EPWM_ClearPeriodIntFlag (EPWM_T *epwm, uint32_t u32ChannelNum)
 Clear period interrupt of selected channel. More...
 
uint32_t EPWM_GetPeriodIntFlag (EPWM_T *epwm, uint32_t u32ChannelNum)
 Get period interrupt of selected channel. More...
 
void EPWM_EnableZeroInt (EPWM_T *epwm, uint32_t u32ChannelNum)
 Enable zero interrupt of selected channel. More...
 
void EPWM_DisableZeroInt (EPWM_T *epwm, uint32_t u32ChannelNum)
 Disable zero interrupt of selected channel. More...
 
void EPWM_ClearZeroIntFlag (EPWM_T *epwm, uint32_t u32ChannelNum)
 Clear zero interrupt of selected channel. More...
 
uint32_t EPWM_GetZeroIntFlag (EPWM_T *epwm, uint32_t u32ChannelNum)
 Get zero interrupt of selected channel. More...
 
void EPWM_EnableAcc (EPWM_T *epwm, uint32_t u32ChannelNum, uint32_t u32IntFlagCnt, uint32_t u32IntAccSrc)
 Enable interrupt flag accumulator of selected channel. More...
 
void EPWM_DisableAcc (EPWM_T *epwm, uint32_t u32ChannelNum)
 Disable interrupt flag accumulator of selected channel. More...
 
void EPWM_EnableAccInt (EPWM_T *epwm, uint32_t u32ChannelNum)
 Enable interrupt flag accumulator interrupt of selected channel. More...
 
void EPWM_DisableAccInt (EPWM_T *epwm, uint32_t u32ChannelNum)
 Disable interrupt flag accumulator interrupt of selected channel. More...
 
void EPWM_ClearAccInt (EPWM_T *epwm, uint32_t u32ChannelNum)
 Clear interrupt flag accumulator interrupt of selected channel. More...
 
uint32_t EPWM_GetAccInt (EPWM_T *epwm, uint32_t u32ChannelNum)
 Get interrupt flag accumulator interrupt of selected channel. More...
 
void EPWM_EnableAccPDMA (EPWM_T *epwm, uint32_t u32ChannelNum)
 Enable accumulator PDMA of selected channel. More...
 
void EPWM_DisableAccPDMA (EPWM_T *epwm, uint32_t u32ChannelNum)
 Disable accumulator PDMA of selected channel. More...
 
void EPWM_EnableAccStopMode (EPWM_T *epwm, uint32_t u32ChannelNum)
 Enable interrupt flag accumulator stop mode of selected channel. More...
 
void EPWM_DisableAccStopMode (EPWM_T *epwm, uint32_t u32ChannelNum)
 Disable interrupt flag accumulator stop mode of selected channel. More...
 
void EPWM_ClearFTDutyIntFlag (EPWM_T *epwm, uint32_t u32ChannelNum)
 Clear free trigger duty interrupt flag of selected channel. More...
 
uint32_t EPWM_GetFTDutyIntFlag (EPWM_T *epwm, uint32_t u32ChannelNum)
 Get free trigger duty interrupt flag of selected channel. More...
 
void EPWM_EnableLoadMode (EPWM_T *epwm, uint32_t u32ChannelNum, uint32_t u32LoadMode)
 Enable load mode of selected channel. More...
 
void EPWM_DisableLoadMode (EPWM_T *epwm, uint32_t u32ChannelNum, uint32_t u32LoadMode)
 Disable load mode of selected channel. More...
 
void EPWM_ConfigSyncPhase (EPWM_T *epwm, uint32_t u32ChannelNum, uint32_t u32SyncSrc, uint32_t u32Direction, uint32_t u32StartPhase)
 Configure synchronization phase of selected channel. More...
 
void EPWM_EnableSyncPhase (EPWM_T *epwm, uint32_t u32ChannelMask)
 Enable SYNC phase of selected channel(s) More...
 
void EPWM_DisableSyncPhase (EPWM_T *epwm, uint32_t u32ChannelMask)
 Disable SYNC phase of selected channel(s) More...
 
void EPWM_EnableSyncNoiseFilter (EPWM_T *epwm, uint32_t u32ClkCnt, uint32_t u32ClkDivSel)
 Enable EPWM SYNC_IN noise filter function. More...
 
void EPWM_DisableSyncNoiseFilter (EPWM_T *epwm)
 Disable EPWM SYNC_IN noise filter function. More...
 
void EPWM_EnableSyncPinInverse (EPWM_T *epwm)
 Enable EPWM SYNC input pin inverse function. More...
 
void EPWM_DisableSyncPinInverse (EPWM_T *epwm)
 Disable EPWM SYNC input pin inverse function. More...
 
void EPWM_SetClockSource (EPWM_T *epwm, uint32_t u32ChannelNum, uint32_t u32ClkSrcSel)
 Set EPWM clock source. More...
 
void EPWM_EnableBrakeNoiseFilter (EPWM_T *epwm, uint32_t u32BrakePinNum, uint32_t u32ClkCnt, uint32_t u32ClkDivSel)
 Enable EPWM brake noise filter function. More...
 
void EPWM_DisableBrakeNoiseFilter (EPWM_T *epwm, uint32_t u32BrakePinNum)
 Disable EPWM brake noise filter function. More...
 
void EPWM_EnableBrakePinInverse (EPWM_T *epwm, uint32_t u32BrakePinNum)
 Enable EPWM brake pin inverse function. More...
 
void EPWM_DisableBrakePinInverse (EPWM_T *epwm, uint32_t u32BrakePinNum)
 Disable EPWM brake pin inverse function. More...
 
void EPWM_SetBrakePinSource (EPWM_T *epwm, uint32_t u32BrakePinNum, uint32_t u32SelAnotherModule)
 Set EPWM brake pin source. More...
 
void EPWM_SetLeadingEdgeBlanking (EPWM_T *epwm, uint32_t u32TrigSrcSel, uint32_t u32TrigType, uint32_t u32BlankingCnt, uint32_t u32BlankingEnable)
 Set EPWM leading edge blanking function. More...
 
uint32_t EPWM_GetWrapAroundFlag (EPWM_T *epwm, uint32_t u32ChannelNum)
 Get the time-base counter reached its maximum value flag of selected channel. More...
 
void EPWM_ClearWrapAroundFlag (EPWM_T *epwm, uint32_t u32ChannelNum)
 Clear the time-base counter reached its maximum value flag of selected channel. More...
 
void EPWM_EnableFaultDetect (EPWM_T *epwm, uint32_t u32ChannelNum, uint32_t u32AfterPrescaler, uint32_t u32ClkSel)
 Enable fault detect of selected channel. More...
 
void EPWM_DisableFaultDetect (EPWM_T *epwm, uint32_t u32ChannelNum)
 Disable fault detect of selected channel. More...
 
void EPWM_EnableFaultDetectOutput (EPWM_T *epwm, uint32_t u32ChannelNum)
 Enable fault detect output of selected channel. More...
 
void EPWM_DisableFaultDetectOutput (EPWM_T *epwm, uint32_t u32ChannelNum)
 Disable fault detect output of selected channel. More...
 
void EPWM_EnableFaultDetectDeglitch (EPWM_T *epwm, uint32_t u32ChannelNum, uint32_t u32DeglitchSmpCycle)
 Enable fault detect deglitch function of selected channel. More...
 
void EPWM_DisableFaultDetectDeglitch (EPWM_T *epwm, uint32_t u32ChannelNum)
 Disable fault detect deglitch function of selected channel. More...
 
void EPWM_EnableFaultDetectMask (EPWM_T *epwm, uint32_t u32ChannelNum, uint32_t u32MaskCnt)
 Enable fault detect mask function of selected channel. More...
 
void EPWM_DisableFaultDetectMask (EPWM_T *epwm, uint32_t u32ChannelNum)
 Disable fault detect mask function of selected channel. More...
 
void EPWM_EnableFaultDetectInt (EPWM_T *epwm, uint32_t u32ChannelNum)
 Enable fault detect interrupt of selected channel. More...
 
void EPWM_DisableFaultDetectInt (EPWM_T *epwm, uint32_t u32ChannelNum)
 Disable fault detect interrupt of selected channel. More...
 
void EPWM_ClearFaultDetectInt (EPWM_T *epwm, uint32_t u32ChannelNum)
 Clear fault detect interrupt of selected channel. More...
 
uint32_t EPWM_GetFaultDetectInt (EPWM_T *epwm, uint32_t u32ChannelNum)
 Get fault detect interrupt of selected channel. More...
 

Detailed Description

Macro Definition Documentation

◆ EPWM_CLR_COUNTER

#define EPWM_CLR_COUNTER (   epwm,
  u32ChannelMask 
)

Clear counter of specified channel(s)

Parameters
[in]epwmThe pointer of the specified EPWM module
[in]u32ChannelMaskCombination of enabled channels. Each bit corresponds to a channel Bit 0 represents channel 0, bit 1 represents channel 1...
Returns
None

This macro is used to clear counter of specified channel(s).

Definition at line 471 of file epwm.h.

◆ EPWM_DISABLE_COMPLEMENTARY_MODE

#define EPWM_DISABLE_COMPLEMENTARY_MODE (   epwm)

This macro disable complementary mode, and enable independent mode.

Parameters
[in]epwmThe pointer of the specified EPWM module
Returns
None

This macro is used to disable complementary mode of EPWM module.

Definition at line 225 of file epwm.h.

◆ EPWM_DISABLE_GROUP_MODE

#define EPWM_DISABLE_GROUP_MODE (   epwm)

This macro disable group mode.

Parameters
[in]epwmThe pointer of the specified EPWM module
Returns
None

This macro is used to disable group mode of EPWM module.

Definition at line 243 of file epwm.h.

◆ EPWM_DISABLE_TIMER_SYNC

#define EPWM_DISABLE_TIMER_SYNC (   epwm,
  u32ChannelMask 
)

Disable timer synchronous start counting function of specified channel(s)

Parameters
[in]epwmThe pointer of the specified EPWM module
[in]u32ChannelMaskCombination of enabled channels. Each bit corresponds to a channel Bit 0 represents channel 0, bit 1 represents channel 1...
Returns
None

This macro is used to disable timer synchronous start counting function of specified channel(s).

Definition at line 270 of file epwm.h.

◆ EPWM_ENABLE_COMPLEMENTARY_MODE

#define EPWM_ENABLE_COMPLEMENTARY_MODE (   epwm)

This macro enable complementary mode.

Parameters
[in]epwmThe pointer of the specified EPWM module
Returns
None

This macro is used to enable complementary mode of EPWM module.

Definition at line 216 of file epwm.h.

◆ EPWM_ENABLE_GROUP_MODE

#define EPWM_ENABLE_GROUP_MODE (   epwm)

This macro enable group mode.

Parameters
[in]epwmThe pointer of the specified EPWM module
Returns
None

This macro is used to enable group mode of EPWM module.

Definition at line 234 of file epwm.h.

◆ EPWM_ENABLE_OUTPUT_INVERTER

#define EPWM_ENABLE_OUTPUT_INVERTER (   epwm,
  u32ChannelMask 
)

This macro enable output inverter of specified channel(s)

Parameters
[in]epwmThe pointer of the specified EPWM module
[in]u32ChannelMaskCombination of enabled channels. Each bit corresponds to a channel Bit 0 represents channel 0, bit 1 represents channel 1...
Returns
None

This macro is used to enable output inverter of specified channel(s).

Definition at line 298 of file epwm.h.

◆ EPWM_ENABLE_TIMER_SYNC

#define EPWM_ENABLE_TIMER_SYNC (   epwm,
  u32ChannelMask,
  u32SyncSrc 
)

Enable timer synchronous start counting function of specified channel(s)

Parameters
[in]epwmThe pointer of the specified EPWM module
[in]u32ChannelMaskCombination of enabled channels. Each bit corresponds to a channel Bit 0 represents channel 0, bit 1 represents channel 1...
[in]u32SyncSrcSynchronous start source selection, valid values are:
Returns
None

This macro is used to enable timer synchronous start counting function of specified channel(s).

Definition at line 259 of file epwm.h.

◆ EPWM_GET_CAPTURE_FALLING_DATA

#define EPWM_GET_CAPTURE_FALLING_DATA (   epwm,
  u32ChannelNum 
)

This macro get captured falling data.

Parameters
[in]epwmThe pointer of the specified EPWM module
[in]u32ChannelNumEPWM channel number. Valid values are between 0~5
Returns
None

This macro is used to get captured falling data of specified channel.

Definition at line 318 of file epwm.h.

◆ EPWM_GET_CAPTURE_RISING_DATA

#define EPWM_GET_CAPTURE_RISING_DATA (   epwm,
  u32ChannelNum 
)

This macro get captured rising data.

Parameters
[in]epwmThe pointer of the specified EPWM module
[in]u32ChannelNumEPWM channel number. Valid values are between 0~5
Returns
None

This macro is used to get captured rising data of specified channel.

Definition at line 308 of file epwm.h.

◆ EPWM_GET_CMR

#define EPWM_GET_CMR (   epwm,
  u32ChannelNum 
)

This macro get the comparator of the selected channel.

Parameters
[in]epwmThe pointer of the specified EPWM module
[in]u32ChannelNumEPWM channel number. Valid values are between 0~5
Returns
Return the comparator of specified channel. Valid values are between 0~0xFFFF

This macro is used to get the comparator of specified channel.

Definition at line 382 of file epwm.h.

◆ EPWM_GET_CNR

#define EPWM_GET_CNR (   epwm,
  u32ChannelNum 
)

This macro get the period of the selected channel.

Parameters
[in]epwmThe pointer of the specified EPWM module
[in]u32ChannelNumEPWM channel number. Valid values are between 0~5
Returns
Return the period of specified channel. Valid values are between 0~0xFFFF

This macro is used to get the period of specified channel.

Definition at line 417 of file epwm.h.

◆ EPWM_GET_PRESCALER

#define EPWM_GET_PRESCALER (   epwm,
  u32ChannelNum 
)

This macro get the prescaler of the selected channel.

Parameters
[in]epwmThe pointer of the specified EPWM module
[in]u32ChannelNumEPWM channel number. Valid values are between 0~5
Returns
Return Clock prescaler of specified channel. Valid values are between 0 ~ 0xFFF

This macro is used to get the prescaler of specified channel.

Note
Every even channel N, and channel (N + 1) share a prescaler. So if channel 0 prescaler changed, channel 1 will also be affected. The clock of EPWM counter is divided by (u32Prescaler + 1).

Definition at line 360 of file epwm.h.

◆ EPWM_MASK_OUTPUT

#define EPWM_MASK_OUTPUT (   epwm,
  u32ChannelMask,
  u32LevelMask 
)

This macro mask output logic to high or low.

Parameters
[in]epwmThe pointer of the specified EPWM module
[in]u32ChannelMaskCombination of enabled channels. Each bit corresponds to a channel Bit 0 represents channel 0, bit 1 represents channel 1...
[in]u32LevelMaskOutput logic to high or low
Returns
None

This macro is used to mask output logic to high or low of specified channel(s).

Note
If u32ChannelMask parameter is 0, then mask function will be disabled.

Definition at line 331 of file epwm.h.

◆ EPWM_SET_ALIGNED_TYPE

#define EPWM_SET_ALIGNED_TYPE (   epwm,
  u32ChannelMask,
  u32AlignedType 
)

This macro set the EPWM aligned type.

Parameters
[in]epwmThe pointer of the specified EPWM module
[in]u32ChannelMaskCombination of enabled channels. Each bit corresponds to a channel Bit 0 represents channel 0, bit 1 represents channel 1...
[in]u32AlignedTypeEPWM aligned type, valid values are:
Returns
None

This macro is used to set the EPWM aligned type of specified channel(s).

Definition at line 431 of file epwm.h.

◆ EPWM_SET_CMR

#define EPWM_SET_CMR (   epwm,
  u32ChannelNum,
  u32CMR 
)

This macro set the comparator of the selected channel.

Parameters
[in]epwmThe pointer of the specified EPWM module
[in]u32ChannelNumEPWM channel number. Valid values are between 0~5
[in]u32CMRComparator of specified channel. Valid values are between 0~0xFFFF
Returns
None

This macro is used to set the comparator of specified channel.

Note
This new setting will take effect on next EPWM period.

Definition at line 372 of file epwm.h.

◆ EPWM_SET_CNR

#define EPWM_SET_CNR (   epwm,
  u32ChannelNum,
  u32CNR 
)

This macro set the period of the selected channel.

Parameters
[in]epwmThe pointer of the specified EPWM module
[in]u32ChannelNumEPWM channel number. Valid values are between 0~5
[in]u32CNRPeriod of specified channel. Valid values are between 0~0xFFFF
Returns
None

This macro is used to set the period of specified channel.

Note
This new setting will take effect on next EPWM period.
EPWM counter will stop if period length set to 0.

Definition at line 407 of file epwm.h.

◆ EPWM_SET_DEADZONE_CLK_SRC

#define EPWM_SET_DEADZONE_CLK_SRC (   epwm,
  u32ChannelNum,
  u32AfterPrescaler 
)

Set Dead zone clock source.

Parameters
[in]epwmThe pointer of the specified EPWM module
[in]u32ChannelNumEPWM channel number. Valid values are between 0~5
[in]u32AfterPrescalerDead zone clock source is from prescaler output. Valid values are TRUE (after prescaler) or FALSE (before prescaler).
Returns
None

This macro is used to set Dead zone clock source. Every two channels share the same setting.

Note
The write-protection function should be disabled before using this function.

Definition at line 539 of file epwm.h.

◆ EPWM_SET_FTCMR

#define EPWM_SET_FTCMR (   epwm,
  u32ChannelNum,
  u32FTCMR 
)

This macro set the free trigger comparator of the selected channel.

Parameters
[in]epwmThe pointer of the specified EPWM module
[in]u32ChannelNumEPWM channel number. Valid values are between 0~5
[in]u32FTCMRFree trigger comparator of specified channel. Valid values are between 0~0xFFFF
Returns
None

This macro is used to set the free trigger comparator of specified channel.

Note
This new setting will take effect on next EPWM period.

Definition at line 394 of file epwm.h.

◆ EPWM_SET_LOAD_WINDOW

#define EPWM_SET_LOAD_WINDOW (   epwm,
  u32ChannelMask 
)

Set load window of window loading mode for specified channel(s)

Parameters
[in]epwmThe pointer of the specified EPWM module
[in]u32ChannelMaskCombination of enabled channels. Each bit corresponds to a channel Bit 0 represents channel 0, bit 1 represents channel 1...
Returns
None

This macro is used to set load window of window loading mode for specified channel(s).

Definition at line 449 of file epwm.h.

◆ EPWM_SET_OUTPUT_LEVEL

#define EPWM_SET_OUTPUT_LEVEL (   epwm,
  u32ChannelMask,
  u32ZeroLevel,
  u32CmpUpLevel,
  u32PeriodLevel,
  u32CmpDownLevel 
)

Set output level at zero, compare up, period(center) and compare down of specified channel(s)

Parameters
[in]epwmThe pointer of the specified EPWM module
[in]u32ChannelMaskCombination of enabled channels. Each bit corresponds to a channel Bit 0 represents channel 0, bit 1 represents channel 1...
[in]u32ZeroLeveloutput level at zero point, valid values are:
[in]u32CmpUpLeveloutput level at compare up point, valid values are:
[in]u32PeriodLeveloutput level at period(center) point, valid values are:
[in]u32CmpDownLeveloutput level at compare down point, valid values are:
Returns
None

This macro is used to Set output level at zero, compare up, period(center) and compare down of specified channel(s).

Definition at line 502 of file epwm.h.

◆ EPWM_SET_PRESCALER

#define EPWM_SET_PRESCALER (   epwm,
  u32ChannelNum,
  u32Prescaler 
)

This macro set the prescaler of the selected channel.

Parameters
[in]epwmThe pointer of the specified EPWM module
[in]u32ChannelNumEPWM channel number. Valid values are between 0~5
[in]u32PrescalerClock prescaler of specified channel. Valid values are between 0 ~ 0xFFF
Returns
None

This macro is used to set the prescaler of specified channel.

Note
Every even channel N, and channel (N + 1) share a prescaler. So if channel 0 prescaler changed, channel 1 will also be affected. The clock of EPWM counter is divided by (u32Prescaler + 1).

Definition at line 348 of file epwm.h.

◆ EPWM_TRIGGER_BRAKE

#define EPWM_TRIGGER_BRAKE (   epwm,
  u32ChannelMask,
  u32BrakeType 
)

Trigger brake event from specified channel(s)

Parameters
[in]epwmThe pointer of the specified EPWM module
[in]u32ChannelMaskCombination of enabled channels. Each bit corresponds to a channel Bit 0 represents channel 0, bit 1 represents channel 2 and bit 2 represents channel 4
[in]u32BrakeTypeType of brake trigger.
Returns
None

This macro is used to trigger brake event from specified channel(s).

Definition at line 527 of file epwm.h.

◆ EPWM_TRIGGER_SYNC

#define EPWM_TRIGGER_SYNC (   epwm,
  u32ChannelNum 
)

Trigger synchronous event from specified channel(s)

Parameters
[in]epwmThe pointer of the specified EPWM module
[in]u32ChannelNumEPWM channel number. Valid values are 0, 2, 4 Bit 0 represents channel 0, bit 1 represents channel 2 and bit 2 represents channel 4
Returns
None

This macro is used to trigger synchronous event from specified channel(s).

Definition at line 460 of file epwm.h.

◆ EPWM_TRIGGER_SYNC_START

#define EPWM_TRIGGER_SYNC_START (   epwm)

This macro enable EPWM counter synchronous start counting function.

Parameters
[in]epwmThe pointer of the specified EPWM module
Returns
None

This macro is used to make selected EPWM0 and EPWM1 channel(s) start counting at the same time. To configure synchronous start counting channel(s) by EPWM_ENABLE_TIMER_SYNC() and EPWM_DISABLE_TIMER_SYNC().

Definition at line 287 of file epwm.h.

Function Documentation

◆ EPWM_ClearAccInt()

void EPWM_ClearAccInt ( EPWM_T epwm,
uint32_t  u32ChannelNum 
)

Clear interrupt flag accumulator interrupt of selected channel.

Parameters
[in]epwmThe pointer of the specified EPWM module
  • EPWM0 : EPWM Group 0
  • EPWM1 : EPWM Group 1
[in]u32ChannelNumEPWM channel number. Valid values are between 0~5
Returns
None

This function is used to clear interrupt flag accumulator interrupt of selected channel.

Definition at line 1064 of file epwm.c.

◆ EPWM_ClearADCTriggerFlag()

void EPWM_ClearADCTriggerFlag ( EPWM_T epwm,
uint32_t  u32ChannelNum,
uint32_t  u32Condition 
)

Clear selected channel trigger ADC flag.

Parameters
[in]epwmThe pointer of the specified EPWM module
  • EPWM0 : EPWM Group 0
  • EPWM1 : EPWM Group 1
[in]u32ChannelNumEPWM channel number. Valid values are between 0~5
[in]u32ConditionThis parameter is not used
Returns
None

This function is used to clear selected channel trigger ADC flag.

Definition at line 378 of file epwm.c.

◆ EPWM_ClearCaptureIntFlag()

void EPWM_ClearCaptureIntFlag ( EPWM_T epwm,
uint32_t  u32ChannelNum,
uint32_t  u32Edge 
)

Clear capture interrupt of selected channel.

Parameters
[in]epwmThe pointer of the specified EPWM module
  • EPWM0 : EPWM Group 0
  • EPWM1 : EPWM Group 1
[in]u32ChannelNumEPWM channel number. Valid values are between 0~5
[in]u32EdgeRising or falling edge to latch counter.
Returns
None

This function is used to clear capture interrupt of selected channel.

Definition at line 729 of file epwm.c.

◆ EPWM_ClearDACTriggerFlag()

void EPWM_ClearDACTriggerFlag ( EPWM_T epwm,
uint32_t  u32ChannelNum,
uint32_t  u32Condition 
)

Clear selected channel trigger DAC flag.

Parameters
[in]epwmThe pointer of the specified EPWM module
  • EPWM0 : EPWM Group 0
  • EPWM1 : EPWM Group 1
[in]u32ChannelNumEPWM channel number. This parameter is not used
[in]u32ConditionThe condition to trigger DAC. This parameter is not used
Returns
None

This function is used to clear selected channel trigger DAC flag.

Definition at line 442 of file epwm.c.

◆ EPWM_ClearDutyIntFlag()

void EPWM_ClearDutyIntFlag ( EPWM_T epwm,
uint32_t  u32ChannelNum 
)

Clear duty interrupt flag of selected channel.

Parameters
[in]epwmThe pointer of the specified EPWM module
  • EPWM0 : EPWM Group 0
  • EPWM1 : EPWM Group 1
[in]u32ChannelNumEPWM channel number. Valid values are between 0~5
Returns
None

This function is used to clear duty interrupt flag of selected channel.

Definition at line 791 of file epwm.c.

◆ EPWM_ClearFaultBrakeIntFlag()

void EPWM_ClearFaultBrakeIntFlag ( EPWM_T epwm,
uint32_t  u32BrakeSource 
)

This function clear fault brake interrupt of selected source.

Parameters
[in]epwmThe pointer of the specified EPWM module
[in]u32BrakeSourceFault brake source.
Returns
None

This function is used to clear fault brake interrupt of selected source. The write-protection function should be disabled before using this function.

Definition at line 854 of file epwm.c.

◆ EPWM_ClearFaultDetectInt()

void EPWM_ClearFaultDetectInt ( EPWM_T epwm,
uint32_t  u32ChannelNum 
)

Clear fault detect interrupt of selected channel.

Parameters
[in]epwmThe pointer of the specified EPWM module.
  • EPWM0 : EPWM Group 0
  • EPWM1 : EPWM Group 1
[in]u32ChannelNumEPWM channel number. Valid values are between 0~5.
Returns
None

This function is used to clear fault detect interrupt of selected channel.

Definition at line 1673 of file epwm.c.

◆ EPWM_ClearFTDutyIntFlag()

void EPWM_ClearFTDutyIntFlag ( EPWM_T epwm,
uint32_t  u32ChannelNum 
)

Clear free trigger duty interrupt flag of selected channel.

Parameters
[in]epwmThe pointer of the specified EPWM module
  • EPWM0 : EPWM Group 0
  • EPWM1 : EPWM Group 1
[in]u32ChannelNumEPWM channel number. Valid values are between 0~5
Returns
None

This function is used to clear free trigger duty interrupt flag of selected channel.

Definition at line 1149 of file epwm.c.

◆ EPWM_ClearPeriodIntFlag()

void EPWM_ClearPeriodIntFlag ( EPWM_T epwm,
uint32_t  u32ChannelNum 
)

Clear period interrupt of selected channel.

Parameters
[in]epwmThe pointer of the specified EPWM module
  • EPWM0 : EPWM Group 0
  • EPWM1 : EPWM Group 1
[in]u32ChannelNumEPWM channel number. Valid values are between 0~5
Returns
None

This function is used to clear period interrupt of selected channel.

Definition at line 913 of file epwm.c.

◆ EPWM_ClearWrapAroundFlag()

void EPWM_ClearWrapAroundFlag ( EPWM_T epwm,
uint32_t  u32ChannelNum 
)

Clear the time-base counter reached its maximum value flag of selected channel.

Parameters
[in]epwmThe pointer of the specified EPWM module
  • EPWM0 : EPWM Group 0
  • EPWM1 : EPWM Group 1
[in]u32ChannelNumEPWM channel number. Valid values are between 0~5
Returns
None

This function is used to clear the time-base counter reached its maximum value flag of selected channel.

Definition at line 1508 of file epwm.c.

◆ EPWM_ClearZeroIntFlag()

void EPWM_ClearZeroIntFlag ( EPWM_T epwm,
uint32_t  u32ChannelNum 
)

Clear zero interrupt of selected channel.

Parameters
[in]epwmThe pointer of the specified EPWM module
  • EPWM0 : EPWM Group 0
  • EPWM1 : EPWM Group 1
[in]u32ChannelNumEPWM channel number. Valid values are between 0~5
Returns
None

This function is used to clear zero interrupt of selected channel.

Definition at line 971 of file epwm.c.

◆ EPWM_ConfigCaptureChannel()

uint32_t EPWM_ConfigCaptureChannel ( EPWM_T epwm,
uint32_t  u32ChannelNum,
uint32_t  u32UnitTimeNsec,
uint32_t  u32CaptureEdge 
)

Configure EPWM capture and get the nearest unit time.

Parameters
[in]epwmThe pointer of the specified EPWM module
  • EPWM0 : EPWM Group 0
  • EPWM1 : EPWM Group 1
[in]u32ChannelNumEPWM channel number. Valid values are between 0~5
[in]u32UnitTimeNsecThe unit time of counter
[in]u32CaptureEdgeThe condition to latch the counter. This parameter is not used
Returns
The nearest unit time in nano second.

This function is used to Configure EPWM capture and get the nearest unit time.

Definition at line 36 of file epwm.c.

◆ EPWM_ConfigOutputChannel()

uint32_t EPWM_ConfigOutputChannel ( EPWM_T epwm,
uint32_t  u32ChannelNum,
uint32_t  u32Frequency,
uint32_t  u32DutyCycle 
)

This function Configure EPWM generator and get the nearest frequency in edge aligned(up counter type) auto-reload mode.

Parameters
[in]epwmThe pointer of the specified EPWM module
  • EPWM0 : EPWM Group 0
  • EPWM1 : EPWM Group 1
[in]u32ChannelNumEPWM channel number. Valid values are between 0~5
[in]u32FrequencyTarget generator frequency
[in]u32DutyCycleTarget generator duty cycle percentage. Valid range are between 0 ~ 100. 10 means 10%, 20 means 20%...
Returns
Nearest frequency clock in nano second
Note
Since every two channels, (0 & 1), (2 & 3), shares a prescaler. Call this API to configure EPWM frequency may affect existing frequency of other channel.
This function is used for initial stage. To change duty cycle later, it should get the configured period value and calculate the new comparator value.

Definition at line 134 of file epwm.c.

◆ EPWM_ConfigSyncPhase()

void EPWM_ConfigSyncPhase ( EPWM_T epwm,
uint32_t  u32ChannelNum,
uint32_t  u32SyncSrc,
uint32_t  u32Direction,
uint32_t  u32StartPhase 
)

Configure synchronization phase of selected channel.

Parameters
[in]epwmThe pointer of the specified EPWM module
  • EPWM0 : EPWM Group 0
  • EPWM1 : EPWM Group 1
[in]u32ChannelNumEPWM channel number. Valid values are between 0~5
[in]u32SyncSrcEPWM synchronize source selection.
[in]u32DirectionPhase direction. Control EPWM counter count decrement or increment after synchronizing.
[in]u32StartPhaseSynchronous start phase value. Valid values are between 0~65535.
Returns
None

This function is used to configure synchronization phase of selected channel.

Note
Every two channels share the same setting.

Definition at line 1225 of file epwm.c.

◆ EPWM_DisableAcc()

void EPWM_DisableAcc ( EPWM_T epwm,
uint32_t  u32ChannelNum 
)

Disable interrupt flag accumulator of selected channel.

Parameters
[in]epwmThe pointer of the specified EPWM module
  • EPWM0 : EPWM Group 0
  • EPWM1 : EPWM Group 1
[in]u32ChannelNumEPWM channel number. Valid values are between 0~5
Returns
None

This function is used to Disable interrupt flag accumulator of selected channel.

Definition at line 1022 of file epwm.c.

◆ EPWM_DisableAccInt()

void EPWM_DisableAccInt ( EPWM_T epwm,
uint32_t  u32ChannelNum 
)

Disable interrupt flag accumulator interrupt of selected channel.

Parameters
[in]epwmThe pointer of the specified EPWM module
  • EPWM0 : EPWM Group 0
  • EPWM1 : EPWM Group 1
[in]u32ChannelNumEPWM channel number. Valid values are between 0~5
Returns
None

This function is used to disable interrupt flag accumulator interrupt of selected channel.

Definition at line 1050 of file epwm.c.

◆ EPWM_DisableAccPDMA()

void EPWM_DisableAccPDMA ( EPWM_T epwm,
uint32_t  u32ChannelNum 
)

Disable accumulator PDMA of selected channel.

Parameters
[in]epwmThe pointer of the specified EPWM module
  • EPWM0 : EPWM Group 0
  • EPWM1 : EPWM Group 1
[in]u32ChannelNumEPWM channel number. Valid values are between 0~5
Returns
None

This function is used to disable accumulator interrupt trigger PDMA of selected channel.

Definition at line 1107 of file epwm.c.

◆ EPWM_DisableAccStopMode()

void EPWM_DisableAccStopMode ( EPWM_T epwm,
uint32_t  u32ChannelNum 
)

Disable interrupt flag accumulator stop mode of selected channel.

Parameters
[in]epwmThe pointer of the specified EPWM module
  • EPWM0 : EPWM Group 0
  • EPWM1 : EPWM Group 1
[in]u32ChannelNumEPWM channel number. Valid values are between 0~5
Returns
None

This function is used to disable interrupt flag accumulator stop mode of selected channel.

Definition at line 1135 of file epwm.c.

◆ EPWM_DisableADCTrigger()

void EPWM_DisableADCTrigger ( EPWM_T epwm,
uint32_t  u32ChannelNum 
)

Disable selected channel to trigger ADC.

Parameters
[in]epwmThe pointer of the specified EPWM module
  • EPWM0 : EPWM Group 0
  • EPWM1 : EPWM Group 1
[in]u32ChannelNumEPWM channel number. Valid values are between 0~5
Returns
None

This function is used to disable selected channel to trigger ADC.

Definition at line 302 of file epwm.c.

◆ EPWM_DisableADCTriggerPrescale()

void EPWM_DisableADCTriggerPrescale ( EPWM_T epwm,
uint32_t  u32ChannelNum 
)

Disable Trigger ADC prescale function.

Parameters
[in]epwmThe pointer of the specified EPWM module
  • EPWM0 : EPWM Group 0
  • EPWM1 : EPWM Group 1
[in]u32ChannelNumEPWM channel number. Valid values are between 0~5
Returns
None

This function is used to disable trigger ADC prescale.

Definition at line 363 of file epwm.c.

◆ EPWM_DisableBrakeNoiseFilter()

void EPWM_DisableBrakeNoiseFilter ( EPWM_T epwm,
uint32_t  u32BrakePinNum 
)

Disable EPWM brake noise filter function.

Parameters
[in]epwmThe pointer of the specified EPWM module
  • EPWM0 : EPWM Group 0
  • EPWM1 : EPWM Group 1
[in]u32BrakePinNumBrake pin selection. Valid values are 0 or 1.
Returns
None

This function is used to disable EPWM brake noise filter function.

Definition at line 1402 of file epwm.c.

◆ EPWM_DisableBrakePinInverse()

void EPWM_DisableBrakePinInverse ( EPWM_T epwm,
uint32_t  u32BrakePinNum 
)

Disable EPWM brake pin inverse function.

Parameters
[in]epwmThe pointer of the specified EPWM module
  • EPWM0 : EPWM Group 0
  • EPWM1 : EPWM Group 1
[in]u32BrakePinNumBrake pin selection. Valid values are 0 or 1.
Returns
None

This function is used to disable EPWM brake pin inverse function.

Definition at line 1430 of file epwm.c.

◆ EPWM_DisableCapture()

void EPWM_DisableCapture ( EPWM_T epwm,
uint32_t  u32ChannelMask 
)

Disable capture of selected channel(s)

Parameters
[in]epwmThe pointer of the specified EPWM module
  • EPWM0 : EPWM Group 0
  • EPWM1 : EPWM Group 1
[in]u32ChannelMaskCombination of enabled channels. Each bit corresponds to a channel. Bit 0 is channel 0, bit 1 is channel 1...
Returns
None

This function is used to disable capture of selected channel(s).

Definition at line 574 of file epwm.c.

◆ EPWM_DisableCaptureInt()

void EPWM_DisableCaptureInt ( EPWM_T epwm,
uint32_t  u32ChannelNum,
uint32_t  u32Edge 
)

Disable capture interrupt of selected channel.

Parameters
[in]epwmThe pointer of the specified EPWM module
  • EPWM0 : EPWM Group 0
  • EPWM1 : EPWM Group 1
[in]u32ChannelNumEPWM channel number. Valid values are between 0~5
[in]u32EdgeRising or falling edge to latch counter.
Returns
None

This function is used to disable capture interrupt of selected channel.

Definition at line 712 of file epwm.c.

◆ EPWM_DisableDACTrigger()

void EPWM_DisableDACTrigger ( EPWM_T epwm,
uint32_t  u32ChannelNum 
)

Disable selected channel to trigger DAC.

Parameters
[in]epwmThe pointer of the specified EPWM module
  • EPWM0 : EPWM Group 0
  • EPWM1 : EPWM Group 1
[in]u32ChannelNumEPWM channel number. Valid values are between 0~5
Returns
None

This function is used to disable selected channel to trigger DAC.

Definition at line 426 of file epwm.c.

◆ EPWM_DisableDeadZone()

void EPWM_DisableDeadZone ( EPWM_T epwm,
uint32_t  u32ChannelNum 
)

Disable Dead zone of selected channel.

Parameters
[in]epwmThe pointer of the specified EPWM module
  • EPWM0 : EPWM Group 0
  • EPWM1 : EPWM Group 1
[in]u32ChannelNumEPWM channel number. Valid values are between 0~5
Returns
None

This function is used to disable Dead zone of selected channel. The write-protection function should be disabled before using this function.

Definition at line 677 of file epwm.c.

◆ EPWM_DisableDutyInt()

void EPWM_DisableDutyInt ( EPWM_T epwm,
uint32_t  u32ChannelNum 
)

Disable duty interrupt of selected channel.

Parameters
[in]epwmThe pointer of the specified EPWM module
  • EPWM0 : EPWM Group 0
  • EPWM1 : EPWM Group 1
[in]u32ChannelNumEPWM channel number. Valid values are between 0~5
Returns
None

This function is used to disable duty interrupt of selected channel.

Definition at line 777 of file epwm.c.

◆ EPWM_DisableFaultBrakeInt()

void EPWM_DisableFaultBrakeInt ( EPWM_T epwm,
uint32_t  u32BrakeSource 
)

This function disable fault brake interrupt.

Parameters
[in]epwmThe pointer of the specified EPWM module
[in]u32BrakeSourceFault brake source.
Returns
None

This function is used to disable fault brake interrupt. The write-protection function should be disabled before using this function.

Note
Every two channels share the same setting.

Definition at line 839 of file epwm.c.

◆ EPWM_DisableFaultDetect()

void EPWM_DisableFaultDetect ( EPWM_T epwm,
uint32_t  u32ChannelNum 
)

Disable fault detect of selected channel.

Parameters
[in]epwmThe pointer of the specified EPWM module.
  • EPWM0 : EPWM Group 0
  • EPWM1 : EPWM Group 1
[in]u32ChannelNumEPWM channel number. Valid values are between 0~5.
Returns
None

This function is used to disable fault detect of selected channel.

Definition at line 1544 of file epwm.c.

◆ EPWM_DisableFaultDetectDeglitch()

void EPWM_DisableFaultDetectDeglitch ( EPWM_T epwm,
uint32_t  u32ChannelNum 
)

Disable fault detect deglitch function of selected channel.

Parameters
[in]epwmThe pointer of the specified EPWM module.
  • EPWM0 : EPWM Group 0
  • EPWM1 : EPWM Group 1
[in]u32ChannelNumEPWM channel number. Valid values are between 0~5.
Returns
None

This function is used to disable fault detect deglitch function of selected channel.

Definition at line 1602 of file epwm.c.

◆ EPWM_DisableFaultDetectInt()

void EPWM_DisableFaultDetectInt ( EPWM_T epwm,
uint32_t  u32ChannelNum 
)

Disable fault detect interrupt of selected channel.

Parameters
[in]epwmThe pointer of the specified EPWM module.
  • EPWM0 : EPWM Group 0
  • EPWM1 : EPWM Group 1
[in]u32ChannelNumEPWM channel number. Valid values are between 0~5.
Returns
None

This function is used to disable fault detect interrupt of selected channel.

Definition at line 1659 of file epwm.c.

◆ EPWM_DisableFaultDetectMask()

void EPWM_DisableFaultDetectMask ( EPWM_T epwm,
uint32_t  u32ChannelNum 
)

Disable fault detect mask function of selected channel.

Parameters
[in]epwmThe pointer of the specified EPWM module.
  • EPWM0 : EPWM Group 0
  • EPWM1 : EPWM Group 1
[in]u32ChannelNumEPWM channel number. Valid values are between 0~5.
Returns
None

This function is used to disable fault detect mask function of selected channel.

Definition at line 1631 of file epwm.c.

◆ EPWM_DisableFaultDetectOutput()

void EPWM_DisableFaultDetectOutput ( EPWM_T epwm,
uint32_t  u32ChannelNum 
)

Disable fault detect output of selected channel.

Parameters
[in]epwmThe pointer of the specified EPWM module.
  • EPWM0 : EPWM Group 0
  • EPWM1 : EPWM Group 1
[in]u32ChannelNumEPWM channel number. Valid values are between 0~5.
Returns
None

This function is used to disable fault detect output of selected channel.

Definition at line 1572 of file epwm.c.

◆ EPWM_DisableLoadMode()

void EPWM_DisableLoadMode ( EPWM_T epwm,
uint32_t  u32ChannelNum,
uint32_t  u32LoadMode 
)

Disable load mode of selected channel.

Parameters
[in]epwmThe pointer of the specified EPWM module
  • EPWM0 : EPWM Group 0
  • EPWM1 : EPWM Group 1
[in]u32ChannelNumEPWM channel number. Valid values are between 0~5
[in]u32LoadModeEPWM counter loading mode.
Returns
None

This function is used to disable load mode of selected channel.

Definition at line 1201 of file epwm.c.

◆ EPWM_DisableOutput()

void EPWM_DisableOutput ( EPWM_T epwm,
uint32_t  u32ChannelMask 
)

Disables EPWM output generation of selected channel(s)

Parameters
[in]epwmThe pointer of the specified EPWM module
  • EPWM0 : EPWM Group 0
  • EPWM1 : EPWM Group 1
[in]u32ChannelMaskCombination of enabled channels. Each bit corresponds to a channel Set bit 0 to 1 disables channel 0 output, set bit 1 to 1 disables channel 1 output...
Returns
None

This function is used to disable EPWM output generation of selected channel(s).

Definition at line 605 of file epwm.c.

◆ EPWM_DisablePDMA()

void EPWM_DisablePDMA ( EPWM_T epwm,
uint32_t  u32ChannelNum 
)

Disables PDMA transfer of selected channel for EPWM capture.

Parameters
[in]epwmThe pointer of the specified EPWM module
  • EPWM0 : EPWM Group 0
  • EPWM1 : EPWM Group 1
[in]u32ChannelNumEPWM channel number.
Returns
None

This function is used to enable PDMA transfer of selected channel(s) for EPWM capture.

Definition at line 643 of file epwm.c.

◆ EPWM_DisablePeriodInt()

void EPWM_DisablePeriodInt ( EPWM_T epwm,
uint32_t  u32ChannelNum 
)

Disable period interrupt of selected channel.

Parameters
[in]epwmThe pointer of the specified EPWM module
  • EPWM0 : EPWM Group 0
  • EPWM1 : EPWM Group 1
[in]u32ChannelNumEPWM channel number. Valid values are between 0~5
Returns
None

This function is used to disable period interrupt of selected channel.

Definition at line 899 of file epwm.c.

◆ EPWM_DisableSyncNoiseFilter()

void EPWM_DisableSyncNoiseFilter ( EPWM_T epwm)

Disable EPWM SYNC_IN noise filter function.

Parameters
[in]epwmThe pointer of the specified EPWM module
  • EPWM0 : EPWM Group 0
  • EPWM1 : EPWM Group 1
Returns
None

This function is used to Disable EPWM SYNC_IN noise filter function.

Definition at line 1314 of file epwm.c.

◆ EPWM_DisableSyncPhase()

void EPWM_DisableSyncPhase ( EPWM_T epwm,
uint32_t  u32ChannelMask 
)

Disable SYNC phase of selected channel(s)

Parameters
[in]epwmThe pointer of the specified EPWM module
  • EPWM0 : EPWM Group 0
  • EPWM1 : EPWM Group 1
[in]u32ChannelMaskCombination of enabled channels. Each bit corresponds to a channel. Bit 0 is channel 0, bit 1 is channel 1...
Returns
None

This function is used to disable SYNC phase of selected channel(s).

Note
Every two channels share the same setting.

Definition at line 1269 of file epwm.c.

◆ EPWM_DisableSyncPinInverse()

void EPWM_DisableSyncPinInverse ( EPWM_T epwm)

Disable EPWM SYNC input pin inverse function.

Parameters
[in]epwmThe pointer of the specified EPWM module
  • EPWM0 : EPWM Group 0
  • EPWM1 : EPWM Group 1
Returns
None

This function is used to Disable EPWM SYNC input pin inverse function.

Definition at line 1340 of file epwm.c.

◆ EPWM_DisableZeroInt()

void EPWM_DisableZeroInt ( EPWM_T epwm,
uint32_t  u32ChannelNum 
)

Disable zero interrupt of selected channel.

Parameters
[in]epwmThe pointer of the specified EPWM module
  • EPWM0 : EPWM Group 0
  • EPWM1 : EPWM Group 1
[in]u32ChannelNumEPWM channel number. Valid values are between 0~5
Returns
None

This function is used to disable zero interrupt of selected channel.

Definition at line 957 of file epwm.c.

◆ EPWM_EnableAcc()

void EPWM_EnableAcc ( EPWM_T epwm,
uint32_t  u32ChannelNum,
uint32_t  u32IntFlagCnt,
uint32_t  u32IntAccSrc 
)

Enable interrupt flag accumulator of selected channel.

Parameters
[in]epwmThe pointer of the specified EPWM module
  • EPWM0 : EPWM Group 0
  • EPWM1 : EPWM Group 1
[in]u32ChannelNumEPWM channel number. Valid values are between 0~5
[in]u32IntFlagCntInterrupt flag counter. Valid values are between 0~65535.
[in]u32IntAccSrcInterrupt flag accumulator source selection.
Returns
None

This function is used to enable interrupt flag accumulator of selected channel.

Definition at line 1007 of file epwm.c.

◆ EPWM_EnableAccInt()

void EPWM_EnableAccInt ( EPWM_T epwm,
uint32_t  u32ChannelNum 
)

Enable interrupt flag accumulator interrupt of selected channel.

Parameters
[in]epwmThe pointer of the specified EPWM module
  • EPWM0 : EPWM Group 0
  • EPWM1 : EPWM Group 1
[in]u32ChannelNumEPWM channel number. Valid values are between 0~5
Returns
None

This function is used to enable interrupt flag accumulator interrupt of selected channel.

Definition at line 1036 of file epwm.c.

◆ EPWM_EnableAccPDMA()

void EPWM_EnableAccPDMA ( EPWM_T epwm,
uint32_t  u32ChannelNum 
)

Enable accumulator PDMA of selected channel.

Parameters
[in]epwmThe pointer of the specified EPWM module
  • EPWM0 : EPWM Group 0
  • EPWM1 : EPWM Group 1
[in]u32ChannelNumEPWM channel number. Valid values are between 0~5
Returns
None

This function is used to enable accumulator interrupt trigger PDMA of selected channel.

Definition at line 1093 of file epwm.c.

◆ EPWM_EnableAccStopMode()

void EPWM_EnableAccStopMode ( EPWM_T epwm,
uint32_t  u32ChannelNum 
)

Enable interrupt flag accumulator stop mode of selected channel.

Parameters
[in]epwmThe pointer of the specified EPWM module
  • EPWM0 : EPWM Group 0
  • EPWM1 : EPWM Group 1
[in]u32ChannelNumEPWM channel number. Valid values are between 0~5
Returns
None

This function is used to enable interrupt flag accumulator stop mode of selected channel.

Definition at line 1121 of file epwm.c.

◆ EPWM_EnableADCTrigger()

void EPWM_EnableADCTrigger ( EPWM_T epwm,
uint32_t  u32ChannelNum,
uint32_t  u32Condition 
)

Enable selected channel to trigger ADC.

Parameters
[in]epwmThe pointer of the specified EPWM module
  • EPWM0 : EPWM Group 0
  • EPWM1 : EPWM Group 1
[in]u32ChannelNumEPWM channel number. Valid values are between 0~5
[in]u32ConditionThe condition to trigger ADC. Combination of following conditions:
Returns
None

This function is used to enable selected channel to trigger ADC.

Definition at line 279 of file epwm.c.

◆ EPWM_EnableADCTriggerPrescale()

int32_t EPWM_EnableADCTriggerPrescale ( EPWM_T epwm,
uint32_t  u32ChannelNum,
uint32_t  u32Prescale,
uint32_t  u32PrescaleCnt 
)

Enable and configure trigger ADC prescale.

Parameters
[in]epwmThe pointer of the specified EPWM module
  • EPWM0 : EPWM Group 0
  • EPWM1 : EPWM Group 1
[in]u32ChannelNumEPWM channel number. Valid values are between 0~5.
[in]u32PrescaleADC prescale. Valid values are between 0 to 0xF.
[in]u32PrescaleCntADC prescale counter. Valid values are between 0 to 0xF.
Return values
0Success.
-1Failed.

This function is used to enable and configure trigger ADC prescale.

Note
User can configure only when ADC trigger prescale is disabled.
ADC prescale counter must less than ADC prescale.

Definition at line 328 of file epwm.c.

◆ EPWM_EnableBrakeNoiseFilter()

void EPWM_EnableBrakeNoiseFilter ( EPWM_T epwm,
uint32_t  u32BrakePinNum,
uint32_t  u32ClkCnt,
uint32_t  u32ClkDivSel 
)

Enable EPWM brake noise filter function.

Parameters
[in]epwmThe pointer of the specified EPWM module
  • EPWM0 : EPWM Group 0
  • EPWM1 : EPWM Group 1
[in]u32BrakePinNumBrake pin selection. Valid values are 0 or 1.
[in]u32ClkCntSYNC Edge Detector Filter Count. This controls the counter number of edge detector
[in]u32ClkDivSelSYNC Edge Detector Filter Clock Selection.
Returns
None

This function is used to enable EPWM brake noise filter function.

Definition at line 1387 of file epwm.c.

◆ EPWM_EnableBrakePinInverse()

void EPWM_EnableBrakePinInverse ( EPWM_T epwm,
uint32_t  u32BrakePinNum 
)

Enable EPWM brake pin inverse function.

Parameters
[in]epwmThe pointer of the specified EPWM module
  • EPWM0 : EPWM Group 0
  • EPWM1 : EPWM Group 1
[in]u32BrakePinNumBrake pin selection. Valid values are 0 or 1.
Returns
None

This function is used to enable EPWM brake pin inverse function.

Definition at line 1416 of file epwm.c.

◆ EPWM_EnableCapture()

void EPWM_EnableCapture ( EPWM_T epwm,
uint32_t  u32ChannelMask 
)

Enable capture of selected channel(s)

Parameters
[in]epwmThe pointer of the specified EPWM module
  • EPWM0 : EPWM Group 0
  • EPWM1 : EPWM Group 1
[in]u32ChannelMaskCombination of enabled channels. Each bit corresponds to a channel. Bit 0 is channel 0, bit 1 is channel 1...
Returns
None

This function is used to enable capture of selected channel(s).

Definition at line 558 of file epwm.c.

◆ EPWM_EnableCaptureInt()

void EPWM_EnableCaptureInt ( EPWM_T epwm,
uint32_t  u32ChannelNum,
uint32_t  u32Edge 
)

Enable capture interrupt of selected channel.

Parameters
[in]epwmThe pointer of the specified EPWM module
  • EPWM0 : EPWM Group 0
  • EPWM1 : EPWM Group 1
[in]u32ChannelNumEPWM channel number. Valid values are between 0~5
[in]u32EdgeRising or falling edge to latch counter.
Returns
None

This function is used to enable capture interrupt of selected channel.

Definition at line 695 of file epwm.c.

◆ EPWM_EnableDACTrigger()

void EPWM_EnableDACTrigger ( EPWM_T epwm,
uint32_t  u32ChannelNum,
uint32_t  u32Condition 
)

Enable selected channel to trigger DAC.

Parameters
[in]epwmThe pointer of the specified EPWM module
  • EPWM0 : EPWM Group 0
  • EPWM1 : EPWM Group 1
[in]u32ChannelNumEPWM channel number. Valid values are between 0~5
[in]u32ConditionThe condition to trigger DAC. Combination of following conditions:
Returns
None

This function is used to enable selected channel to trigger DAC.

Definition at line 412 of file epwm.c.

◆ EPWM_EnableDeadZone()

void EPWM_EnableDeadZone ( EPWM_T epwm,
uint32_t  u32ChannelNum,
uint32_t  u32Duration 
)

Enable Dead zone of selected channel.

Parameters
[in]epwmThe pointer of the specified EPWM module
  • EPWM0 : EPWM Group 0
  • EPWM1 : EPWM Group 1
[in]u32ChannelNumEPWM channel number. Valid values are between 0~5
[in]u32DurationDead zone length in EPWM clock count, valid values are between 0~0xFFF, but 0 means there is no Dead zone.
Returns
None

This function is used to enable Dead zone of selected channel. The write-protection function should be disabled before using this function.

Note
Every two channels share the same setting.

Definition at line 660 of file epwm.c.

◆ EPWM_EnableDutyInt()

void EPWM_EnableDutyInt ( EPWM_T epwm,
uint32_t  u32ChannelNum,
uint32_t  u32IntDutyType 
)

Enable duty interrupt of selected channel.

Parameters
[in]epwmThe pointer of the specified EPWM module
  • EPWM0 : EPWM Group 0
  • EPWM1 : EPWM Group 1
[in]u32ChannelNumEPWM channel number. Valid values are between 0~5
[in]u32IntDutyTypeDuty interrupt type, could be either
Returns
None

This function is used to enable duty interrupt of selected channel.

Definition at line 763 of file epwm.c.

◆ EPWM_EnableFaultBrake()

void EPWM_EnableFaultBrake ( EPWM_T epwm,
uint32_t  u32ChannelMask,
uint32_t  u32LevelMask,
uint32_t  u32BrakeSource 
)

This function enable fault brake of selected channel(s)

Parameters
[in]epwmThe pointer of the specified EPWM module
  • EPWM0 : EPWM Group 0
  • EPWM1 : EPWM Group 1
[in]u32ChannelMaskCombination of enabled channels. Each bit corresponds to a channel.
[in]u32LevelMaskOutput high or low while fault brake occurs, each bit represent the level of a channel while fault brake occurs. Bit 0 represents channel 0, bit 1 represents channel 1...
[in]u32BrakeSourceFault brake source, could be one of following source
Returns
None

This function is used to enable fault brake of selected channel(s). The write-protection function should be disabled before using this function.

Definition at line 493 of file epwm.c.

◆ EPWM_EnableFaultBrakeInt()

void EPWM_EnableFaultBrakeInt ( EPWM_T epwm,
uint32_t  u32BrakeSource 
)

This function enable fault brake interrupt.

Parameters
[in]epwmThe pointer of the specified EPWM module
[in]u32BrakeSourceFault brake source.
Returns
None

This function is used to enable fault brake interrupt. The write-protection function should be disabled before using this function.

Note
Every two channels share the same setting.

Definition at line 823 of file epwm.c.

◆ EPWM_EnableFaultDetect()

void EPWM_EnableFaultDetect ( EPWM_T epwm,
uint32_t  u32ChannelNum,
uint32_t  u32AfterPrescaler,
uint32_t  u32ClkSel 
)

Enable fault detect of selected channel.

Parameters
[in]epwmThe pointer of the specified EPWM module.
  • EPWM0 : EPWM Group 0
  • EPWM1 : EPWM Group 1
[in]u32ChannelNumEPWM channel number. Valid values are between 0~5.
[in]u32AfterPrescalerFault Detect Clock Source is from prescaler output. Valid values are TRUE (after prescaler) or FALSE (before prescaler).
[in]u32ClkSelFault Detect Clock Select.
Returns
None

This function is used to enable fault detect of selected channel.

Definition at line 1528 of file epwm.c.

◆ EPWM_EnableFaultDetectDeglitch()

void EPWM_EnableFaultDetectDeglitch ( EPWM_T epwm,
uint32_t  u32ChannelNum,
uint32_t  u32DeglitchSmpCycle 
)

Enable fault detect deglitch function of selected channel.

Parameters
[in]epwmThe pointer of the specified EPWM module.
  • EPWM0 : EPWM Group 0
  • EPWM1 : EPWM Group 1
[in]u32ChannelNumEPWM channel number. Valid values are between 0~5.
[in]u32DeglitchSmpCycleDeglitch Sampling Cycle. Valid values are between 0~7.
Returns
None

This function is used to enable fault detect deglitch function of selected channel.

Definition at line 1587 of file epwm.c.

◆ EPWM_EnableFaultDetectInt()

void EPWM_EnableFaultDetectInt ( EPWM_T epwm,
uint32_t  u32ChannelNum 
)

Enable fault detect interrupt of selected channel.

Parameters
[in]epwmThe pointer of the specified EPWM module.
  • EPWM0 : EPWM Group 0
  • EPWM1 : EPWM Group 1
[in]u32ChannelNumEPWM channel number. Valid values are between 0~5.
Returns
None

This function is used to enable fault detect interrupt of selected channel.

Definition at line 1645 of file epwm.c.

◆ EPWM_EnableFaultDetectMask()

void EPWM_EnableFaultDetectMask ( EPWM_T epwm,
uint32_t  u32ChannelNum,
uint32_t  u32MaskCnt 
)

Enable fault detect mask function of selected channel.

Parameters
[in]epwmThe pointer of the specified EPWM module.
  • EPWM0 : EPWM Group 0
  • EPWM1 : EPWM Group 1
[in]u32ChannelNumEPWM channel number. Valid values are between 0~5.
[in]u32MaskCntTransition mask counter. Valid values are between 0~0x7F.
Returns
None

This function is used to enable fault detect mask function of selected channel.

Definition at line 1617 of file epwm.c.

◆ EPWM_EnableFaultDetectOutput()

void EPWM_EnableFaultDetectOutput ( EPWM_T epwm,
uint32_t  u32ChannelNum 
)

Enable fault detect output of selected channel.

Parameters
[in]epwmThe pointer of the specified EPWM module.
  • EPWM0 : EPWM Group 0
  • EPWM1 : EPWM Group 1
[in]u32ChannelNumEPWM channel number. Valid values are between 0~5.
Returns
None

This function is used to enable fault detect output of selected channel.

Definition at line 1558 of file epwm.c.

◆ EPWM_EnableLoadMode()

void EPWM_EnableLoadMode ( EPWM_T epwm,
uint32_t  u32ChannelNum,
uint32_t  u32LoadMode 
)

Enable load mode of selected channel.

Parameters
[in]epwmThe pointer of the specified EPWM module
  • EPWM0 : EPWM Group 0
  • EPWM1 : EPWM Group 1
[in]u32ChannelNumEPWM channel number. Valid values are between 0~5
[in]u32LoadModeEPWM counter loading mode.
Returns
None

This function is used to enable load mode of selected channel.

Definition at line 1183 of file epwm.c.

◆ EPWM_EnableOutput()

void EPWM_EnableOutput ( EPWM_T epwm,
uint32_t  u32ChannelMask 
)

Enables EPWM output generation of selected channel(s)

Parameters
[in]epwmThe pointer of the specified EPWM module
  • EPWM0 : EPWM Group 0
  • EPWM1 : EPWM Group 1
[in]u32ChannelMaskCombination of enabled channels. Each bit corresponds to a channel. Set bit 0 to 1 enables channel 0 output, set bit 1 to 1 enables channel 1 output...
Returns
None

This function is used to enable EPWM output generation of selected channel(s).

Definition at line 590 of file epwm.c.

◆ EPWM_EnablePDMA()

void EPWM_EnablePDMA ( EPWM_T epwm,
uint32_t  u32ChannelNum,
uint32_t  u32RisingFirst,
uint32_t  u32Mode 
)

Enables PDMA transfer of selected channel for EPWM capture.

Parameters
[in]epwmThe pointer of the specified EPWM module
  • EPWM0 : EPWM Group 0
  • EPWM1 : EPWM Group 1
[in]u32ChannelNumEPWM channel number.
[in]u32RisingFirstThe capture order is rising, falling first. Every two channels share the same setting. Valid values are TRUE and FALSE.
[in]u32ModeCaptured data transferred by PDMA interrupt type. It could be either
Returns
None

This function is used to enable PDMA transfer of selected channel(s) for EPWM capture.

Note
This function can only selects even or odd channel of pairs to do PDMA transfer.

Definition at line 625 of file epwm.c.

◆ EPWM_EnablePeriodInt()

void EPWM_EnablePeriodInt ( EPWM_T epwm,
uint32_t  u32ChannelNum,
uint32_t  u32IntPeriodType 
)

Enable period interrupt of selected channel.

Parameters
[in]epwmThe pointer of the specified EPWM module
  • EPWM0 : EPWM Group 0
  • EPWM1 : EPWM Group 1
[in]u32ChannelNumEPWM channel number. Valid values are between 0~5
[in]u32IntPeriodTypePeriod interrupt type. This parameter is not used.
Returns
None

This function is used to enable period interrupt of selected channel.

Definition at line 885 of file epwm.c.

◆ EPWM_EnableSyncNoiseFilter()

void EPWM_EnableSyncNoiseFilter ( EPWM_T epwm,
uint32_t  u32ClkCnt,
uint32_t  u32ClkDivSel 
)

Enable EPWM SYNC_IN noise filter function.

Parameters
[in]epwmThe pointer of the specified EPWM module
  • EPWM0 : EPWM Group 0
  • EPWM1 : EPWM Group 1
[in]u32ClkCntSYNC Edge Detector Filter Count. This controls the counter number of edge detector. The valid value is 0~7.
[in]u32ClkDivSelSYNC Edge Detector Filter Clock Selection.
Returns
None

This function is used to enable EPWM SYNC_IN noise filter function.

Definition at line 1300 of file epwm.c.

◆ EPWM_EnableSyncPhase()

void EPWM_EnableSyncPhase ( EPWM_T epwm,
uint32_t  u32ChannelMask 
)

Enable SYNC phase of selected channel(s)

Parameters
[in]epwmThe pointer of the specified EPWM module
  • EPWM0 : EPWM Group 0
  • EPWM1 : EPWM Group 1
[in]u32ChannelMaskCombination of enabled channels. Each bit corresponds to a channel. Bit 0 is channel 0, bit 1 is channel 1...
Returns
None

This function is used to enable SYNC phase of selected channel(s).

Note
Every two channels share the same setting.

Definition at line 1246 of file epwm.c.

◆ EPWM_EnableSyncPinInverse()

void EPWM_EnableSyncPinInverse ( EPWM_T epwm)

Enable EPWM SYNC input pin inverse function.

Parameters
[in]epwmThe pointer of the specified EPWM module
  • EPWM0 : EPWM Group 0
  • EPWM1 : EPWM Group 1
Returns
None

This function is used to enable EPWM SYNC input pin inverse function.

Definition at line 1327 of file epwm.c.

◆ EPWM_EnableZeroInt()

void EPWM_EnableZeroInt ( EPWM_T epwm,
uint32_t  u32ChannelNum 
)

Enable zero interrupt of selected channel.

Parameters
[in]epwmThe pointer of the specified EPWM module
  • EPWM0 : EPWM Group 0
  • EPWM1 : EPWM Group 1
[in]u32ChannelNumEPWM channel number. Valid values are between 0~5
Returns
None

This function is used to enable zero interrupt of selected channel.

Definition at line 943 of file epwm.c.

◆ EPWM_ForceStop()

void EPWM_ForceStop ( EPWM_T epwm,
uint32_t  u32ChannelMask 
)

Stop EPWM generation immediately by clear channel enable bit.

Parameters
[in]epwmThe pointer of the specified EPWM module
  • EPWM0 : EPWM Group 0
  • EPWM1 : EPWM Group 1
[in]u32ChannelMaskCombination of enabled channels. Each bit corresponds to a channel. Bit 0 is channel 0, bit 1 is channel 1...
Returns
None

This function is used to stop EPWM generation immediately by clear channel enable bit.

Definition at line 248 of file epwm.c.

◆ EPWM_GetAccInt()

uint32_t EPWM_GetAccInt ( EPWM_T epwm,
uint32_t  u32ChannelNum 
)

Get interrupt flag accumulator interrupt of selected channel.

Parameters
[in]epwmThe pointer of the specified EPWM module
  • EPWM0 : EPWM Group 0
  • EPWM1 : EPWM Group 1
[in]u32ChannelNumEPWM channel number. Valid values are between 0~5
Return values
0Accumulator interrupt did not occur
1Accumulator interrupt occurred

This function is used to Get interrupt flag accumulator interrupt of selected channel.

Definition at line 1079 of file epwm.c.

◆ EPWM_GetADCTriggerFlag()

uint32_t EPWM_GetADCTriggerFlag ( EPWM_T epwm,
uint32_t  u32ChannelNum 
)

Get selected channel trigger ADC flag.

Parameters
[in]epwmThe pointer of the specified EPWM module
  • EPWM0 : EPWM Group 0
  • EPWM1 : EPWM Group 1
[in]u32ChannelNumEPWM channel number. Valid values are between 0~5
Return values
0The specified channel trigger ADC to start of conversion flag is not set
1The specified channel trigger ADC to start of conversion flag is set

This function is used to get EPWM trigger ADC to start of conversion flag for specified channel.

Definition at line 393 of file epwm.c.

◆ EPWM_GetCaptureIntFlag()

uint32_t EPWM_GetCaptureIntFlag ( EPWM_T epwm,
uint32_t  u32ChannelNum 
)

Get capture interrupt of selected channel.

Parameters
[in]epwmThe pointer of the specified EPWM module
  • EPWM0 : EPWM Group 0
  • EPWM1 : EPWM Group 1
[in]u32ChannelNumEPWM channel number. Valid values are between 0~5
Return values
0No capture interrupt
1Rising edge latch interrupt
2Falling edge latch interrupt
3Rising and falling latch interrupt

This function is used to get capture interrupt of selected channel.

Definition at line 746 of file epwm.c.

◆ EPWM_GetDACTriggerFlag()

uint32_t EPWM_GetDACTriggerFlag ( EPWM_T epwm,
uint32_t  u32ChannelNum 
)

Get selected channel trigger DAC flag.

Parameters
[in]epwmThe pointer of the specified EPWM module
  • EPWM0 : EPWM Group 0
  • EPWM1 : EPWM Group 1
[in]u32ChannelNumEPWM channel number. This parameter is not used
Return values
0The specified channel trigger DAC to start of conversion flag is not set
1The specified channel trigger DAC to start of conversion flag is set

This function is used to get selected channel trigger DAC flag.

Definition at line 457 of file epwm.c.

◆ EPWM_GetDutyIntFlag()

uint32_t EPWM_GetDutyIntFlag ( EPWM_T epwm,
uint32_t  u32ChannelNum 
)

Get duty interrupt flag of selected channel.

Parameters
[in]epwmThe pointer of the specified EPWM module
  • EPWM0 : EPWM Group 0
  • EPWM1 : EPWM Group 1
[in]u32ChannelNumEPWM channel number. Valid values are between 0~5
Returns
Duty interrupt flag of specified channel
Return values
0Duty interrupt did not occur
1Duty interrupt occurred

This function is used to get duty interrupt flag of selected channel.

Definition at line 807 of file epwm.c.

◆ EPWM_GetFaultBrakeIntFlag()

uint32_t EPWM_GetFaultBrakeIntFlag ( EPWM_T epwm,
uint32_t  u32BrakeSource 
)

This function get fault brake interrupt flag of selected source.

Parameters
[in]epwmThe pointer of the specified EPWM module
[in]u32BrakeSourceFault brake source, could be either
Returns
Fault brake interrupt flag of specified source
Return values
0Fault brake interrupt did not occurred
1Fault brake interrupt occurred

This function is used to get fault brake interrupt flag of selected source.

Definition at line 870 of file epwm.c.

◆ EPWM_GetFaultDetectInt()

uint32_t EPWM_GetFaultDetectInt ( EPWM_T epwm,
uint32_t  u32ChannelNum 
)

Get fault detect interrupt of selected channel.

Parameters
[in]epwmThe pointer of the specified EPWM module.
  • EPWM0 : EPWM Group 0
  • EPWM1 : EPWM Group 1
[in]u32ChannelNumEPWM channel number. Valid values are between 0~5.
Return values
0Fault detect interrupt did not occur.
1Fault detect interrupt occurred.

This function is used to Get fault detect interrupt of selected channel.

Definition at line 1688 of file epwm.c.

◆ EPWM_GetFTDutyIntFlag()

uint32_t EPWM_GetFTDutyIntFlag ( EPWM_T epwm,
uint32_t  u32ChannelNum 
)

Get free trigger duty interrupt flag of selected channel.

Parameters
[in]epwmThe pointer of the specified EPWM module
  • EPWM0 : EPWM Group 0
  • EPWM1 : EPWM Group 1
[in]u32ChannelNumEPWM channel number. Valid values are between 0~5
Returns
Duty interrupt flag of specified channel
Return values
0Free trigger duty interrupt did not occur
1Free trigger duty interrupt occurred

This function is used to get free trigger duty interrupt flag of selected channel.

Definition at line 1165 of file epwm.c.

◆ EPWM_GetPeriodIntFlag()

uint32_t EPWM_GetPeriodIntFlag ( EPWM_T epwm,
uint32_t  u32ChannelNum 
)

Get period interrupt of selected channel.

Parameters
[in]epwmThe pointer of the specified EPWM module
  • EPWM0 : EPWM Group 0
  • EPWM1 : EPWM Group 1
[in]u32ChannelNumEPWM channel number. Valid values are between 0~5
Returns
Period interrupt flag of specified channel
Return values
0Period interrupt did not occur
1Period interrupt occurred

This function is used to get period interrupt of selected channel.

Definition at line 929 of file epwm.c.

◆ EPWM_GetWrapAroundFlag()

uint32_t EPWM_GetWrapAroundFlag ( EPWM_T epwm,
uint32_t  u32ChannelNum 
)

Get the time-base counter reached its maximum value flag of selected channel.

Parameters
[in]epwmThe pointer of the specified EPWM module
  • EPWM0 : EPWM Group 0
  • EPWM1 : EPWM Group 1
[in]u32ChannelNumEPWM channel number. Valid values are between 0~5
Returns
Count to max interrupt flag of specified channel
Return values
0Count to max interrupt did not occur
1Count to max interrupt occurred

This function is used to get the time-base counter reached its maximum value flag of selected channel.

Definition at line 1494 of file epwm.c.

◆ EPWM_GetZeroIntFlag()

uint32_t EPWM_GetZeroIntFlag ( EPWM_T epwm,
uint32_t  u32ChannelNum 
)

Get zero interrupt of selected channel.

Parameters
[in]epwmThe pointer of the specified EPWM module
  • EPWM0 : EPWM Group 0
  • EPWM1 : EPWM Group 1
[in]u32ChannelNumEPWM channel number. Valid values are between 0~5
Returns
Zero interrupt flag of specified channel
Return values
0Zero interrupt did not occur
1Zero interrupt occurred

This function is used to get zero interrupt of selected channel.

Definition at line 987 of file epwm.c.

◆ EPWM_SetBrakePinSource()

void EPWM_SetBrakePinSource ( EPWM_T epwm,
uint32_t  u32BrakePinNum,
uint32_t  u32SelAnotherModule 
)

Set EPWM brake pin source.

Parameters
[in]epwmThe pointer of the specified EPWM module
  • EPWM0 : EPWM Group 0
  • EPWM1 : EPWM Group 1
[in]u32BrakePinNumBrake pin selection. Valid values are 0 or 1.
[in]u32SelAnotherModuleSelect to another module. Valid values are TRUE or FALSE.
Returns
None

This function is used to set EPWM brake pin source.

Definition at line 1445 of file epwm.c.

◆ EPWM_SetClockSource()

void EPWM_SetClockSource ( EPWM_T epwm,
uint32_t  u32ChannelNum,
uint32_t  u32ClkSrcSel 
)

Set EPWM clock source.

Parameters
[in]epwmThe pointer of the specified EPWM module
  • EPWM0 : EPWM Group 0
  • EPWM1 : EPWM Group 1
[in]u32ChannelNumEPWM channel number. Valid values are between 0~5
[in]u32ClkSrcSelEPWM external clock source.
Returns
None

This function is used to set EPWM clock source.

Note
Every two channels share the same setting.
If the clock source of EPWM counter is selected from TIMERn interrupt events, the TRGEPWM(TIMERn_TRGCTL[1], n=0,1..3) bit must be set as 1.

Definition at line 1362 of file epwm.c.

◆ EPWM_SetLeadingEdgeBlanking()

void EPWM_SetLeadingEdgeBlanking ( EPWM_T epwm,
uint32_t  u32TrigSrcSel,
uint32_t  u32TrigType,
uint32_t  u32BlankingCnt,
uint32_t  u32BlankingEnable 
)

Set EPWM leading edge blanking function.

Parameters
[in]epwmThe pointer of the specified EPWM module
  • EPWM0 : EPWM Group 0
  • EPWM1 : EPWM Group 1
[in]u32TrigSrcSelLeading edge blanking source selection.
[in]u32TrigTypeLeading edge blanking trigger type.
[in]u32BlankingCntLeading Edge Blanking Counter. Valid values are between 1~512. This counter value decides leading edge blanking window size, and this counter clock base is ECLK.
[in]u32BlankingEnableEnable EPWM leading edge blanking function. Valid values are TRUE (ENABLE) or FALSE (DISABLE).
Returns
None

This function is used to configure EPWM leading edge blanking function that blank the false trigger from ACMP brake source which may cause by EPWM output transition.

Note
EPWM leading edge blanking function is only used for brake source from ACMP.

Definition at line 1476 of file epwm.c.

◆ EPWM_Start()

void EPWM_Start ( EPWM_T epwm,
uint32_t  u32ChannelMask 
)

Start EPWM module.

Parameters
[in]epwmThe pointer of the specified EPWM module
  • EPWM0 : EPWM Group 0
  • EPWM1 : EPWM Group 1
[in]u32ChannelMaskCombination of enabled channels. Each bit corresponds to a channel. Bit 0 is channel 0, bit 1 is channel 1...
Returns
None

This function is used to start EPWM module.

Definition at line 211 of file epwm.c.

◆ EPWM_Stop()

void EPWM_Stop ( EPWM_T epwm,
uint32_t  u32ChannelMask 
)

Stop EPWM module.

Parameters
[in]epwmThe pointer of the specified EPWM module
  • EPWM0 : EPWM Group 0
  • EPWM1 : EPWM Group 1
[in]u32ChannelMaskCombination of enabled channels. Each bit corresponds to a channel. Bit 0 is channel 0, bit 1 is channel 1...
Returns
None

This function is used to stop EPWM module.

Definition at line 226 of file epwm.c.