AM62Ax MCU+ SDK  10.01.00

Introduction

This module contains APIs to program and use the EPWM module.

Files

file  epwm/v0/epwm.h
 This file contains declarations of CSL APIs corresponding to the ePWM module. This also contains necessary structure, enum and macro definitions and APIs are consolidated to provide more functional APIs.
 

Data Structures

struct  EPWM_TimebaseCfg
 Structure holding the TimeBase sub-module configuration parameters. More...
 
struct  EPWM_CounterCmpCfg
 Structure holding the Counter Comparator values. More...
 
struct  EPWM_AqActionCfg
 Structure holding the Action Qualifier actions to be taken on the PWM output at the specific events. More...
 
struct  EPWM_DeadbandCfg
 Structure holding the dead band generation sub-module configuration parameters. More...
 
struct  EPWM_ChopperCfg
 Structure holding the configuration parameters of Chopper sub-module. More...
 
struct  EPWM_TripzoneCfg
 Structure holding the trip-zone sub-module configuration parameters. More...
 
struct  EPWM_EtCfg
 Structure holding the Event Trigger Sub-Module configuration parameters. More...
 

Functions

void EPWM_tbTimebaseClkCfg (uint32_t baseAddr, uint32_t tbClk, uint32_t moduleClk)
 This API configures the clock divider of the Time base module. More...
 
void EPWM_tbPwmFreqCfg (uint32_t baseAddr, uint32_t tbClk, uint32_t pwmFreq, uint32_t counterDir, uint32_t enableShadowWrite)
 This API configures the PWM Time base counter Frequency/Period. More...
 
void EPWM_tbSyncEnable (uint32_t baseAddr, uint32_t tbPhsValue, uint32_t counterDir)
 This API enables the synchronization of time base sub-module and also configures the phase count value to be loaded after sync event, counter direction after sync event. More...
 
void EPWM_tbSyncDisable (uint32_t baseAddr)
 This API disables the synchronization. Even if sync-in event occurs the count value will not be reloaded. More...
 
void EPWM_tbSetSyncOutMode (uint32_t baseAddr, uint32_t syncOutMode)
 This API selects the source of the synchronization output signal. It determines on which of the supported events sync-out has to be generated. More...
 
void EPWM_tbTriggerSwSync (uint32_t baseAddr)
 This API generates software triggered sync pulse. More...
 
void EPWM_tbWriteTbCount (uint32_t baseAddr, uint32_t tbCount)
 This API loads the Time base counter. The new value is taken immediately. More...
 
uint16_t EPWM_tbReadTbCount (uint32_t baseAddr)
 This API gets the Time base counter current value. The count operation is not affected by the read. More...
 
uint16_t EPWM_tbGetStatus (uint32_t baseAddr, uint32_t tbStatusMask)
 This API gets the Time Base status as indicated by the tbStatusMask parameter. More...
 
void EPWM_tbStatusClear (uint32_t baseAddr, uint32_t tbStatusClrMask)
 This API clears the Time base status bits indicated by the tbStatusClrMask parameter. More...
 
void EPWM_tbSetEmulationMode (uint32_t baseAddr, uint32_t mode)
 This API configures emulation mode. This setting determines the behaviour of Timebase counter during emulation (debugging). More...
 
uint32_t EPWM_counterComparatorCfg (uint32_t baseAddr, uint32_t cmpType, uint32_t cmpVal, uint32_t enableShadowWrite, uint32_t shadowToActiveLoadTrigger, uint32_t overwriteShadow)
 This API configures the counter comparator and loads the comparator value. When Counter comparator value equals the counter value, then an event is generated both in the up direction and down direction. More...
 
void EPWM_aqActionOnOutputCfg (uint32_t baseAddr, uint32_t pwmOutputCh, const EPWM_AqActionCfg *pCfg)
 This API configures the action to be taken on output by the Action qualifier module upon receiving the events. This will determine the output waveform. More...
 
void EPWM_aqSwTriggerOneTimeAction (uint32_t baseAddr, uint32_t pwmOutputCh, uint32_t swTrigAction)
 This API triggers the SW forced single event on the PWM output. More...
 
void EPWM_aqSwTriggerContAction (uint32_t baseAddr, uint32_t pwmOutputCh, uint32_t swTrigAction, uint32_t activeRegReloadMode)
 This API forces output value continuously on PWM output channel. The output can be forced to low or high. More...
 
void EPWM_deadbandCfg (uint32_t baseAddr, const EPWM_DeadbandCfg *pCfg)
 This API performs the configuration of the dead band sub-module. This API configures the input source, output mode, polarity, rising and falling edge delays. More...
 
void EPWM_deadbandBypass (uint32_t baseAddr)
 This API bypasses the Dead-band sub-module. More...
 
void EPWM_chopperCfg (uint32_t baseAddr, const EPWM_ChopperCfg *pCfg)
 This API performs the configuration of the chopper sub-module. This API configures chopping clock duty cycle, chopping clock frequency and pulse width of first pulse of chopping clock. More...
 
void EPWM_chopperEnable (uint32_t baseAddr, uint32_t enableChopper)
 This API controls the enabling or disabling of chopper sub-module. More...
 
void EPWM_tzTriggerTripAction (uint32_t baseAddr, uint32_t tripAction, uint32_t pwmOutputCh)
 This API configures the o/p on PWM channel when a trip event is recognized. The output can be set to high or low or high impedance. More...
 
void EPWM_tzTripEventEnable (uint32_t baseAddr, uint32_t tzEventType, uint32_t pinNum)
 This API enables the trip event. More...
 
void EPWM_tzTripEventDisable (uint32_t baseAddr, uint32_t tzEventType, uint32_t pinNum)
 This API disable the trip event. The disabled trip events will be ignored. More...
 
void EPWM_tzIntrEnable (uint32_t baseAddr, uint32_t tzEventType)
 This API enables the trip interrupt. When trip event occurs the sub-module can be configured to interrupt CPU. More...
 
void EPWM_tzIntrDisable (uint32_t baseAddr, uint32_t tzEventType)
 This API disables the trip interrupt. More...
 
uint16_t EPWM_tzEventStatus (uint32_t baseAddr, uint32_t eventMask)
 This API returns the selected trip zone event status. More...
 
void EPWM_tzEventStatusClear (uint32_t baseAddr, uint32_t eventMask)
 This API clears the selected trip zone event status. More...
 
void EPWM_tzTriggerSwEvent (uint32_t baseAddr, uint32_t tzEventType)
 This API enables to generate Software forced trip condition. More...
 
void EPWM_etIntrCfg (uint32_t baseAddr, uint32_t intrEvtSrc, uint32_t intrPrd)
 This API configures the Event Trigger sub-module. This API configures the interrupt source and interrupt period. More...
 
void EPWM_etIntrEnable (uint32_t baseAddr)
 This API enables the ePWM Event interrupt. More...
 
void EPWM_etIntrDisable (uint32_t baseAddr)
 This API disables the ePWM Event interrupt. More...
 
uint16_t EPWM_etIntrStatus (uint32_t baseAddr)
 This API returns the ePWM event interrupt status. More...
 
void EPWM_etIntrClear (uint32_t baseAddr)
 This API clears the interrupt. This will clear the interrupt flag bit and enable further interrupts pulses to be generated. More...
 
void EPWM_etIntrTrigger (uint32_t baseAddr)
 This API forces interrupt to be generated. This API is used for testing purpose. More...
 
uint16_t EPWM_etGetEventCount (uint32_t baseAddr)
 This API returns the number of events occurred. More...
 

Macros

#define EPWM_ETFLG_INT_MASK   (PWMSS_EPWM_ETFLG_INT_MASK)
 Mask used to check interrupt status. More...
 

EPWM Output Channel

typedef uint32_t EPWM_OutputCh_t
 Number of supported EPWM outputs in a single epwm channel. More...
 
#define EPWM_OUTPUT_CH_MIN   (0U)
 
#define EPWM_OUTPUT_CH_A   (EPWM_OUTPUT_CH_MIN)
 
#define EPWM_OUTPUT_CH_B   (1U)
 
#define EPWM_OUTPUT_CH_MAX   (EPWM_OUTPUT_CH_B)
 

EPWM Tb Counter Direction

typedef uint32_t EPWM_TbCounterDir_t
 Types of Time base counter direction modes. More...
 
#define EPWM_TB_COUNTER_DIR_UP   (PWMSS_EPWM_TBCTL_CTRMODE_UP_COUNT)
 
#define EPWM_TB_COUNTER_DIR_DOWN   (PWMSS_EPWM_TBCTL_CTRMODE_DOWN_COUNT)
 
#define EPWM_TB_COUNTER_DIR_UP_DOWN   (PWMSS_EPWM_TBCTL_CTRMODE_UP_DOWN_COUNT)
 
#define EPWM_TB_COUNTER_DIR_STOP   (PWMSS_EPWM_TBCTL_CTRMODE_STOP_FREEZE)
 

EPWM Shadow register Control

typedef uint32_t EPWM_ShadowRegCtrl_t
 Shadow register enable or disable control. More...
 
#define EPWM_SHADOW_REG_CTRL_ENABLE   (PWMSS_EPWM_TBCTL_PRDLD_LOAD_FROM_SHADOW)
 
#define EPWM_SHADOW_REG_CTRL_DISABLE   (PWMSS_EPWM_TBCTL_PRDLD_LOAD_IMMEDIATELY)
 

EPWM Counter directions after sync event

typedef uint32_t EPWM_TbCntDirAftSync_t
 Counter directions after sync event. More...
 
#define EPWM_TB_CNT_DIR_AFT_SYNC_DOWN   (PWMSS_EPWM_TBCTL_PHSDIR_COUNT_DOWN)
 
#define EPWM_TB_CNT_DIR_AFT_SYNC_UP   (PWMSS_EPWM_TBCTL_PHSDIR_COUNT_UP)
 

EPWM Source of Synchronization output signal

typedef uint32_t EPWM_TbSyncOutEvt_t
 Source of Synchronization output signal. More...
 
#define EPWM_TB_SYNC_OUT_EVT_SYNCIN   (PWMSS_EPWM_TBCTL_SYNCOSEL_EPWMXSYNC)
 
#define EPWM_TB_SYNC_OUT_EVT_CNT_EQ_ZERO   (PWMSS_EPWM_TBCTL_SYNCOSEL_CTR_0)
 
#define EPWM_TB_SYNC_OUT_EVT_CNT_EQ_CMP_B   (PWMSS_EPWM_TBCTL_SYNCOSEL_CTR_CPMB)
 
#define EPWM_TB_SYNC_OUT_EVT_DISABLE   (PWMSS_EPWM_TBCTL_SYNCOSEL_DISABLE_EPWMXSYNCO)
 

EPWM Flags to get the different types of time base status

typedef uint32_t EPWM_TbSts_t
 Flags to get the different types of time base status. More...
 
#define EPWM_TB_STS_CTR_MAX   (PWMSS_EPWM_TBSTS_CTRMAX_MASK)
 
#define EPWM_TB_STS_SYNCI   (PWMSS_EPWM_TBSTS_SYNCI_MASK)
 
#define EPWM_TB_STS_CTR_DIR   (PWMSS_EPWM_TBSTS_CTRDIR_MASK)
 

EPWM Emulation Mode

typedef uint32_t EPWM_TbEmuMode_t
 Emulation Mode. This selects the behaviour of the ePWM time-base counter during emulation events. More...
 
#define EPWM_TB_EMU_MODE_STP_AFT_NEXT_CYCLE   (PWMSS_EPWM_TBCTL_FREE_SOFT_STOP_AFTER_NEXT_CTR)
 
#define EPWM_TB_EMU_MODE_STP_AFT_COMPLETE_CYCLE   (PWMSS_EPWM_TBCTL_FREE_SOFT_STOP_AFTER_CYCLE)
 
#define EPWM_TB_EMU_MODE_FREE_RUN   (PWMSS_EPWM_TBCTL_FREE_SOFT_RUN2)
 

EPWM Comparator type

typedef uint32_t EPWM_CcCmp_t
 
#define EPWM_CC_CMP_MIN   (0U)
 
#define EPWM_CC_CMP_A   (EPWM_CC_CMP_MIN)
 
#define EPWM_CC_CMP_B   (1U)
 
#define EPWM_CC_CMP_MAX   (CSL_EPWM_CC_CMP_B)
 

EPWM Counter-Comparator registers(A and B) load mode

typedef uint32_t EPWM_CcCmpLoadMode_t
 Counter-Comparator registers(A and B) load mode flags from shadow register. More...
 
#define EPWM_CC_CMP_LOAD_MODE_CNT_EQ_ZERO   (PWMSS_EPWM_CMPCTL_LOADAMODE_CTR_0)
 
#define EPWM_CC_CMP_LOAD_MODE_CNT_EQ_PRD   (PWMSS_EPWM_CMPCTL_LOADAMODE_CTR_PRD)
 
#define EPWM_CC_CMP_LOAD_MODE_CNT_EQ_ZERO_OR_PRD   (PWMSS_EPWM_CMPCTL_LOADAMODE_CTR_0_OR_PRD)
 
#define EPWM_CC_CMP_LOAD_MODE_NO_LOAD   (PWMSS_EPWM_CMPCTL_LOADAMODE_FREEZE)
 

EPWM Actions

typedef uint32_t EPWM_AqAction_t
 Types of Actions that Action Qualifier can take on the Output when the supported counter compare event occurs. More...
 
#define EPWM_AQ_ACTION_DONOTHING   (PWMSS_EPWM_AQCTLA_ZRO_DISABLED)
 
#define EPWM_AQ_ACTION_LOW   (PWMSS_EPWM_AQCTLA_ZRO_CLEAR)
 
#define EPWM_AQ_ACTION_HIGH   (PWMSS_EPWM_AQCTLA_ZRO_SET)
 
#define EPQM_AQ_ACTION_TOLLGE   (PWMSS_EPWM_AQCTLA_ZRO_TOGGLE)
 
#define EPWM_AQ_ACTION_TOLLGE   (CSL_EPQM_AQ_ACTION_TOLLGE)
 

EPWM output actions

typedef uint32_t EPWM_AqSwTrigOtAction_t
 Actions to be taken on the output, when Software triggered one time events will occur. More...
 
#define EPWM_AQ_SW_TRIG_OT_ACTION_DONOTHING   (PWMSS_EPWM_AQSFRC_ACTSFA_DISABLED)
 
#define EPWM_AQ_SW_TRIG_OT_ACTION_LOW   (PWMSS_EPWM_AQSFRC_ACTSFA_CLEAR)
 
#define EPWM_AQ_SW_TRIG_OT_ACTION_HIGH   (PWMSS_EPWM_AQSFRC_ACTSFA_SET)
 
#define EPWM_AQ_SW_TRIG_OT_ACTION_TOGGLE   (PWMSS_EPWM_AQSFRC_ACTSFA_TOGGLE)
 

EPWM Continuous software forced actions

typedef uint32_t EPWM_AqSwTrigContAction_t
 Types of Continuous software forced actions on output. More...
 
#define EPWM_AQ_SW_TRIG_CONT_ACTION_NOEFFECT   (PWMSS_EPWM_AQCSFRC_CSFA_DISABLED)
 
#define EPWM_AQ_SW_TRIG_CONT_ACTION_LOW   (PWMSS_EPWM_AQCSFRC_CSFA_LOW_OUTPUT)
 
#define EPWM_AQ_SW_TRIG_CONT_ACTION_HIGH   (PWMSS_EPWM_AQCSFRC_CSFA_HIGH_OUTPUT)
 
#define EPWM_AQ_SW_TRIG_CONT_ACTION_SW_DISBALED   (PWMSS_EPWM_AQCSFRC_CSFA_NO_EFFECT)
 

EPWM Software Force Active Register Reload

typedef uint32_t EPWM_AqCsfrcRegReload_t
 Action Qualifier Software Force Active Register Reload From Shadow Options. More...
 
#define EPWM_AQ_CSFRC_REG_RELOAD_CNT_EQ_ZRO   (PWMSS_EPWM_AQSFRC_RLDCSF_CTR_0)
 
#define EPWM_AQ_CSFRC_REG_RELOAD_CNT_EQ_PRD   (PWMSS_EPWM_AQSFRC_RLDCSF_CTR_PERIOD)
 
#define EPWM_AQ_CSFRC_REG_RELOAD_CNT_EQ_ZRO_OR_PRD   (PWMSS_EPWM_AQSFRC_RLDCSF_CTR_0_OR_PERIOD)
 
#define EPWM_AQ_CSFRC_REG_RELOAD_IMMEDIATE   (PWMSS_EPWM_AQSFRC_RLDCSF_IMMEDIATE)
 

EPWM Dead Band Input Mode Control

typedef uint32_t EPWM_DbInMode_t
 Dead Band Input Mode Control. This allows you to select the input source to the falling-edge and rising-edge delay. More...
 
#define EPWM_DB_IN_MODE_A_RED_A_FED   (PWMSS_EPWM_DBCTL_IN_MODE_SRC_ARED_AFED)
 
#define EPWM_DB_IN_MODE_B_RED_A_FED   (PWMSS_EPWM_DBCTL_IN_MODE_SRC_BRED_AFED)
 
#define EPWM_DB_IN_MODE_A_RED_B_FED   (PWMSS_EPWM_DBCTL_IN_MODE_SRC_ARED_BFED)
 
#define EPWM_DB_IN_MODE_B_RED_B_FED   (PWMSS_EPWM_DBCTL_IN_MODE_SRC_BRED_BFED)
 

EPWM Polarity Select Control

typedef uint32_t EPWM_DbPolSel_t
 Polarity Select Control. This allows you to selectively invert one of the delayed signals before it is sent out of the dead-band sub-module. More...
 
#define EPWM_DB_POL_SEL_ACTV_HIGH   (PWMSS_EPWM_DBCTL_POLSEL_ACTIVE_HIGH)
 
#define EPWM_DB_POL_SEL_ACTV_LOW_COMPLEMENTARY   (PWMSS_EPWM_DBCTL_POLSEL_ACTIVE_LOW_COMPLEMENTARY)
 
#define EPWM_DB_POL_SEL_ACTV_HIGH_COMPLEMENTARY   (PWMSS_EPWM_DBCTL_POLSEL_ACTIVE_HIGH_COMPLEMENTARY)
 
#define EPWM_DB_POL_SEL_ACTV_LOW   (PWMSS_EPWM_DBCTL_POLSEL_ACTIVE_LOW)
 

EPWM Dead-band Output Mode Control

typedef uint32_t EPWM_DbOutMode_t
 Dead-band Output Mode Control. This allows you to selectively enable or bypass the dead-band generation for the falling-edge and rising-edge delay. More...
 
#define EPWM_DB_OUT_MODE_BYPASS   (PWMSS_EPWM_DBCTL_OUT_MODE_DISABLED)
 
#define EPWM_DB_OUT_MODE_NO_RED_B_FED   (PWMSS_EPWM_DBCTL_OUT_MODE_DISABLE_RISING_EDGE)
 
#define EPWM_DB_OUT_MODE_A_RED_NO_FED   (PWMSS_EPWM_DBCTL_OUT_MODE_DISABLE_FALLING_EDGE)
 
#define EPWM_DB_OUT_MODE_A_RED_B_FED   (PWMSS_EPWM_DBCTL_OUT_MODE_ENABLED)
 

EPWM Chopping Clock Duty Cycle

typedef uint32_t EPWM_ChpDutyCycle_t
 Chopping Clock Duty Cycle values. More...
 
#define EPWM_CHP_DUTY_CYCLE_PERC_12PNT5   (PWMSS_EPWM_PCCTL_CHPDUTY_DUTY_12_5)
 
#define EPWM_CHP_DUTY_CYCLE_PERC_25   (PWMSS_EPWM_PCCTL_CHPDUTY_DUTY_25)
 
#define EPWM_CHP_DUTY_CYCLE_PERC_37PNT5   (PWMSS_EPWM_PCCTL_CHPDUTY_DUTY_37_5)
 
#define EPWM_CHP_DUTY_CYCLE_PERC_50_PER   (PWMSS_EPWM_PCCTL_CHPDUTY_DUTY_50)
 
#define EPWM_CHP_DUTY_CYCLE_PERC_62PNT5   (PWMSS_EPWM_PCCTL_CHPDUTY_DUTY_62_5)
 
#define EPWM_CHP_DUTY_CYCLE_PERC_75   (PWMSS_EPWM_PCCTL_CHPDUTY_DUTY_75)
 
#define EPWM_CHP_DUTY_CYCLE_PERC_87PNT5   (PWMSS_EPWM_PCCTL_CHPDUTY_DUTY_87_5)
 

EPWM Chopping Clock Frequency

typedef uint32_t EPWM_ChpClkFreq_t
 Chopping Clock Frequency values . More...
 
#define EPWM_CHP_CLK_FREQ_DIV_BY_1   (PWMSS_EPWM_PCCTL_CHPFREQ_DIV_1)
 
#define EPWM_CHP_CLK_FREQ_DIV_BY_2   (PWMSS_EPWM_PCCTL_CHPFREQ_DIV_2)
 
#define EPWM_CHP_CLK_FREQ_DIV_BY_3   (PWMSS_EPWM_PCCTL_CHPFREQ_DIV_3)
 
#define EPWM_CHP_CLK_FREQ_DIV_BY_4   (PWMSS_EPWM_PCCTL_CHPFREQ_DIV_4)
 
#define EPWM_CHP_CLK_FREQ_DIV_BY_5   (PWMSS_EPWM_PCCTL_CHPFREQ_DIV_5)
 
#define EPWM_CHP_CLK_FREQ_DIV_BY_6   (PWMSS_EPWM_PCCTL_CHPFREQ_DIV_6)
 
#define EPWM_CHP_CLK_FREQ_DIV_BY_7   (PWMSS_EPWM_PCCTL_CHPFREQ_DIV_7)
 
#define EPWM_CHP_CLK_FREQ_DIV_BY_8   (PWMSS_EPWM_PCCTL_CHPFREQ_DIV_8)
 

EPWM One-Shot Pulse Width

typedef uint32_t EPWM_ChpOshtWidth_t
 One-Shot Pulse Width values. More...
 
#define EPWM_CHP_OSHT_WIDTH_MIN   (0U)
 
#define EPWM_CHP_OSHT_WIDTH_1XSYSOUT_BY_8   (CSL_EPWM_CHP_OSHT_WIDTH_MIN)
 
#define EPWM_CHP_OSHT_WIDTH_2XSYSOUT_BY_8   (1U)
 
#define EPWM_CHP_OSHT_WIDTH_3XSYSOUT_BY_8   (2U)
 
#define EPWM_CHP_OSHT_WIDTH_4XSYSOUT_BY_8   (3U)
 
#define EPWM_CHP_OSHT_WIDTH_5XSYSOUT_BY_8   (4U)
 
#define EPWM_CHP_OSHT_WIDTH_6XSYSOUT_BY_8   (5U)
 
#define EPWM_CHP_OSHT_WIDTH_7XSYSOUT_BY_8   (6U)
 
#define EPWM_CHP_OSHT_WIDTH_8XSYSOUT_BY_8   (7U)
 
#define EPWM_CHP_OSHT_WIDTH_9XSYSOUT_BY_8   (8U)
 
#define EPWM_CHP_OSHT_WIDTH_10XSYSOUT_BY_8   (9U)
 
#define EPWM_CHP_OSHT_WIDTH_11XSYSOUT_BY_8   (10U)
 
#define EPWM_CHP_OSHT_WIDTH_12XSYSOUT_BY_8   (11U)
 
#define EPWM_CHP_OSHT_WIDTH_13XSYSOUT_BY_8   (12U)
 
#define EPWM_CHP_OSHT_WIDTH_14XSYSOUT_BY_8   (13U)
 
#define EPWM_CHP_OSHT_WIDTH_15XSYSOUT_BY_8   (14U)
 
#define EPWM_CHP_OSHT_WIDTH_16XSYSOUT_BY_8   (15U)
 
#define EPWM_CHP_OSHT_WIDTH_MAX   (CSL_EPWM_CHP_OSHT_WIDTH_16XSYSOUT_BY_8)
 

EPWM output action when a trip event occurs

typedef uint32_t EPWM_TzTripAction_t
 Action to be taken on PWM output When a trip event occurs. More...
 
#define EPWM_TZ_TRIP_ACTION_TRI_STATE   (PWMSS_EPWM_TZCTL_TZA_HIGH_IMPEDANCE)
 
#define EPWM_TZ_TRIP_ACTION_HIGH   (PWMSS_EPWM_TZCTL_TZA_HIGH_STATE)
 
#define EPWM_TZ_TRIP_ACTION_LOW   (PWMSS_EPWM_TZCTL_TZA_LOW_STATE)
 
#define EPWM_TZ_TRIP_ACTION_DO_NOTHING   (PWMSS_EPWM_TZCTL_TZA_DO_NOTHING)
 

EPWM trip zone events

typedef uint32_t EPWM_TzEvent_t
 Type of trip zone events. More...
 
#define EPWM_TZ_EVENT_MIN   (0x0U)
 
#define EPWM_TZ_EVENT_ONE_SHOT   (EPWM_TZ_EVENT_MIN)
 
#define EPWM_TZ_EVENT_CYCLE_BY_CYCLE   (0x1U)
 
#define EPWM_TZ_EVENT_MAX   (CSL_EPWM_TZ_EVENT_CYCLE_BY_CYCLE)
 

EPWM Trip zone status flags

typedef uint32_t EPWM_TzStsFlg_t
 Trip zone status flags. More...
 
#define EPWM_TZ_STS_FLG_OST   (PWMSS_EPWM_TZFLG_OST_MASK)
 
#define EPWM_TZ_STS_FLG_CBC   (PWMSS_EPWM_TZFLG_CBC_MASK)
 
#define EPWM_TZ_STS_FLG_INT   (PWMSS_EPWM_TZFLG_INT_MASK)
 

EPWM Interrupt (EPWMx_INT) Selection Options

typedef uint32_t EPWM_EtIntrEvt_t
 ePWM Interrupt (EPWMx_INT) Selection Options. More...
 
#define EPWM_ET_INTR_EVT_CNT_EQ_ZRO   (PWMSS_EPWM_ETSEL_INTSEL_CTR_0)
 
#define EPWM_ET_INTR_EVT_CNT_EQ_PRD   (PWMSS_EPWM_ETSEL_INTSEL_CTR_PERIOD)
 
#define EPWM_ET_INTR_EVT_CNT_EQ_CMPA_INC   (PWMSS_EPWM_ETSEL_INTSEL_CTR_CMPA_INCR)
 
#define EPWM_ET_INTR_EVT_CNT_EQ_CMPA_DEC   (PWMSS_EPWM_ETSEL_INTSEL_CTR_CMPA_DECR)
 
#define EPWM_ET_INTR_EVT_CNT_EQ_CMPB_INC   (PWMSS_EPWM_ETSEL_INTSEL_CTR_CMPB_INCR)
 
#define EPWM_ET_INTR_EVT_CNT_EQ_CMPB_DEC   (PWMSS_EPWM_ETSEL_INTSEL_CTR_CMPB_DECR)
 

EPWM Interrupt (EPWMx_INT) Period Select

typedef uint32_t EPWM_EtIntrPeriod_t
 ePWM Interrupt (EPWMx_INT) Period Select. These values determine how many selected events need to occur before an interrupt is generated. More...
 
#define EPWM_ET_INTR_PERIOD_DIS_INTR   (PWMSS_EPWM_ETPS_INTPRD_DISABLE)
 
#define EPWM_ET_INTR_PERIOD_FIRST_EVT   (PWMSS_EPWM_ETPS_INTPRD_GEN_FIRST_EVT)
 
#define EPWM_ET_INTR_PERIOD_SECOND_EVT   (PWMSS_EPWM_ETPS_INTPRD_GEN_SECOND_EVT)
 
#define EPWM_ET_INTR_PERIOD_THIRD_EVT   (PWMSS_EPWM_ETPS_INTPRD_GEN_THIRD_EVT)
 

Macro Definition Documentation

◆ EPWM_OUTPUT_CH_MIN

#define EPWM_OUTPUT_CH_MIN   (0U)

Minimum value of enumeration. Used for input validation.

◆ EPWM_OUTPUT_CH_A

#define EPWM_OUTPUT_CH_A   (EPWM_OUTPUT_CH_MIN)

Output channel A.

◆ EPWM_OUTPUT_CH_B

#define EPWM_OUTPUT_CH_B   (1U)

Output channel B.

◆ EPWM_OUTPUT_CH_MAX

#define EPWM_OUTPUT_CH_MAX   (EPWM_OUTPUT_CH_B)

Maximum value of enumeration. Used for input validation.

◆ EPWM_TB_COUNTER_DIR_UP

#define EPWM_TB_COUNTER_DIR_UP   (PWMSS_EPWM_TBCTL_CTRMODE_UP_COUNT)

Up Count mode.

◆ EPWM_TB_COUNTER_DIR_DOWN

#define EPWM_TB_COUNTER_DIR_DOWN   (PWMSS_EPWM_TBCTL_CTRMODE_DOWN_COUNT)

Down count mode.

◆ EPWM_TB_COUNTER_DIR_UP_DOWN

#define EPWM_TB_COUNTER_DIR_UP_DOWN   (PWMSS_EPWM_TBCTL_CTRMODE_UP_DOWN_COUNT)

Up down count mode.

◆ EPWM_TB_COUNTER_DIR_STOP

#define EPWM_TB_COUNTER_DIR_STOP   (PWMSS_EPWM_TBCTL_CTRMODE_STOP_FREEZE)

stop-freeze counter operation (default on reset).

◆ EPWM_SHADOW_REG_CTRL_ENABLE

#define EPWM_SHADOW_REG_CTRL_ENABLE   (PWMSS_EPWM_TBCTL_PRDLD_LOAD_FROM_SHADOW)

Shadow register value will be used.

◆ EPWM_SHADOW_REG_CTRL_DISABLE

#define EPWM_SHADOW_REG_CTRL_DISABLE   (PWMSS_EPWM_TBCTL_PRDLD_LOAD_IMMEDIATELY)

Shadow register is disabled and active register value will be used.

◆ EPWM_TB_CNT_DIR_AFT_SYNC_DOWN

#define EPWM_TB_CNT_DIR_AFT_SYNC_DOWN   (PWMSS_EPWM_TBCTL_PHSDIR_COUNT_DOWN)

Count down after the synchronization event.

◆ EPWM_TB_CNT_DIR_AFT_SYNC_UP

#define EPWM_TB_CNT_DIR_AFT_SYNC_UP   (PWMSS_EPWM_TBCTL_PHSDIR_COUNT_UP)

Count up after the synchronization event.

◆ EPWM_TB_SYNC_OUT_EVT_SYNCIN

#define EPWM_TB_SYNC_OUT_EVT_SYNCIN   (PWMSS_EPWM_TBCTL_SYNCOSEL_EPWMXSYNC)

Sync Input signal.

◆ EPWM_TB_SYNC_OUT_EVT_CNT_EQ_ZERO

#define EPWM_TB_SYNC_OUT_EVT_CNT_EQ_ZERO   (PWMSS_EPWM_TBCTL_SYNCOSEL_CTR_0)

Time-base counter equal to zero.

◆ EPWM_TB_SYNC_OUT_EVT_CNT_EQ_CMP_B

#define EPWM_TB_SYNC_OUT_EVT_CNT_EQ_CMP_B   (PWMSS_EPWM_TBCTL_SYNCOSEL_CTR_CPMB)

Time-base counter equal to counter-compare B (TBCNT = CMPB).

◆ EPWM_TB_SYNC_OUT_EVT_DISABLE

#define EPWM_TB_SYNC_OUT_EVT_DISABLE   (PWMSS_EPWM_TBCTL_SYNCOSEL_DISABLE_EPWMXSYNCO)

Disable EPWMxSYNCO(Sync Output) signal.

◆ EPWM_TB_STS_CTR_MAX

#define EPWM_TB_STS_CTR_MAX   (PWMSS_EPWM_TBSTS_CTRMAX_MASK)

Time-Base Counter Max Latched Status.

◆ EPWM_TB_STS_SYNCI

#define EPWM_TB_STS_SYNCI   (PWMSS_EPWM_TBSTS_SYNCI_MASK)

Input Synchronization Latched Status.

◆ EPWM_TB_STS_CTR_DIR

#define EPWM_TB_STS_CTR_DIR   (PWMSS_EPWM_TBSTS_CTRDIR_MASK)

Time-Base Counter Direction Status.

◆ EPWM_TB_EMU_MODE_STP_AFT_NEXT_CYCLE

#define EPWM_TB_EMU_MODE_STP_AFT_NEXT_CYCLE   (PWMSS_EPWM_TBCTL_FREE_SOFT_STOP_AFTER_NEXT_CTR)

Stop after the next time-base counter increment or decrement.

◆ EPWM_TB_EMU_MODE_STP_AFT_COMPLETE_CYCLE

#define EPWM_TB_EMU_MODE_STP_AFT_COMPLETE_CYCLE   (PWMSS_EPWM_TBCTL_FREE_SOFT_STOP_AFTER_CYCLE)

Stop after the next time-base counter increment or decrement. Up-count mode: stop when the time-base counter = period. Down-count mode: stop when the time-base counter = 0000. Up-down-count mode: stop when the time-base counter = 0000.

◆ EPWM_TB_EMU_MODE_FREE_RUN

#define EPWM_TB_EMU_MODE_FREE_RUN   (PWMSS_EPWM_TBCTL_FREE_SOFT_RUN2)

Counter is in Free run.

◆ EPWM_CC_CMP_MIN

#define EPWM_CC_CMP_MIN   (0U)

Minimum value of enumeration. Used for input validation.

◆ EPWM_CC_CMP_A

#define EPWM_CC_CMP_A   (EPWM_CC_CMP_MIN)

Counter Comparator A.

◆ EPWM_CC_CMP_B

#define EPWM_CC_CMP_B   (1U)

Counter Comparator B.

◆ EPWM_CC_CMP_MAX

#define EPWM_CC_CMP_MAX   (CSL_EPWM_CC_CMP_B)

Maximum value of enumeration. Used for input validation.

◆ EPWM_CC_CMP_LOAD_MODE_CNT_EQ_ZERO

#define EPWM_CC_CMP_LOAD_MODE_CNT_EQ_ZERO   (PWMSS_EPWM_CMPCTL_LOADAMODE_CTR_0)

Load on CTR = 0: Time-base counter equal to zero.

◆ EPWM_CC_CMP_LOAD_MODE_CNT_EQ_PRD

#define EPWM_CC_CMP_LOAD_MODE_CNT_EQ_PRD   (PWMSS_EPWM_CMPCTL_LOADAMODE_CTR_PRD)

Load on CTR = PRD: Time-base counter equal to period.

◆ EPWM_CC_CMP_LOAD_MODE_CNT_EQ_ZERO_OR_PRD

#define EPWM_CC_CMP_LOAD_MODE_CNT_EQ_ZERO_OR_PRD   (PWMSS_EPWM_CMPCTL_LOADAMODE_CTR_0_OR_PRD)

Load on either CTR = 0 or CTR = PRD.

◆ EPWM_CC_CMP_LOAD_MODE_NO_LOAD

#define EPWM_CC_CMP_LOAD_MODE_NO_LOAD   (PWMSS_EPWM_CMPCTL_LOADAMODE_FREEZE)

Freeze (no loads possible).

◆ EPWM_AQ_ACTION_DONOTHING

#define EPWM_AQ_ACTION_DONOTHING   (PWMSS_EPWM_AQCTLA_ZRO_DISABLED)

Do nothing (Action disabled).

◆ EPWM_AQ_ACTION_LOW

#define EPWM_AQ_ACTION_LOW   (PWMSS_EPWM_AQCTLA_ZRO_CLEAR)

Clear: Force EPWMx output low.

◆ EPWM_AQ_ACTION_HIGH

#define EPWM_AQ_ACTION_HIGH   (PWMSS_EPWM_AQCTLA_ZRO_SET)

Set: Force EPWMx output high.

◆ EPQM_AQ_ACTION_TOLLGE

#define EPQM_AQ_ACTION_TOLLGE   (PWMSS_EPWM_AQCTLA_ZRO_TOGGLE)

◆ EPWM_AQ_ACTION_TOLLGE

#define EPWM_AQ_ACTION_TOLLGE   (CSL_EPQM_AQ_ACTION_TOLLGE)

Toggle EPWMx output: low output signal will be forced high, and a high signal will be forced low.

◆ EPWM_AQ_SW_TRIG_OT_ACTION_DONOTHING

#define EPWM_AQ_SW_TRIG_OT_ACTION_DONOTHING   (PWMSS_EPWM_AQSFRC_ACTSFA_DISABLED)

Do nothing (Action disabled).

◆ EPWM_AQ_SW_TRIG_OT_ACTION_LOW

#define EPWM_AQ_SW_TRIG_OT_ACTION_LOW   (PWMSS_EPWM_AQSFRC_ACTSFA_CLEAR)

Clear: Output Low.

◆ EPWM_AQ_SW_TRIG_OT_ACTION_HIGH

#define EPWM_AQ_SW_TRIG_OT_ACTION_HIGH   (PWMSS_EPWM_AQSFRC_ACTSFA_SET)

Set: Output high.

◆ EPWM_AQ_SW_TRIG_OT_ACTION_TOGGLE

#define EPWM_AQ_SW_TRIG_OT_ACTION_TOGGLE   (PWMSS_EPWM_AQSFRC_ACTSFA_TOGGLE)

Toggle output.

◆ EPWM_AQ_SW_TRIG_CONT_ACTION_NOEFFECT

#define EPWM_AQ_SW_TRIG_CONT_ACTION_NOEFFECT   (PWMSS_EPWM_AQCSFRC_CSFA_DISABLED)

Forcing disabled, that is, has no effect.

◆ EPWM_AQ_SW_TRIG_CONT_ACTION_LOW

#define EPWM_AQ_SW_TRIG_CONT_ACTION_LOW   (PWMSS_EPWM_AQCSFRC_CSFA_LOW_OUTPUT)

Forces a continuous low on output A.

◆ EPWM_AQ_SW_TRIG_CONT_ACTION_HIGH

#define EPWM_AQ_SW_TRIG_CONT_ACTION_HIGH   (PWMSS_EPWM_AQCSFRC_CSFA_HIGH_OUTPUT)

Forces a continuous high on output A.

◆ EPWM_AQ_SW_TRIG_CONT_ACTION_SW_DISBALED

#define EPWM_AQ_SW_TRIG_CONT_ACTION_SW_DISBALED   (PWMSS_EPWM_AQCSFRC_CSFA_NO_EFFECT)

Software forcing is disabled and has no effect.

◆ EPWM_AQ_CSFRC_REG_RELOAD_CNT_EQ_ZRO

#define EPWM_AQ_CSFRC_REG_RELOAD_CNT_EQ_ZRO   (PWMSS_EPWM_AQSFRC_RLDCSF_CTR_0)

Load on event counter equals zero.

◆ EPWM_AQ_CSFRC_REG_RELOAD_CNT_EQ_PRD

#define EPWM_AQ_CSFRC_REG_RELOAD_CNT_EQ_PRD   (PWMSS_EPWM_AQSFRC_RLDCSF_CTR_PERIOD)

Load on event counter equals period.

◆ EPWM_AQ_CSFRC_REG_RELOAD_CNT_EQ_ZRO_OR_PRD

#define EPWM_AQ_CSFRC_REG_RELOAD_CNT_EQ_ZRO_OR_PRD   (PWMSS_EPWM_AQSFRC_RLDCSF_CTR_0_OR_PERIOD)

Load on event counter equals zero or counter equals period.

◆ EPWM_AQ_CSFRC_REG_RELOAD_IMMEDIATE

#define EPWM_AQ_CSFRC_REG_RELOAD_IMMEDIATE   (PWMSS_EPWM_AQSFRC_RLDCSF_IMMEDIATE)

Load immediately.

◆ EPWM_DB_IN_MODE_A_RED_A_FED

#define EPWM_DB_IN_MODE_A_RED_A_FED   (PWMSS_EPWM_DBCTL_IN_MODE_SRC_ARED_AFED)

EPWMxA In (from the action-qualifier) is the source for both falling-edge and rising-edge delay.

◆ EPWM_DB_IN_MODE_B_RED_A_FED

#define EPWM_DB_IN_MODE_B_RED_A_FED   (PWMSS_EPWM_DBCTL_IN_MODE_SRC_BRED_AFED)

EPWMxB In (from the action-qualifier) is the source for rising-edge delayed signal. EPWMxA In (from the action-qualifier) is the source for falling-edge delayed signal.

◆ EPWM_DB_IN_MODE_A_RED_B_FED

#define EPWM_DB_IN_MODE_A_RED_B_FED   (PWMSS_EPWM_DBCTL_IN_MODE_SRC_ARED_BFED)

EPWMxA In (from the action-qualifier) is the source for rising-edge delayed signal. EPWMxB In (from the action-qualifier) is the source for falling-edge delayed signal.

◆ EPWM_DB_IN_MODE_B_RED_B_FED

#define EPWM_DB_IN_MODE_B_RED_B_FED   (PWMSS_EPWM_DBCTL_IN_MODE_SRC_BRED_BFED)

EPWMxB In (from the action-qualifier) is the source for both rising-edge delay and falling-edge delayed signal.

◆ EPWM_DB_POL_SEL_ACTV_HIGH

#define EPWM_DB_POL_SEL_ACTV_HIGH   (PWMSS_EPWM_DBCTL_POLSEL_ACTIVE_HIGH)

Neither EPWMxA nor EPWMxB is inverted (default).

◆ EPWM_DB_POL_SEL_ACTV_LOW_COMPLEMENTARY

#define EPWM_DB_POL_SEL_ACTV_LOW_COMPLEMENTARY   (PWMSS_EPWM_DBCTL_POLSEL_ACTIVE_LOW_COMPLEMENTARY)

EPWMxA is inverted.

◆ EPWM_DB_POL_SEL_ACTV_HIGH_COMPLEMENTARY

#define EPWM_DB_POL_SEL_ACTV_HIGH_COMPLEMENTARY   (PWMSS_EPWM_DBCTL_POLSEL_ACTIVE_HIGH_COMPLEMENTARY)

EPWMxB is inverted.

◆ EPWM_DB_POL_SEL_ACTV_LOW

#define EPWM_DB_POL_SEL_ACTV_LOW   (PWMSS_EPWM_DBCTL_POLSEL_ACTIVE_LOW)

Both EPWMxA and EPWMxB are inverted.

◆ EPWM_DB_OUT_MODE_BYPASS

#define EPWM_DB_OUT_MODE_BYPASS   (PWMSS_EPWM_DBCTL_OUT_MODE_DISABLED)

Dead-band generation is bypassed for both output signals. In this mode, both the EPWMxA and EPWMxB output signals from the action-qualifier are passed directly to the PWM-chopper sub-module.

◆ EPWM_DB_OUT_MODE_NO_RED_B_FED

#define EPWM_DB_OUT_MODE_NO_RED_B_FED   (PWMSS_EPWM_DBCTL_OUT_MODE_DISABLE_RISING_EDGE)

Disable rising-edge delay. The EPWMxA signal from the action-qualifier is passed straight through to the EPWMxA input of the PWM-chopper sub-module. The falling-edge delayed signal is seen on output EPWMxB

◆ EPWM_DB_OUT_MODE_A_RED_NO_FED

#define EPWM_DB_OUT_MODE_A_RED_NO_FED   (PWMSS_EPWM_DBCTL_OUT_MODE_DISABLE_FALLING_EDGE)

Disable falling-edge delay. The EPWMxB signal from the action-qualifier is passed straight through to the EPWMxB input of the PWM-chopper sub-module. The rising-edge delayed signal is seen on output EPWMxA.

◆ EPWM_DB_OUT_MODE_A_RED_B_FED

#define EPWM_DB_OUT_MODE_A_RED_B_FED   (PWMSS_EPWM_DBCTL_OUT_MODE_ENABLED)

Dead-band is fully enabled for both rising-edge delay on output EPWMxA and falling-edge delay on output EPWMxB.

◆ EPWM_CHP_DUTY_CYCLE_PERC_12PNT5

#define EPWM_CHP_DUTY_CYCLE_PERC_12PNT5   (PWMSS_EPWM_PCCTL_CHPDUTY_DUTY_12_5)

Duty cycle 1/8 (12.5%).

◆ EPWM_CHP_DUTY_CYCLE_PERC_25

#define EPWM_CHP_DUTY_CYCLE_PERC_25   (PWMSS_EPWM_PCCTL_CHPDUTY_DUTY_25)

Duty cycle 2/8 (25%).

◆ EPWM_CHP_DUTY_CYCLE_PERC_37PNT5

#define EPWM_CHP_DUTY_CYCLE_PERC_37PNT5   (PWMSS_EPWM_PCCTL_CHPDUTY_DUTY_37_5)

Duty cycle 3/8 (37.5%).

◆ EPWM_CHP_DUTY_CYCLE_PERC_50_PER

#define EPWM_CHP_DUTY_CYCLE_PERC_50_PER   (PWMSS_EPWM_PCCTL_CHPDUTY_DUTY_50)

Duty cycle 4/8 (50%).

◆ EPWM_CHP_DUTY_CYCLE_PERC_62PNT5

#define EPWM_CHP_DUTY_CYCLE_PERC_62PNT5   (PWMSS_EPWM_PCCTL_CHPDUTY_DUTY_62_5)

Duty cycle 5/8 (62.5%).

◆ EPWM_CHP_DUTY_CYCLE_PERC_75

#define EPWM_CHP_DUTY_CYCLE_PERC_75   (PWMSS_EPWM_PCCTL_CHPDUTY_DUTY_75)

Duty cycle 6/8 (75%).

◆ EPWM_CHP_DUTY_CYCLE_PERC_87PNT5

#define EPWM_CHP_DUTY_CYCLE_PERC_87PNT5   (PWMSS_EPWM_PCCTL_CHPDUTY_DUTY_87_5)

Duty cycle 7/8 (87.5%).

◆ EPWM_CHP_CLK_FREQ_DIV_BY_1

#define EPWM_CHP_CLK_FREQ_DIV_BY_1   (PWMSS_EPWM_PCCTL_CHPFREQ_DIV_1)

Divide by 1 (no prescale).

◆ EPWM_CHP_CLK_FREQ_DIV_BY_2

#define EPWM_CHP_CLK_FREQ_DIV_BY_2   (PWMSS_EPWM_PCCTL_CHPFREQ_DIV_2)

Divide by 2.

◆ EPWM_CHP_CLK_FREQ_DIV_BY_3

#define EPWM_CHP_CLK_FREQ_DIV_BY_3   (PWMSS_EPWM_PCCTL_CHPFREQ_DIV_3)

Divide by 3.

◆ EPWM_CHP_CLK_FREQ_DIV_BY_4

#define EPWM_CHP_CLK_FREQ_DIV_BY_4   (PWMSS_EPWM_PCCTL_CHPFREQ_DIV_4)

Divide by 4.

◆ EPWM_CHP_CLK_FREQ_DIV_BY_5

#define EPWM_CHP_CLK_FREQ_DIV_BY_5   (PWMSS_EPWM_PCCTL_CHPFREQ_DIV_5)

Divide by 5.

◆ EPWM_CHP_CLK_FREQ_DIV_BY_6

#define EPWM_CHP_CLK_FREQ_DIV_BY_6   (PWMSS_EPWM_PCCTL_CHPFREQ_DIV_6)

Divide by 6.

◆ EPWM_CHP_CLK_FREQ_DIV_BY_7

#define EPWM_CHP_CLK_FREQ_DIV_BY_7   (PWMSS_EPWM_PCCTL_CHPFREQ_DIV_7)

Divide by 7.

◆ EPWM_CHP_CLK_FREQ_DIV_BY_8

#define EPWM_CHP_CLK_FREQ_DIV_BY_8   (PWMSS_EPWM_PCCTL_CHPFREQ_DIV_8)

Divide by 8.

◆ EPWM_CHP_OSHT_WIDTH_MIN

#define EPWM_CHP_OSHT_WIDTH_MIN   (0U)

Minimum value of enumeration. Used for input validation.

◆ EPWM_CHP_OSHT_WIDTH_1XSYSOUT_BY_8

#define EPWM_CHP_OSHT_WIDTH_1XSYSOUT_BY_8   (CSL_EPWM_CHP_OSHT_WIDTH_MIN)

1 x SYSCLKOUT/8 wide.

◆ EPWM_CHP_OSHT_WIDTH_2XSYSOUT_BY_8

#define EPWM_CHP_OSHT_WIDTH_2XSYSOUT_BY_8   (1U)

2 x SYSCLKOUT/8 wide.

◆ EPWM_CHP_OSHT_WIDTH_3XSYSOUT_BY_8

#define EPWM_CHP_OSHT_WIDTH_3XSYSOUT_BY_8   (2U)

3 x SYSCLKOUT/8 wide.

◆ EPWM_CHP_OSHT_WIDTH_4XSYSOUT_BY_8

#define EPWM_CHP_OSHT_WIDTH_4XSYSOUT_BY_8   (3U)

4 x SYSCLKOUT/8 wide.

◆ EPWM_CHP_OSHT_WIDTH_5XSYSOUT_BY_8

#define EPWM_CHP_OSHT_WIDTH_5XSYSOUT_BY_8   (4U)

5 x SYSCLKOUT/8 wide.

◆ EPWM_CHP_OSHT_WIDTH_6XSYSOUT_BY_8

#define EPWM_CHP_OSHT_WIDTH_6XSYSOUT_BY_8   (5U)

6 x SYSCLKOUT/8 wide.

◆ EPWM_CHP_OSHT_WIDTH_7XSYSOUT_BY_8

#define EPWM_CHP_OSHT_WIDTH_7XSYSOUT_BY_8   (6U)

7 x SYSCLKOUT/8 wide.

◆ EPWM_CHP_OSHT_WIDTH_8XSYSOUT_BY_8

#define EPWM_CHP_OSHT_WIDTH_8XSYSOUT_BY_8   (7U)

8 x SYSCLKOUT/8 wide.

◆ EPWM_CHP_OSHT_WIDTH_9XSYSOUT_BY_8

#define EPWM_CHP_OSHT_WIDTH_9XSYSOUT_BY_8   (8U)

9 x SYSCLKOUT/8 wide.

◆ EPWM_CHP_OSHT_WIDTH_10XSYSOUT_BY_8

#define EPWM_CHP_OSHT_WIDTH_10XSYSOUT_BY_8   (9U)

10 x SYSCLKOUT/8 wide.

◆ EPWM_CHP_OSHT_WIDTH_11XSYSOUT_BY_8

#define EPWM_CHP_OSHT_WIDTH_11XSYSOUT_BY_8   (10U)

11 x SYSCLKOUT/8 wide.

◆ EPWM_CHP_OSHT_WIDTH_12XSYSOUT_BY_8

#define EPWM_CHP_OSHT_WIDTH_12XSYSOUT_BY_8   (11U)

12 x SYSCLKOUT/8 wide.

◆ EPWM_CHP_OSHT_WIDTH_13XSYSOUT_BY_8

#define EPWM_CHP_OSHT_WIDTH_13XSYSOUT_BY_8   (12U)

13 x SYSCLKOUT/8 wide.

◆ EPWM_CHP_OSHT_WIDTH_14XSYSOUT_BY_8

#define EPWM_CHP_OSHT_WIDTH_14XSYSOUT_BY_8   (13U)

14 x SYSCLKOUT/8 wide.

◆ EPWM_CHP_OSHT_WIDTH_15XSYSOUT_BY_8

#define EPWM_CHP_OSHT_WIDTH_15XSYSOUT_BY_8   (14U)

15 x SYSCLKOUT/8 wide.

◆ EPWM_CHP_OSHT_WIDTH_16XSYSOUT_BY_8

#define EPWM_CHP_OSHT_WIDTH_16XSYSOUT_BY_8   (15U)

16 x SYSCLKOUT/8 wide.

◆ EPWM_CHP_OSHT_WIDTH_MAX

#define EPWM_CHP_OSHT_WIDTH_MAX   (CSL_EPWM_CHP_OSHT_WIDTH_16XSYSOUT_BY_8)

Maximum value of enumeration. Used for input validation.

◆ EPWM_TZ_TRIP_ACTION_TRI_STATE

#define EPWM_TZ_TRIP_ACTION_TRI_STATE   (PWMSS_EPWM_TZCTL_TZA_HIGH_IMPEDANCE)

High impedance (EPWMxA = High-impedance state).

◆ EPWM_TZ_TRIP_ACTION_HIGH

#define EPWM_TZ_TRIP_ACTION_HIGH   (PWMSS_EPWM_TZCTL_TZA_HIGH_STATE)

Force EPWMxA to a high state.

◆ EPWM_TZ_TRIP_ACTION_LOW

#define EPWM_TZ_TRIP_ACTION_LOW   (PWMSS_EPWM_TZCTL_TZA_LOW_STATE)

Force EPWMxA to a low state.

◆ EPWM_TZ_TRIP_ACTION_DO_NOTHING

#define EPWM_TZ_TRIP_ACTION_DO_NOTHING   (PWMSS_EPWM_TZCTL_TZA_DO_NOTHING)

Do nothing, no action is taken on EPWMxA.

◆ EPWM_TZ_EVENT_MIN

#define EPWM_TZ_EVENT_MIN   (0x0U)

Minimum value of enumeration. Used for input validation.

◆ EPWM_TZ_EVENT_ONE_SHOT

#define EPWM_TZ_EVENT_ONE_SHOT   (EPWM_TZ_EVENT_MIN)

One shot trip zone event.

◆ EPWM_TZ_EVENT_CYCLE_BY_CYCLE

#define EPWM_TZ_EVENT_CYCLE_BY_CYCLE   (0x1U)

Cycle by cycle trip zone event.

◆ EPWM_TZ_EVENT_MAX

#define EPWM_TZ_EVENT_MAX   (CSL_EPWM_TZ_EVENT_CYCLE_BY_CYCLE)

Maximum value of enumeration. Used for input validation.

◆ EPWM_TZ_STS_FLG_OST

#define EPWM_TZ_STS_FLG_OST   (PWMSS_EPWM_TZFLG_OST_MASK)

Latched Status Flag for A One-Shot Trip Event.

◆ EPWM_TZ_STS_FLG_CBC

#define EPWM_TZ_STS_FLG_CBC   (PWMSS_EPWM_TZFLG_CBC_MASK)

Latched Status Flag for Cycle-By-Cycle Trip Event.

◆ EPWM_TZ_STS_FLG_INT

#define EPWM_TZ_STS_FLG_INT   (PWMSS_EPWM_TZFLG_INT_MASK)

Latched status for Trip Interrupt .

◆ EPWM_ET_INTR_EVT_CNT_EQ_ZRO

#define EPWM_ET_INTR_EVT_CNT_EQ_ZRO   (PWMSS_EPWM_ETSEL_INTSEL_CTR_0)

Enable event time-base counter equal to zero. (TBCNT = 0000h).

◆ EPWM_ET_INTR_EVT_CNT_EQ_PRD

#define EPWM_ET_INTR_EVT_CNT_EQ_PRD   (PWMSS_EPWM_ETSEL_INTSEL_CTR_PERIOD)

Enable event time-base counter equal to period (TBCNT = TBPRD).

◆ EPWM_ET_INTR_EVT_CNT_EQ_CMPA_INC

#define EPWM_ET_INTR_EVT_CNT_EQ_CMPA_INC   (PWMSS_EPWM_ETSEL_INTSEL_CTR_CMPA_INCR)

Enable event time-base counter equal to CMPA when the timer is incrementing.

◆ EPWM_ET_INTR_EVT_CNT_EQ_CMPA_DEC

#define EPWM_ET_INTR_EVT_CNT_EQ_CMPA_DEC   (PWMSS_EPWM_ETSEL_INTSEL_CTR_CMPA_DECR)

Enable event time-base counter equal to CMPA when the timer is decrementing.

◆ EPWM_ET_INTR_EVT_CNT_EQ_CMPB_INC

#define EPWM_ET_INTR_EVT_CNT_EQ_CMPB_INC   (PWMSS_EPWM_ETSEL_INTSEL_CTR_CMPB_INCR)

Enable event: time-base counter equal to CMPB when the timer is incrementing.

◆ EPWM_ET_INTR_EVT_CNT_EQ_CMPB_DEC

#define EPWM_ET_INTR_EVT_CNT_EQ_CMPB_DEC   (PWMSS_EPWM_ETSEL_INTSEL_CTR_CMPB_DECR)

Enable event: time-base counter equal to CMPB when the timer is decrementing.

◆ EPWM_ET_INTR_PERIOD_DIS_INTR

#define EPWM_ET_INTR_PERIOD_DIS_INTR   (PWMSS_EPWM_ETPS_INTPRD_DISABLE)

Disable the interrupt event counter. No interrupt will be generated.

◆ EPWM_ET_INTR_PERIOD_FIRST_EVT

#define EPWM_ET_INTR_PERIOD_FIRST_EVT   (PWMSS_EPWM_ETPS_INTPRD_GEN_FIRST_EVT)

Generate an interrupt on the first event.

◆ EPWM_ET_INTR_PERIOD_SECOND_EVT

#define EPWM_ET_INTR_PERIOD_SECOND_EVT   (PWMSS_EPWM_ETPS_INTPRD_GEN_SECOND_EVT)

Generate an interrupt on the second event.

◆ EPWM_ET_INTR_PERIOD_THIRD_EVT

#define EPWM_ET_INTR_PERIOD_THIRD_EVT   (PWMSS_EPWM_ETPS_INTPRD_GEN_THIRD_EVT)

Generate an interrupt on the third event.

◆ EPWM_ETFLG_INT_MASK

#define EPWM_ETFLG_INT_MASK   (PWMSS_EPWM_ETFLG_INT_MASK)

Mask used to check interrupt status.

Typedef Documentation

◆ EPWM_OutputCh_t

typedef uint32_t EPWM_OutputCh_t

Number of supported EPWM outputs in a single epwm channel.

◆ EPWM_TbCounterDir_t

typedef uint32_t EPWM_TbCounterDir_t

Types of Time base counter direction modes.

◆ EPWM_ShadowRegCtrl_t

typedef uint32_t EPWM_ShadowRegCtrl_t

Shadow register enable or disable control.

Same macros will be used to control the following shadow registers

  • Time Base period register
  • Counter Comparator A register
  • Counter Comparator B register
Note
Same macros are used for controlling all the three registers because the field values are same for all these cases.
  • Shadow enable = 0x0
  • Shadow disable = 0x1 In any case if these values changes across the above mentioned registers then separate macros need to be used.
  • Shadow enable macros with value 0x0
    • PWMSS_EPWM_TBCTL_PRDLD_LOAD_FROM_SHADOW,
    • PWMSS_EPWM_CMPCTL_SHDWAMODE_SHADOW,
    • PWMSS_EPWM_CMPCTL_SHDWBMODE_SHADOW
  • Shadow disable macros with value 0x1
    • PWMSS_EPWM_TBCTL_PRDLD_LOAD_IMMEDIATELY
    • PWMSS_EPWM_CMPCTL_SHDWAMODE_IMMEDIATE
    • PWMSS_EPWM_CMPCTL_SHDWBMODE_IMMEDIATE

◆ EPWM_TbCntDirAftSync_t

typedef uint32_t EPWM_TbCntDirAftSync_t

Counter directions after sync event.

◆ EPWM_TbSyncOutEvt_t

typedef uint32_t EPWM_TbSyncOutEvt_t

Source of Synchronization output signal.

◆ EPWM_TbSts_t

typedef uint32_t EPWM_TbSts_t

Flags to get the different types of time base status.

◆ EPWM_TbEmuMode_t

typedef uint32_t EPWM_TbEmuMode_t

Emulation Mode. This selects the behaviour of the ePWM time-base counter during emulation events.

◆ EPWM_CcCmp_t

typedef uint32_t EPWM_CcCmp_t

\ Counter Comparator type either A or B.

◆ EPWM_CcCmpLoadMode_t

typedef uint32_t EPWM_CcCmpLoadMode_t

Counter-Comparator registers(A and B) load mode flags from shadow register.

Same macros will be used to control the following registers

  • Counter Comparator A register
  • Counter Comparator B register
Note
Same macros are used for controlling all the three registers because the field values are same for all these cases.
  • load when counter equals zero = 0x0
  • load when counter equals period = 0x1
  • load when counter equals zero or period = 0x2
  • Do not load = 0x3 In any case if these values changes across the above mentioned registers, then separate macros need to be used.
  • Load when counter equals zero macros with value 0x0
    • PWMSS_EPWM_CMPCTL_LOADAMODE_CTR_0,
    • PWMSS_EPWM_CMPCTL_LOADBMODE_CTR_0,
  • Load when counter equals period macros with value 0x1
    • PWMSS_EPWM_CMPCTL_LOADAMODE_CTR_PRD
    • PWMSS_EPWM_CMPCTL_LOADBMODE_CTR_PRD
  • Load when counter equals zero or period macros with value 0x2
    • PWMSS_EPWM_CMPCTL_LOADAMODE_CTR_0_OR_PRD
    • PWMSS_EPWM_CMPCTL_LOADBMODE_CTR_0_OR_PRD
  • Do not load macros with value 0x3
    • PWMSS_EPWM_CMPCTL_LOADAMODE_FREEZE
    • PWMSS_EPWM_CMPCTL_LOADBMODE_FREEZE

◆ EPWM_AqAction_t

typedef uint32_t EPWM_AqAction_t

Types of Actions that Action Qualifier can take on the Output when the supported counter compare event occurs.

Same actions will be applicable for all the supported events and same actions are applicable for both A and B channel PWM outputs.

Note
Same macros are used for all the events and for both A and B because their field values are same.
  • Action Do nothing macros with value 0x0
    • PWMSS_EPWM_AQCTLx_ZRO_DISABLED
    • PWMSS_EPWM_AQCTLx_PRD_DISABLED
    • PWMSS_EPWM_AQCTLx_CAU_DISABLED
    • PWMSS_EPWM_AQCTLx_CAD_DISABLED
    • PWMSS_EPWM_AQCTLx_CBU_DISABLED
    • PWMSS_EPWM_AQCTLx_CBD_DISABLED
  • Action high macros with value 0x1
    • PWMSS_EPWM_AQCTLx_ZRO_CLEAR
    • PWMSS_EPWM_AQCTLx_PRD_CLEAR
    • PWMSS_EPWM_AQCTLx_CAU_CLEAR
    • PWMSS_EPWM_AQCTLx_CAD_CLEAR
    • PWMSS_EPWM_AQCTLx_CBU_CLEAR
    • PWMSS_EPWM_AQCTLx_CBD_CLEAR
  • Action low macros with value 0x2
    • PWMSS_EPWM_AQCTLx_ZRO_SET
    • PWMSS_EPWM_AQCTLx_PRD_SET
    • PWMSS_EPWM_AQCTLx_CAU_SET
    • PWMSS_EPWM_AQCTLx_CAD_SET
    • PWMSS_EPWM_AQCTLx_CBU_SET
    • PWMSS_EPWM_AQCTLx_CBD_SET
  • Action toggle macros with value 0x3
    • PWMSS_EPWM_AQCTLx_ZRO_TOGGLE
    • PWMSS_EPWM_AQCTLx_PRD_TOGGLE
    • PWMSS_EPWM_AQCTLx_CAU_TOGGLE
    • PWMSS_EPWM_AQCTLx_CAD_TOGGLE
    • PWMSS_EPWM_AQCTLx_CBU_TOGGLE
    • PWMSS_EPWM_AQCTLx_CBD_TOGGLE

◆ EPWM_AqSwTrigOtAction_t

typedef uint32_t EPWM_AqSwTrigOtAction_t

Actions to be taken on the output, when Software triggered one time events will occur.

Same macros will be used for both A and B channel outputs because the bit field values are same.

Note
The following are the similar macros,
  • Do nothing macros with value 0x0
    • PWMSS_EPWM_AQSFRC_ACTSFA_DISABLED
    • PWMSS_EPWM_AQSFRC_ACTSFB_DISABLED
  • Action low macros with value 0x1
    • PWMSS_EPWM_AQSFRC_ACTSFA_CLEAR
    • PWMSS_EPWM_AQSFRC_ACTSFB_CLEAR
  • Action high macros with value 0x2
    • PWMSS_EPWM_AQSFRC_ACTSFA_SET
    • PWMSS_EPWM_AQSFRC_ACTSFB_SET
  • Action toggle macros with value 0x3
    • PWMSS_EPWM_AQSFRC_ACTSFA_TOGGLE
    • PWMSS_EPWM_AQSFRC_ACTSFB_TOGGLE

◆ EPWM_AqSwTrigContAction_t

typedef uint32_t EPWM_AqSwTrigContAction_t

Types of Continuous software forced actions on output.

Same macros will be used for configuration of both A and B PWM outputs, because bit field values for both A and B are same.

Note
The following are the similar macros,
  • Do nothing macros with value 0x0
    • PWMSS_EPWM_AQCSFRC_CSFA_DISABLED
    • PWMSS_EPWM_AQCSFRC_CSFB_DISABLED
  • Action low macros with value 0x1
    • PWMSS_EPWM_AQCSFRC_CSFA_LOW_OUTPUT
    • PWMSS_EPWM_AQCSFRC_CSFB_LOW_OUTPUT
  • Action high macros with value 0x2
    • PWMSS_EPWM_AQCSFRC_CSFA_HIGH_OUTPUT
    • PWMSS_EPWM_AQCSFRC_CSFB_HIGH_OUTPUT
  • Action toggle macros with value 0x3
    • PWMSS_EPWM_AQCSFRC_CSFA_NO_EFFECT
    • PWMSS_EPWM_AQCSFRC_CSFB_NO_EFFECT

◆ EPWM_AqCsfrcRegReload_t

typedef uint32_t EPWM_AqCsfrcRegReload_t

Action Qualifier Software Force Active Register Reload From Shadow Options.

◆ EPWM_DbInMode_t

typedef uint32_t EPWM_DbInMode_t

Dead Band Input Mode Control. This allows you to select the input source to the falling-edge and rising-edge delay.

◆ EPWM_DbPolSel_t

typedef uint32_t EPWM_DbPolSel_t

Polarity Select Control. This allows you to selectively invert one of the delayed signals before it is sent out of the dead-band sub-module.

◆ EPWM_DbOutMode_t

typedef uint32_t EPWM_DbOutMode_t

Dead-band Output Mode Control. This allows you to selectively enable or bypass the dead-band generation for the falling-edge and rising-edge delay.

◆ EPWM_ChpDutyCycle_t

typedef uint32_t EPWM_ChpDutyCycle_t

Chopping Clock Duty Cycle values.

◆ EPWM_ChpClkFreq_t

typedef uint32_t EPWM_ChpClkFreq_t

Chopping Clock Frequency values .

◆ EPWM_ChpOshtWidth_t

typedef uint32_t EPWM_ChpOshtWidth_t

One-Shot Pulse Width values.

◆ EPWM_TzTripAction_t

typedef uint32_t EPWM_TzTripAction_t

Action to be taken on PWM output When a trip event occurs.

Same macros will be used to control both A and B outputs because the bit field values are same for A and B channels.

Note
The following are the similar macros
  • Tri state action macro with value 0x0
    • PWMSS_EPWM_TZCTL_TZA_HIGH_IMPEDANCE
    • PWMSS_EPWM_TZCTL_TZB_HIGH_IMPEDANCE
  • High action macro with value 0x1
    • PWMSS_EPWM_TZCTL_TZA_HIGH_STATE
    • PWMSS_EPWM_TZCTL_TZA_HIGH_STATE
  • Low action macro with value 0x2
    • PWMSS_EPWM_TZCTL_TZA_LOW_STATE
    • PWMSS_EPWM_TZCTL_TZB_LOW_STATE
  • Do nothing action macro with value 0x3
    • PWMSS_EPWM_TZCTL_TZA_DO_NOTHING
    • PWMSS_EPWM_TZCTL_TZB_DO_NOTHING

◆ EPWM_TzEvent_t

typedef uint32_t EPWM_TzEvent_t

Type of trip zone events.

◆ EPWM_TzStsFlg_t

typedef uint32_t EPWM_TzStsFlg_t

Trip zone status flags.

◆ EPWM_EtIntrEvt_t

typedef uint32_t EPWM_EtIntrEvt_t

ePWM Interrupt (EPWMx_INT) Selection Options.

◆ EPWM_EtIntrPeriod_t

typedef uint32_t EPWM_EtIntrPeriod_t

ePWM Interrupt (EPWMx_INT) Period Select. These values determine how many selected events need to occur before an interrupt is generated.

Function Documentation

◆ EPWM_tbTimebaseClkCfg()

void EPWM_tbTimebaseClkCfg ( uint32_t  baseAddr,
uint32_t  tbClk,
uint32_t  moduleClk 
)

This API configures the clock divider of the Time base module.

The clock divider can be calculated using the equation TBCLK = SYSCLKOUT/(HSPCLKDIV × CLKDIV)

Parameters
baseAddrBase Address of PWMSS instance used.
tbClkTimebase clock to be generated in Hz.
moduleClkInput clock of the PWM module (sysclk2) in Hz.

◆ EPWM_tbPwmFreqCfg()

void EPWM_tbPwmFreqCfg ( uint32_t  baseAddr,
uint32_t  tbClk,
uint32_t  pwmFreq,
uint32_t  counterDir,
uint32_t  enableShadowWrite 
)

This API configures the PWM Time base counter Frequency/Period.

The period count determines the period of the final output waveform.

Parameters
baseAddrBase Address of PWMSS instance used.
tbClkTimebase clock in Hz.
pwmFreqFrequency of the PWM Output in Hz.
counterDirDirection of the counter(up, down, up-down). 'counterDir' can take values from the following enum
enableShadowWriteFlag controlling Whether write to Period register is to be shadowed or not. 'enableShadowWrite' can take values from the following enum
Note
If the counter direction is configured as EPWM_TB_COUNTER_DIR_UP_DOWN, then output frequency will be half the value of required pwm frequency.

◆ EPWM_tbSyncEnable()

void EPWM_tbSyncEnable ( uint32_t  baseAddr,
uint32_t  tbPhsValue,
uint32_t  counterDir 
)

This API enables the synchronization of time base sub-module and also configures the phase count value to be loaded after sync event, counter direction after sync event.

When a sync-in event is generated the the time base counter is reloaded with the new value. After sync the counter will use the new value and direction as specified after sync event.

Parameters
baseAddrBase Address of PWMSS instance used.
tbPhsValuePhase value to be reloaded after sync
counterDirCount direction after sync. 'counterDir' can take values from the following enum

◆ EPWM_tbSyncDisable()

void EPWM_tbSyncDisable ( uint32_t  baseAddr)

This API disables the synchronization. Even if sync-in event occurs the count value will not be reloaded.

Parameters
baseAddrBase Address of PWMSS instance used.

◆ EPWM_tbSetSyncOutMode()

void EPWM_tbSetSyncOutMode ( uint32_t  baseAddr,
uint32_t  syncOutMode 
)

This API selects the source of the synchronization output signal. It determines on which of the supported events sync-out has to be generated.

Parameters
baseAddrBase Address of PWMSS instance used.
syncOutModeSync out mode. 'syncOutMode' can take values from the following enum

◆ EPWM_tbTriggerSwSync()

void EPWM_tbTriggerSwSync ( uint32_t  baseAddr)

This API generates software triggered sync pulse.

Parameters
baseAddrBase Address of PWMSS instance used.
Note
This API can be used for testing. When this API is called sync-in event will be generated.

◆ EPWM_tbWriteTbCount()

void EPWM_tbWriteTbCount ( uint32_t  baseAddr,
uint32_t  tbCount 
)

This API loads the Time base counter. The new value is taken immediately.

Parameters
baseAddrBase Address of PWMSS instance used.
tbCountTime base count value to be loaded.

◆ EPWM_tbReadTbCount()

uint16_t EPWM_tbReadTbCount ( uint32_t  baseAddr)

This API gets the Time base counter current value. The count operation is not affected by the read.

Parameters
baseAddrBase Address of PWMSS instance used.
Return values
tbCountCurrent Timebase count value.

◆ EPWM_tbGetStatus()

uint16_t EPWM_tbGetStatus ( uint32_t  baseAddr,
uint32_t  tbStatusMask 
)

This API gets the Time Base status as indicated by the tbStatusMask parameter.

Parameters
baseAddrBase Address of PWMSS instance used.
tbStatusMaskFlag indicating the type of status needed. 'tbStatusMask' can take values from the following enum
Return values
tbStatusRequested status is returned.
Note
The returned status will depend on the status mask passed.
  • For EPWM_TB_STS_CTR_MAX
    1. Zero indicates the time-base counter never reached its max value.
    2. NonZero indicates that the time-base counter reached max value 0xFFFF
  • For EPWM_TB_STS_SYNCI
    1. Zero indicates that no external synchronization event has occurred.
    2. NonZero indicates that an external synchronization event has occurred.
  • For EPWM_TB_STS_CTR_DIR
    1. Zero indicates that Time-Base Counter is currently counting down.
    2. NonZero indicates that Time-Base Counter is currently counting up.

◆ EPWM_tbStatusClear()

void EPWM_tbStatusClear ( uint32_t  baseAddr,
uint32_t  tbStatusClrMask 
)

This API clears the Time base status bits indicated by the tbStatusClrMask parameter.

Parameters
baseAddrBase Address of PWMSS instance used.
tbStatusClrMaskMask indicating which status bit need to be cleared 'tbStatusClrMask' can take following values

◆ EPWM_tbSetEmulationMode()

void EPWM_tbSetEmulationMode ( uint32_t  baseAddr,
uint32_t  mode 
)

This API configures emulation mode. This setting determines the behaviour of Timebase counter during emulation (debugging).

Parameters
baseAddrBase Address of PWMSS instance used.
modeEmulation mode. 'mode' can take values from the following enum

◆ EPWM_counterComparatorCfg()

uint32_t EPWM_counterComparatorCfg ( uint32_t  baseAddr,
uint32_t  cmpType,
uint32_t  cmpVal,
uint32_t  enableShadowWrite,
uint32_t  shadowToActiveLoadTrigger,
uint32_t  overwriteShadow 
)

This API configures the counter comparator and loads the comparator value. When Counter comparator value equals the counter value, then an event is generated both in the up direction and down direction.

Parameters
baseAddrBase Address of PWMSS instance used.
cmpTypeComparator Type A or B. 'cmpType' can take values from the following enum
cmpValComparator value that needs to be loaded.
enableShadowWriteEnable write to shadow register. 'enableShadowWrite' can take values from the following enum
shadowToActiveLoadTriggerShadow to active register load mode. 'shadowToActiveLoadTrigger' can take values from the following enum
overwriteShadowOverwrite even if previous value is not loaded to active register. 'overwriteShadow' can take following values
  • TRUE
  • FALSE
Return values
TRUEComparator value is written successfully.
FALSEComparator value write is failed.

◆ EPWM_aqActionOnOutputCfg()

void EPWM_aqActionOnOutputCfg ( uint32_t  baseAddr,
uint32_t  pwmOutputCh,
const EPWM_AqActionCfg pCfg 
)

This API configures the action to be taken on output by the Action qualifier module upon receiving the events. This will determine the output waveform.

Parameters
baseAddrBase Address of PWMSS instance used.
pwmOutputChPWM Output channel type either A or B 'pwmOutputCh' can take values from the following enum
pCfgPointer to the following structure which contains the action configuration variables for different events
Note
Each event can be configured to one of the following enum values.

◆ EPWM_aqSwTriggerOneTimeAction()

void EPWM_aqSwTriggerOneTimeAction ( uint32_t  baseAddr,
uint32_t  pwmOutputCh,
uint32_t  swTrigAction 
)

This API triggers the SW forced single event on the PWM output.

This can be used for testing the AQ sub-module. Every call to this API will trigger a single event.

Parameters
baseAddrBase Address of PWMSS instance used.
pwmOutputChPWM Output channel type either A or B 'pwmOutputCh' can take values from the following enum
swTrigActionAction that needs to be taken on the PWM output. 'swTrigAction' can take one of the following enum values

◆ EPWM_aqSwTriggerContAction()

void EPWM_aqSwTriggerContAction ( uint32_t  baseAddr,
uint32_t  pwmOutputCh,
uint32_t  swTrigAction,
uint32_t  activeRegReloadMode 
)

This API forces output value continuously on PWM output channel. The output can be forced to low or high.

Parameters
baseAddrBase Address of PWMSS instance used.
pwmOutputChPWM Output channel type either A or B 'pwmOutputCh' can take values from the following enum
swTrigActionValue to be forced on the output This parameter can take values from the following enum
activeRegReloadModeShadow to active reg load trigger. This parameter can take values from the following enum

◆ EPWM_deadbandCfg()

void EPWM_deadbandCfg ( uint32_t  baseAddr,
const EPWM_DeadbandCfg pCfg 
)

This API performs the configuration of the dead band sub-module. This API configures the input source, output mode, polarity, rising and falling edge delays.

The Dead band generator has two sub-modules, one for raising edge delay and the other for falling edge delay. This can be configured when a delay is need between two signals during signal change. The dead band generator is useful in full-inverters.

Parameters
baseAddrBase Address of PWMSS instance used.
pCfgPointer to the structure EPWM_DeadbandCfg containing the dead band configuration parameters.

◆ EPWM_deadbandBypass()

void EPWM_deadbandBypass ( uint32_t  baseAddr)

This API bypasses the Dead-band sub-module.

Parameters
baseAddrBase Address of PWMSS instance used.

◆ EPWM_chopperCfg()

void EPWM_chopperCfg ( uint32_t  baseAddr,
const EPWM_ChopperCfg pCfg 
)

This API performs the configuration of the chopper sub-module. This API configures chopping clock duty cycle, chopping clock frequency and pulse width of first pulse of chopping clock.

Parameters
baseAddrBase Address of PWMSS instance used.
pCfgPointer to the structure EPWM_ChopperCfg containing the chopper configuration parameters.

◆ EPWM_chopperEnable()

void EPWM_chopperEnable ( uint32_t  baseAddr,
uint32_t  enableChopper 
)

This API controls the enabling or disabling of chopper sub-module.

Parameters
baseAddrBase Address of PWMSS instance used.
enableChopperFlag controlling the enabling or disabling 'enableChopper' can take one of the following values
  • TRUE - Enable chopper
  • FALSE - Disable chopper

◆ EPWM_tzTriggerTripAction()

void EPWM_tzTriggerTripAction ( uint32_t  baseAddr,
uint32_t  tripAction,
uint32_t  pwmOutputCh 
)

This API configures the o/p on PWM channel when a trip event is recognized. The output can be set to high or low or high impedance.

Parameters
baseAddrBase Address of PWMSS instance used.
tripActionAction to be taken on the PWM output. This parameter can take values from the following enum
pwmOutputChPWM Output channel type either A or B 'pwmOutputCh' can take values from the following enum

◆ EPWM_tzTripEventEnable()

void EPWM_tzTripEventEnable ( uint32_t  baseAddr,
uint32_t  tzEventType,
uint32_t  pinNum 
)

This API enables the trip event.

The trip signals indicates external fault, and the ePWM outputs can be programmed to respond accordingly when faults occur.

Parameters
baseAddrBase Address of PWMSS instance used.
tzEventTypeEnable OST or CBC trip zone event This parameter can take values from the following enum
pinNumPin number on which trip zone event has to be enabled.

◆ EPWM_tzTripEventDisable()

void EPWM_tzTripEventDisable ( uint32_t  baseAddr,
uint32_t  tzEventType,
uint32_t  pinNum 
)

This API disable the trip event. The disabled trip events will be ignored.

Parameters
baseAddrBase Address of PWMSS instance used.
tzEventTypeDisable OST or CBC trip zone event This parameter can take values from the following enum
pinNumPin number on which trip zone event has to be disabled.

◆ EPWM_tzIntrEnable()

void EPWM_tzIntrEnable ( uint32_t  baseAddr,
uint32_t  tzEventType 
)

This API enables the trip interrupt. When trip event occurs the sub-module can be configured to interrupt CPU.

Parameters
baseAddrBase Address of PWMSS instance used.
tzEventTypeTrip zone event for which interrupt has to be enabled. This parameter can take values form the following enum

◆ EPWM_tzIntrDisable()

void EPWM_tzIntrDisable ( uint32_t  baseAddr,
uint32_t  tzEventType 
)

This API disables the trip interrupt.

Parameters
baseAddrBase Address of PWMSS instance used.
tzEventTypeTrip zone event for which interrupt has to be enabled. This parameter can take values form the following enum

◆ EPWM_tzEventStatus()

uint16_t EPWM_tzEventStatus ( uint32_t  baseAddr,
uint32_t  eventMask 
)

This API returns the selected trip zone event status.

Parameters
baseAddrBase Address of PWMSS instance used.
eventMaskType of status which has to be read. This parameter can take values from the following enum
Return values
StatusStatus of the required status flag.
Note
The return status depends on the type of status flag passed.
  1. For EPWM_TZ_STS_FLG_OST
    1. Zero - No one-shot trip event has occurred.
    2. NonZero - Indicates a trip event has occurred on a pin selected as a one-shot trip source.
  2. For EPWM_TZ_STS_FLG_CBC
    1. Zero - No cycle-by-cycle trip event has occurred.
    2. NonZero - Indicates a trip event has occurred on a pin selected as a cycle-by-cycle trip source.
  3. For EPWM_TZ_STS_FLG_INT
    1. Zero - Indicates no interrupt has been generated.
    2. NonZero - Indicates an EPWMxTZINT interrupt was generated because of a trip condition.

◆ EPWM_tzEventStatusClear()

void EPWM_tzEventStatusClear ( uint32_t  baseAddr,
uint32_t  eventMask 
)

This API clears the selected trip zone event status.

Parameters
baseAddrBase Address of PWMSS instance used.
eventMaskType of status which has to be read. This parameter can take values from the following enum

◆ EPWM_tzTriggerSwEvent()

void EPWM_tzTriggerSwEvent ( uint32_t  baseAddr,
uint32_t  tzEventType 
)

This API enables to generate Software forced trip condition.

Parameters
baseAddrBase Address of PWMSS instance used.
tzEventTypeType of trip condition which has to be generated. This parameter can take values from the following enum

◆ EPWM_etIntrCfg()

void EPWM_etIntrCfg ( uint32_t  baseAddr,
uint32_t  intrEvtSrc,
uint32_t  intrPrd 
)

This API configures the Event Trigger sub-module. This API configures the interrupt source and interrupt period.

Parameters
baseAddrBase Address of PWMSS instance used.
intrEvtSrcEvent source which triggers interrupt. This parameter can take values from the following enum
intrPrdprescalar value(This determines how may selected events need to occur before an interrupt is generated). This parameter can take values from the following enum

◆ EPWM_etIntrEnable()

void EPWM_etIntrEnable ( uint32_t  baseAddr)

This API enables the ePWM Event interrupt.

Parameters
baseAddrBase Address of PWMSS instance used.

◆ EPWM_etIntrDisable()

void EPWM_etIntrDisable ( uint32_t  baseAddr)

This API disables the ePWM Event interrupt.

Parameters
baseAddrBase Address of PWMSS instance used.

◆ EPWM_etIntrStatus()

uint16_t EPWM_etIntrStatus ( uint32_t  baseAddr)

This API returns the ePWM event interrupt status.

Parameters
baseAddrBase Address of PWMSS instance used.
Return values
0Interrupt is not generated.
1Interrupt is generated.

◆ EPWM_etIntrClear()

void EPWM_etIntrClear ( uint32_t  baseAddr)

This API clears the interrupt. This will clear the interrupt flag bit and enable further interrupts pulses to be generated.

Parameters
baseAddrBase Address of PWMSS instance used.

◆ EPWM_etIntrTrigger()

void EPWM_etIntrTrigger ( uint32_t  baseAddr)

This API forces interrupt to be generated. This API is used for testing purpose.

Parameters
baseAddrBase Address of PWMSS instance used.

◆ EPWM_etGetEventCount()

uint16_t EPWM_etGetEventCount ( uint32_t  baseAddr)

This API returns the number of events occurred.

Parameters
baseAddrBase Address of PWMSS instance used.
Return values
eventCountnumber of events occurred. This will have values in the range 0 to 3.