AM64x MCU+ SDK  10.00.00
epwm/v0/epwm.h File Reference

Introduction

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.

Programming sequence of EPWM is as follows:

  1. Enable Clocks for PWMSS
  2. Configure the pinmux functionality
  3. Enable the clocks for EPWM through the API EPWM_ClockEnable.
  4. Enable the Time base clock through the API PWMSSTimebaseClkEnable.
  5. The sub-modules of EPWM have to be configured as below:
    1. Timebase
      1. Configure the time base clock through the API EPWM_tbTimebaseClkCfg
      2. Configure the output PWM frequency through the API EPWM_tbPwmFreqCfg
      3. If synchronization is enable, then configure the synchronization through the API EPWM_tbSyncEnable else disable synchronization through the API EPWM_tbSyncDisable
      4. Set the sync out mode through the API EPWM_tbSetSyncOutMode
      5. Set the emulation mode through the API EPWM_tbSetEmulationMode
    2. Counter comparator
      1. Configure the counter comparator through the API EPWM_counterComparatorCfg
    3. DeadBand
      1. If deadband is enabled, then configure deadband through the API EPWM_deadbandCfg else bypass the deadband through the API EPWM_deadbandBypass
    4. Chopper
      1. If chopper is enabled
        1. Configure chopper through the API EPWM_chopperCfg
        2. Enable the chopper through the API EPWM_chopperEnable by passing TRUE as parameter
      2. If chopper is disabled
        1. Disable chopper through the API EPWM_chopperEnable by passing FALSE as parameter
    5. TripZone
      1. The Trip Zone registser are EALLOW protected. use SOC_allowEpwmTzReg for enabling/ disabling writes to this space.
      2. If tripzone is enabled
        1. Configure trip action through API EPWM_tzTriggerTripAction
        2. Enable trip zone event through the API EPWM_tzTripEventEnable
      3. If tripzone is disabled
        1. Disable both the trip zone events through the API EPWM_tzTripEventDisable
    6. Event Trigger
      1. Enable event trigger through the API EPWM_etIntrCfg
      2. Disable event trigger through the API EPWM_etIntrDisable

Go to the source code of this file.

EPWM Output Channel

#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)
 
typedef uint32_t EPWM_OutputCh_t
 Number of supported EPWM outputs in a single epwm channel. More...
 

EPWM Tb Counter Direction

#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)
 
typedef uint32_t EPWM_TbCounterDir_t
 Types of Time base counter direction modes. More...
 

EPWM Shadow register Control

#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)
 
typedef uint32_t EPWM_ShadowRegCtrl_t
 Shadow register enable or disable control. More...
 

EPWM Counter directions after sync event

#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)
 
typedef uint32_t EPWM_TbCntDirAftSync_t
 Counter directions after sync event. More...
 

EPWM Source of Synchronization output signal

#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)
 
typedef uint32_t EPWM_TbSyncOutEvt_t
 Source of Synchronization output signal. More...
 

EPWM Flags to get the different types of time base status

#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)
 
typedef uint32_t EPWM_TbSts_t
 Flags to get the different types of time base status. More...
 

EPWM Emulation Mode

#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)
 
typedef uint32_t EPWM_TbEmuMode_t
 Emulation Mode. This selects the behaviour of the ePWM time-base counter during emulation events. More...
 

EPWM Comparator type

#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)
 
typedef uint32_t EPWM_CcCmp_t
 

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

#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)
 
typedef uint32_t EPWM_CcCmpLoadMode_t
 Counter-Comparator registers(A and B) load mode flags from shadow register. More...
 

EPWM Actions

#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)
 
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...
 

EPWM output actions

#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)
 
typedef uint32_t EPWM_AqSwTrigOtAction_t
 Actions to be taken on the output, when Software triggered one time events will occur. More...
 

EPWM Continuous software forced actions

#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)
 
typedef uint32_t EPWM_AqSwTrigContAction_t
 Types of Continuous software forced actions on output. More...
 

EPWM Software Force Active Register Reload

#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)
 
typedef uint32_t EPWM_AqCsfrcRegReload_t
 Action Qualifier Software Force Active Register Reload From Shadow Options. More...
 

EPWM Dead Band Input Mode Control

#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)
 
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...
 

EPWM Polarity Select Control

#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)
 
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...
 

EPWM Dead-band Output Mode Control

#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)
 
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...
 

EPWM Chopping Clock Duty Cycle

#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)
 
typedef uint32_t EPWM_ChpDutyCycle_t
 Chopping Clock Duty Cycle values. More...
 

EPWM Chopping Clock Frequency

#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)
 
typedef uint32_t EPWM_ChpClkFreq_t
 Chopping Clock Frequency values . More...
 

EPWM One-Shot Pulse Width

#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)
 
typedef uint32_t EPWM_ChpOshtWidth_t
 One-Shot Pulse Width values. More...
 

EPWM output action when a trip event occurs

#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)
 
typedef uint32_t EPWM_TzTripAction_t
 Action to be taken on PWM output When a trip event occurs. More...
 

EPWM trip zone events

#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)
 
typedef uint32_t EPWM_TzEvent_t
 Type of trip zone events. More...
 

EPWM Trip zone status flags

#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)
 
typedef uint32_t EPWM_TzStsFlg_t
 Trip zone status flags. More...
 

EPWM Interrupt (EPWMx_INT) Selection Options

#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)
 
typedef uint32_t EPWM_EtIntrEvt_t
 ePWM Interrupt (EPWMx_INT) Selection Options. More...
 

EPWM Interrupt (EPWMx_INT) Period Select

#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)
 
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...
 

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...
 

Macros

#define EPWM_ETFLG_INT_MASK   (PWMSS_EPWM_ETFLG_INT_MASK)
 Mask used to check interrupt status. 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...