Driverlib MCPWM API
Module: Driverlib (AM13E232X) APIs
Structures
Name |
|
|---|---|
struct |
DL_MCPWM_TimeBaseConfig |
struct |
DL_MCPWM_CounterCompareConfig |
struct |
DL_MCPWM_Actions |
struct |
DL_MCPWM_ActionQualifierConfig |
struct |
DL_MCPWM_DeadBandConfig |
struct |
DL_MCPWM_TripZoneConfig |
struct |
DL_MCPWM_SOCGenConfig |
struct |
DL_MCPWM_EventTriggerSOCPulseGeneratorConfig |
struct |
DL_MCPWM_ETGenConfig |
struct |
DL_MCPWM_EventTriggerETConfig |
struct |
DL_MCPWM_EventTriggerConfig |
struct |
DL_MCPWM_GlobalLoadConfig |
struct |
DL_MCPWM_LoadModeConfig |
struct |
DL_MCPWM_Config |
Types
Name |
|
|---|---|
enum |
DL_MCPWM_TIME_BASE_COUNT_MODE { DL_MCPWM_COUNTER_MODE_UP = 0, DL_MCPWM_COUNTER_MODE_UP_DOWN = 1, DL_MCPWM_COUNTER_MODE_STOP_FREEZE = 2} |
enum |
DL_MCPWM_CLOCK_DIVIDER { DL_MCPWM_CLOCK_DIVIDER_1 = 0, DL_MCPWM_CLOCK_DIVIDER_2 = 1, DL_MCPWM_CLOCK_DIVIDER_4 = 2, DL_MCPWM_CLOCK_DIVIDER_8 = 3, DL_MCPWM_CLOCK_DIVIDER_16 = 4, DL_MCPWM_CLOCK_DIVIDER_32 = 5, DL_MCPWM_CLOCK_DIVIDER_64 = 6, DL_MCPWM_CLOCK_DIVIDER_128 = 7, DL_MCPWM_CLOCK_DIVIDER_256 = 8, DL_MCPWM_CLOCK_DIVIDER_512 = 9, DL_MCPWM_CLOCK_DIVIDER_1024 = 10, DL_MCPWM_CLOCK_DIVIDER_2048 = 11, DL_MCPWM_CLOCK_DIVIDER_4096 = 12, DL_MCPWM_CLOCK_DIVIDER_8192 = 13, DL_MCPWM_CLOCK_DIVIDER_16384 = 14, DL_MCPWM_CLOCK_DIVIDER_32768 = 15} |
enum |
DL_MCPWM_EMULATION_MODE { DL_MCPWM_EMULATION_STOP_AFTER_NEXT_TB = 0, DL_MCPWM_EMULATION_STOP_AFTER_FULL_CYCLE = 1, DL_MCPWM_EMULATION_FREE_RUN = 2} |
enum |
DL_MCPWM_PERIOD_LOAD_MODE { DL_MCPWM_PERIOD_SHADOW_LOAD_ENABLE = 0, DL_MCPWM_PERIOD_SHADOW_LOAD_DISABLE = 1} |
enum |
DL_MCPWM_SYNC_COUNT_MODE { DL_MCPWM_COUNT_MODE_DOWN_AFTER_SYNC = 0, DL_MCPWM_COUNT_MODE_UP_AFTER_SYNC = 1} |
enum |
DL_MCPWM_SYNC_OUT_PULSE_MODE { DL_MCPWM_SYNC_OUT_PULSE_ON_SOFTWARE = 0, DL_MCPWM_SYNC_OUT_PULSE_ON_COUNTER_ZERO = 1, DL_MCPWM_SYNC_OUT_PULSE_ON_COUNTER_COMPARE_C = 2, DL_MCPWM_SYNC_OUT_PULSE_ON_COUNTER_COMPARE_D = 3, DL_MCPWM_SYNC_OUT_PULSE_DISABLED = 4} |
enum |
DL_MCPWM_SYNCPERSEL_SOURCE { DL_MCPWM_SYNC_PULSE_DISABLED = 0, DL_MCPWM_SYNCPERSEL_SOURCE_PERIOD = 2, DL_MCPWM_SYNCPERSEL_SOURCE_ZERO = 3, DL_MCPWM_SYNCPERSEL_SOURCE_CMPC_UP = 4, DL_MCPWM_SYNCPERSEL_SOURCE_CMPC_DOWN = 5, DL_MCPWM_SYNCPERSEL_SOURCE_CMPD_UP = 6, DL_MCPWM_SYNCPERSEL_SOURCE_CMPD_DOWN = 7} |
enum |
DL_MCPWM_SYNC_IN_PULSE_SOURCE { DL_MCPWM_SYNC_IN_PULSE_SRC_DISABLE = 0U, DL_MCPWM_SYNC_IN_PULSE_SRC_ECAP0_SYNCOUT = 3U, DL_MCPWM_SYNC_IN_PULSE_SRC_ECAP1_SYNCOUT = 4U, DL_MCPWM_SYNC_IN_PULSE_SRC_MCPWM0_SYNCOUT = 5U, DL_MCPWM_SYNC_IN_PULSE_SRC_MCPWM1_SYNCOUT = 6U, DL_MCPWM_SYNC_IN_PULSE_SRC_MCPWM2_SYNCOUT = 7U, DL_MCPWM_SYNC_IN_PULSE_SRC_ECAP2_SYNCOUT = 10U, DL_MCPWM_SYNC_IN_PULSE_SRC_EPWM0_SYNCOUT = 11U, DL_MCPWM_SYNC_IN_PULSE_SRC_EPWM1_SYNCOUT = 12U, DL_MCPWM_SYNC_IN_PULSE_SRC_EPWM2_SYNCOUT = 13U, DL_MCPWM_SYNC_IN_PULSE_SRC_EPWM3_SYNCOUT = 14U, DL_MCPWM_SYNC_IN_PULSE_SRC_EPWM4_SYNCOUT = 15U, DL_MCPWM_SYNC_IN_PULSE_SRC_EPWM5_SYNCOUT = 16U, DL_MCPWM_SYNC_IN_PULSE_SRC_ECAT_SYNC0 = 17U, DL_MCPWM_SYNC_IN_PULSE_SRC_ECAT_SYNC1 = 18U, DL_MCPWM_SYNC_IN_PULSE_SRC_FSIRXA_TRIG1 = 19U, DL_MCPWM_SYNC_IN_PULSE_SRC_INPUTXBAR5 = 20U, DL_MCPWM_SYNC_IN_PULSE_SRC_INPUTXBAR6 = 21U} |
enum |
DL_MCPWM_COUNTER_COMPARE_MODULE { DL_MCPWM_COUNTER_COMPARE_1A = 0, DL_MCPWM_COUNTER_COMPARE_1B = 1, DL_MCPWM_COUNTER_COMPARE_2A = 2, DL_MCPWM_COUNTER_COMPARE_2B = 3, DL_MCPWM_COUNTER_COMPARE_3A = 4, DL_MCPWM_COUNTER_COMPARE_3B = 5, DL_MCPWM_COUNTER_COMPARE_C = 6, DL_MCPWM_COUNTER_COMPARE_D = 7} |
enum |
DL_MCPWM_COUNTER_COMPARE_LOAD_MODE { DL_MCPWM_COMP_LOAD_ON_CNTR_ZERO = 0, DL_MCPWM_COMP_LOAD_ON_CNTR_PERIOD = 1, DL_MCPWM_COMP_LOAD_ON_CNTR_ZERO_PERIOD = 2, DL_MCPWM_COMP_LOAD_FREEZE = 3} |
enum |
DL_MCPWM_ACTION_QUALIFIER_OUTPUT_MODULE { DL_MCPWM_AQ_OUTPUT_1A = 0, DL_MCPWM_AQ_OUTPUT_1B = 1, DL_MCPWM_AQ_OUTPUT_2A = 2, DL_MCPWM_AQ_OUTPUT_2B = 3, DL_MCPWM_AQ_OUTPUT_3A = 4, DL_MCPWM_AQ_OUTPUT_3B = 5} |
enum |
DL_MCPWM_ACTION_QUALIFIER_OUTPUT { DL_MCPWM_AQ_OUTPUT_NO_CHANGE = 0, DL_MCPWM_AQ_OUTPUT_LOW = 1, DL_MCPWM_AQ_OUTPUT_HIGH = 2, DL_MCPWM_AQ_OUTPUT_TOGGLE = 3} |
enum |
DL_MCPWM_ACTION_QUALIFIER_SW_FORCE_OUTPUT { DL_MCPWM_AQ_SW_FORCE_DISABLED = 0, DL_MCPWM_AQ_SW_CONTINUOUS_LOW = 1, DL_MCPWM_AQ_SW_CONTINUOUS_HIGH = 2, DL_MCPWM_AQ_SW_ONE_SHOT_LOW = 5, DL_MCPWM_AQ_SW_ONE_SHOT_HIGH = 6, DL_MCPWM_AQ_SW_ONE_SHOT_TOGGLE = 7} |
enum |
DL_MCPWM_ACTION_QUALIFIER_MODULE { DL_MCPWM_ACTION_QUALIFIER_1A = 0, DL_MCPWM_ACTION_QUALIFIER_1B = 1, DL_MCPWM_ACTION_QUALIFIER_2A = 2, DL_MCPWM_ACTION_QUALIFIER_2B = 3, DL_MCPWM_ACTION_QUALIFIER_3A = 4, DL_MCPWM_ACTION_QUALIFIER_3B = 5} |
enum |
DL_MCPWM_ACTION_QUALIFIER_LOAD_MODE { DL_MCPWM_AQ_LOAD_ON_CNTR_ZERO = 0, DL_MCPWM_AQ_LOAD_ON_CNTR_PERIOD = 1, DL_MCPWM_AQ_LOAD_ON_CNTR_ZERO_PERIOD = 2, DL_MCPWM_AQ_LOAD_FREEZE = 3} |
enum |
DL_MCPWM_ACTION_QUALIFIER_OUTPUT_EVENT { DL_MCPWM_AQ_OUTPUT_ON_TIMEBASE_ZERO = MCPWM_PWM1_AQCTLA_ZRO_OFS, DL_MCPWM_AQ_OUTPUT_ON_TIMEBASE_PERIOD = MCPWM_PWM1_AQCTLA_PRD_OFS, DL_MCPWM_AQ_OUTPUT_ON_TIMEBASE_UP_CMPA = MCPWM_PWM1_AQCTLA_CAU_OFS, DL_MCPWM_AQ_OUTPUT_ON_TIMEBASE_DOWN_CMPA = MCPWM_PWM1_AQCTLA_CAD_OFS, DL_MCPWM_AQ_OUTPUT_ON_TIMEBASE_UP_CMPB = MCPWM_PWM1_AQCTLA_CBU_OFS, DL_MCPWM_AQ_OUTPUT_ON_TIMEBASE_DOWN_CMPB = MCPWM_PWM1_AQCTLA_CBD_OFS} |
enum |
DL_MCPWM_ACTION_QUALIFIER_EVENT_ACTION { DL_MCPWM_AQ_OUTPUT_NO_CHANGE_ZERO = 0x0, DL_MCPWM_AQ_OUTPUT_LOW_ZERO = 0x1, DL_MCPWM_AQ_OUTPUT_HIGH_ZERO = 0x2, DL_MCPWM_AQ_OUTPUT_TOGGLE_ZERO = 0x3, DL_MCPWM_AQ_OUTPUT_NO_CHANGE_PERIOD = 0x0, DL_MCPWM_AQ_OUTPUT_LOW_PERIOD = 0x4, DL_MCPWM_AQ_OUTPUT_HIGH_PERIOD = 0x8, DL_MCPWM_AQ_OUTPUT_TOGGLE_PERIOD = 0xC, DL_MCPWM_AQ_OUTPUT_NO_CHANGE_UP_CMPA = 0x00, DL_MCPWM_AQ_OUTPUT_LOW_UP_CMPA = 0x10, DL_MCPWM_AQ_OUTPUT_HIGH_UP_CMPA = 0x20, DL_MCPWM_AQ_OUTPUT_TOGGLE_UP_CMPA = 0x30, DL_MCPWM_AQ_OUTPUT_NO_CHANGE_DOWN_CMPA = 0x00, DL_MCPWM_AQ_OUTPUT_LOW_DOWN_CMPA = 0x40, DL_MCPWM_AQ_OUTPUT_HIGH_DOWN_CMPA = 0x80, DL_MCPWM_AQ_OUTPUT_TOGGLE_DOWN_CMPA = 0xC0, DL_MCPWM_AQ_OUTPUT_NO_CHANGE_UP_CMPB = 0x000, DL_MCPWM_AQ_OUTPUT_LOW_UP_CMPB = 0x100, DL_MCPWM_AQ_OUTPUT_HIGH_UP_CMPB = 0x200, DL_MCPWM_AQ_OUTPUT_TOGGLE_UP_CMPB = 0x300, DL_MCPWM_AQ_OUTPUT_NO_CHANGE_DOWN_CMPB = 0x000, DL_MCPWM_AQ_OUTPUT_LOW_DOWN_CMPB = 0x400, DL_MCPWM_AQ_OUTPUT_HIGH_DOWN_CMPB = 0x800, DL_MCPWM_AQ_OUTPUT_TOGGLE_DOWN_CMPB = 0xC00} |
enum |
DL_MCPWM_GLOBAL_LOAD_TRIGGER { DL_MCPWM_GL_LOAD_PULSE_CNTR_ZERO = 0x0, DL_MCPWM_GL_LOAD_PULSE_CNTR_PERIOD = 0x1, DL_MCPWM_GL_LOAD_PULSE_CNTR_ZERO_PERIOD = 0x2, DL_MCPWM_GL_LOAD_PULSE_GLOBAL_FORCE = 0x3} |
enum |
DL_MCPWM_DEADBAND_OUTPUT { DL_MCPWM_DB_OUTPUT_A = 1, DL_MCPWM_DB_OUTPUT_B = 0} |
enum |
DL_MCPWM_DEADBAND_DELAY_MODE { DL_MCPWM_DB_RED = 1, DL_MCPWM_DB_FED = 0} |
enum |
DL_MCPWM_DEADBAND_POLARITY { DL_MCPWM_DB_POLARITY_ACTIVE_HIGH = 0, DL_MCPWM_DB_POLARITY_ACTIVE_LOW = 1} |
enum |
DL_MCPWM_RISING_EDGE_DELAY_LOAD_MODE { DL_MCPWM_RED_LOAD_ON_CNTR_ZERO = 0, DL_MCPWM_RED_LOAD_ON_CNTR_PERIOD = 1, DL_MCPWM_RED_LOAD_ON_CNTR_ZERO_PERIOD = 2, DL_MCPWM_RED_LOAD_FREEZE = 3} |
enum |
DL_MCPWM_FALLING_EDGE_DELAY_LOAD_MODE { DL_MCPWM_FED_LOAD_ON_CNTR_ZERO = 0, DL_MCPWM_FED_LOAD_ON_CNTR_PERIOD = 1, DL_MCPWM_FED_LOAD_ON_CNTR_ZERO_PERIOD = 2, DL_MCPWM_FED_LOAD_FREEZE = 3} |
enum |
DL_MCPWM_TRIP_ZONE_EVENT { DL_MCPWM_TZ_ACTION_EVENT_TZA = 0, DL_MCPWM_TZ_ACTION_EVENT_TZB = 1} |
enum |
DL_MCPWM_TRIP_ZONE_ACTION { DL_MCPWM_TZ_ACTION_HIGH_Z = 0, DL_MCPWM_TZ_ACTION_HIGH = 1, DL_MCPWM_TZ_ACTION_LOW = 2, DL_MCPWM_TZ_ACTION_DISABLE = 3} |
enum |
DL_MCPWM_TRIP_ZONE_CBC_MODE { DL_MCPWM_TZ_CBC_PULSE_CLR_NONE = 0, DL_MCPWM_TZ_CBC_PULSE_CLR_CNTR_ZERO = 1, DL_MCPWM_TZ_CBC_PULSE_CLR_CNTR_PERIOD = 2, DL_MCPWM_TZ_CBC_PULSE_CLR_CNTR_ZERO_PERIOD = 3} |
enum |
DL_MCPWM_SOC_TYPE { DL_MCPWM_SOC_A = 0, DL_MCPWM_SOC_B = 1, DL_MCPWM_SOC_C = 2, DL_MCPWM_SOC_D = 3} |
enum |
DL_MCPWM_SOC_SOURCE { DL_MCPWM_SOC_DISABLED = 0, DL_MCPWM_SOC_TBCTR_ZERO = 2, DL_MCPWM_SOC_TBCTR_PERIOD = 3, DL_MCPWM_SOC_TBCTR_ZERO_PERIOD = 4, DL_MCPWM_SOC_TBCTR_U_CMPC = 8, DL_MCPWM_SOC_TBCTR_U_CMPD = 9, DL_MCPWM_SOC_TBCTR_U_CMP1A = 10, DL_MCPWM_SOC_TBCTR_U_CMP1B = 11, DL_MCPWM_SOC_TBCTR_U_CMP2A = 12, DL_MCPWM_SOC_TBCTR_U_CMP2B = 13, DL_MCPWM_SOC_TBCTR_U_CMP3A = 14, DL_MCPWM_SOC_TBCTR_U_CMP3B = 15, DL_MCPWM_SOC_TBCTR_D_CMPC = 16, DL_MCPWM_SOC_TBCTR_D_CMPD = 17, DL_MCPWM_SOC_TBCTR_D_CMP1A = 18, DL_MCPWM_SOC_TBCTR_D_CMP1B = 19, DL_MCPWM_SOC_TBCTR_D_CMP2A = 20, DL_MCPWM_SOC_TBCTR_D_CMP2B = 21, DL_MCPWM_SOC_TBCTR_D_CMP3A = 22, DL_MCPWM_SOC_TBCTR_D_CMP3B = 23} |
enum |
DL_MCPWM_EVENT_TRIGGER_TYPE { DL_MCPWM_ET_1 = 0, DL_MCPWM_ET_2 = 1} |
enum |
DL_MCPWM_EVENT_TRIGGER_SOURCE { DL_MCPWM_EVT_DISABLED = 0, DL_MCPWM_EVT_TBCTR_ZERO = 2, DL_MCPWM_EVT_TBCTR_PERIOD = 3, DL_MCPWM_EVT_TBCTR_ZERO_PERIOD = 4, DL_MCPWM_EVT_TBCTR_U_CMPC = 8, DL_MCPWM_EVT_TBCTR_U_CMPD = 9, DL_MCPWM_EVT_TBCTR_U_CMP1A = 10, DL_MCPWM_EVT_TBCTR_U_CMP1B = 11, DL_MCPWM_EVT_TBCTR_U_CMP2A = 12, DL_MCPWM_EVT_TBCTR_U_CMP2B = 13, DL_MCPWM_EVT_TBCTR_U_CMP3A = 14, DL_MCPWM_EVT_TBCTR_U_CMP3B = 15, DL_MCPWM_EVT_TBCTR_D_CMPC = 16, DL_MCPWM_EVT_TBCTR_D_CMPD = 17, DL_MCPWM_EVT_TBCTR_D_CMP1A = 18, DL_MCPWM_EVT_TBCTR_D_CMP1B = 19, DL_MCPWM_EVT_TBCTR_D_CMP2A = 20, DL_MCPWM_EVT_TBCTR_D_CMP2B = 21, DL_MCPWM_EVT_TBCTR_D_CMP3A = 22, DL_MCPWM_EVT_TBCTR_D_CMP3B = 23} |
Functions
Name |
|
|---|---|
__STATIC_INLINE void |
DL_MCPWM_setPhaseShift(MCPWM_Regs * mcpwm, uint16_t phaseCount) |
__STATIC_INLINE void |
DL_MCPWM_setTimeBaseCounter(MCPWM_Regs * mcpwm, uint16_t count) |
__STATIC_INLINE uint16_t |
DL_MCPWM_getTimeBaseCounterValue(MCPWM_Regs * mcpwm) |
__STATIC_INLINE void |
DL_MCPWM_setTimeBaseCounterMode(MCPWM_Regs * mcpwm, DL_MCPWM_TIME_BASE_COUNT_MODE counterMode) |
__STATIC_INLINE uint32_t |
DL_MCPWM_getTimeBaseCounterDirection(MCPWM_Regs * mcpwm) |
__STATIC_INLINE void |
DL_MCPWM_setClockPrescaler(MCPWM_Regs * mcpwm, DL_MCPWM_CLOCK_DIVIDER prescaler) |
__STATIC_INLINE void |
DL_MCPWM_setPeriodLoadMode(MCPWM_Regs * mcpwm, DL_MCPWM_PERIOD_LOAD_MODE loadMode) |
__STATIC_INLINE void |
DL_MCPWM_enablePhaseShiftLoad(MCPWM_Regs * mcpwm) |
__STATIC_INLINE void |
DL_MCPWM_disablePhaseShiftLoad(MCPWM_Regs * mcpwm) |
__STATIC_INLINE void |
DL_MCPWM_setCountModeAfterSync(MCPWM_Regs * mcpwm, DL_MCPWM_SYNC_COUNT_MODE mode) |
__STATIC_INLINE void |
DL_MCPWM_forceSyncPulse(MCPWM_Regs * mcpwm) |
__STATIC_INLINE void |
DL_MCPWM_setSyncOutPulseMode(MCPWM_Regs * mcpwm, DL_MCPWM_SYNC_OUT_PULSE_MODE mode) |
__STATIC_INLINE void |
DL_MCPWM_setSyncPulseSource(MCPWM_Regs * mcpwm, DL_MCPWM_SYNCPERSEL_SOURCE syncPulseSource) |
__STATIC_INLINE void |
DL_MCPWM_setSyncInPulseSource(MCPWM_Regs * mcpwm, DL_MCPWM_SYNC_IN_PULSE_SOURCE source) |
__STATIC_INLINE bool |
DL_MCPWM_getSyncStatus(MCPWM_Regs * mcpwm) |
__STATIC_INLINE void |
DL_MCPWM_clearSyncStatus(MCPWM_Regs * mcpwm) |
__STATIC_INLINE void |
DL_MCPWM_setTimeBasePeriodActive(MCPWM_Regs * mcpwm, uint16_t periodCount) |
__STATIC_INLINE void |
DL_MCPWM_setTimeBasePeriodShadow(MCPWM_Regs * mcpwm, uint16_t periodCount) |
__STATIC_INLINE uint16_t |
DL_MCPWM_getTimeBasePeriodActive(MCPWM_Regs * mcpwm) |
__STATIC_INLINE uint16_t |
DL_MCPWM_getTimeBasePeriodShadow(MCPWM_Regs * mcpwm) |
__STATIC_INLINE void |
DL_MCPWM_setCounterCompareActiveValue(MCPWM_Regs * mcpwm, DL_MCPWM_COUNTER_COMPARE_MODULE compModule, uint16_t compCount) |
__STATIC_INLINE uint16_t |
DL_MCPWM_getCounterCompareActiveValue(MCPWM_Regs * mcpwm, DL_MCPWM_COUNTER_COMPARE_MODULE compModule) |
__STATIC_INLINE void |
DL_MCPWM_setCounterCompareShadowValue(MCPWM_Regs * mcpwm, DL_MCPWM_COUNTER_COMPARE_MODULE compModule, uint16_t compCount) |
__STATIC_INLINE uint16_t |
DL_MCPWM_getCounterCompareShadowValue(MCPWM_Regs * mcpwm, DL_MCPWM_COUNTER_COMPARE_MODULE compModule) |
__STATIC_INLINE void |
DL_MCPWM_setCounterCompareShadowLoadMode(MCPWM_Regs * mcpwm, DL_MCPWM_COUNTER_COMPARE_MODULE compModule, DL_MCPWM_COUNTER_COMPARE_LOAD_MODE loadMode) |
__STATIC_INLINE void |
DL_MCPWM_setActionQualifierSWAction(MCPWM_Regs * mcpwm, DL_MCPWM_ACTION_QUALIFIER_OUTPUT_MODULE mcpwmOutput, DL_MCPWM_ACTION_QUALIFIER_SW_FORCE_OUTPUT output) |
__STATIC_INLINE void |
DL_MCPWM_forceActionQualifierSWAction(MCPWM_Regs * mcpwm, DL_MCPWM_ACTION_QUALIFIER_OUTPUT_MODULE mcpwmOutput) |
__STATIC_INLINE void |
DL_MCPWM_setActionQualifierShadowLoadMode(MCPWM_Regs * mcpwm, DL_MCPWM_ACTION_QUALIFIER_MODULE aqModule, DL_MCPWM_ACTION_QUALIFIER_LOAD_MODE loadMode) |
__STATIC_INLINE void |
DL_MCPWM_setActionQualifierActionActive(MCPWM_Regs * mcpwm, DL_MCPWM_ACTION_QUALIFIER_OUTPUT_MODULE mcpwmOutput, DL_MCPWM_ACTION_QUALIFIER_OUTPUT output, DL_MCPWM_ACTION_QUALIFIER_OUTPUT_EVENT event) |
__STATIC_INLINE void |
DL_MCPWM_setActionQualifierActionShadow(MCPWM_Regs * mcpwm, DL_MCPWM_ACTION_QUALIFIER_OUTPUT_MODULE mcpwmOutput, DL_MCPWM_ACTION_QUALIFIER_OUTPUT output, DL_MCPWM_ACTION_QUALIFIER_OUTPUT_EVENT event) |
__STATIC_INLINE void |
DL_MCPWM_setActionQualifierActionCompleteActive(MCPWM_Regs * mcpwm, DL_MCPWM_ACTION_QUALIFIER_OUTPUT_MODULE mcpwmOutput, uint16_t action) |
__STATIC_INLINE void |
DL_MCPWM_setActionQualifierActionCompleteShadow(MCPWM_Regs * mcpwm, DL_MCPWM_ACTION_QUALIFIER_OUTPUT_MODULE mcpwmOutput, uint16_t action) |
__STATIC_INLINE void |
DL_MCPWM_enableGlobalLoad(MCPWM_Regs * mcpwm) |
__STATIC_INLINE void |
DL_MCPWM_disableGlobalLoad(MCPWM_Regs * mcpwm) |
__STATIC_INLINE void |
DL_MCPWM_setGlobalLoadTrigger(MCPWM_Regs * mcpwm, DL_MCPWM_GLOBAL_LOAD_TRIGGER loadTrigger) |
__STATIC_INLINE void |
DL_MCPWM_enableGlobalLoadOneShotMode(MCPWM_Regs * mcpwm) |
__STATIC_INLINE void |
DL_MCPWM_disableGlobalLoadOneShotMode(MCPWM_Regs * mcpwm) |
__STATIC_INLINE void |
DL_MCPWM_setGlobalLoadOneShotLatch(MCPWM_Regs * mcpwm) |
__STATIC_INLINE void |
DL_MCPWM_clearGlobalLoadOneShotLatch(MCPWM_Regs * mcpwm) |
__STATIC_INLINE bool |
DL_MCPWM_getGlobalLoadOneShotLatchStatus(MCPWM_Regs * mcpwm) |
__STATIC_INLINE void |
DL_MCPWM_forceGlobalLoadOneShotEvent(MCPWM_Regs * mcpwm) |
__STATIC_INLINE void |
DL_MCPWM_setDeadBandOutputSwapMode(MCPWM_Regs * mcpwm, DL_MCPWM_DEADBAND_OUTPUT output, bool enableSwapMode) |
__STATIC_INLINE void |
DL_MCPWM_setDeadBandDelayMode(MCPWM_Regs * mcpwm, DL_MCPWM_DEADBAND_DELAY_MODE delayMode, bool enableDelayMode) |
__STATIC_INLINE void |
DL_MCPWM_setDeadBandDelayPolarity(MCPWM_Regs * mcpwm, DL_MCPWM_DEADBAND_DELAY_MODE delayMode, DL_MCPWM_DEADBAND_POLARITY polarity) |
__STATIC_INLINE void |
DL_MCPWM_setRisingEdgeDeadBandDelayInput(MCPWM_Regs * mcpwm, uint16_t input) |
__STATIC_INLINE void |
DL_MCPWM_setFallingEdgeDeadBandDelayInput(MCPWM_Regs * mcpwm, uint16_t input) |
__STATIC_INLINE void |
DL_MCPWM_setRisingEdgeDelayCountShadowLoadMode(MCPWM_Regs * mcpwm, DL_MCPWM_RISING_EDGE_DELAY_LOAD_MODE loadMode) |
__STATIC_INLINE void |
DL_MCPWM_setFallingEdgeDelayCountShadowLoadMode(MCPWM_Regs * mcpwm, DL_MCPWM_FALLING_EDGE_DELAY_LOAD_MODE loadMode) |
__STATIC_INLINE void |
DL_MCPWM_setRisingEdgeDelayCountActive(MCPWM_Regs * mcpwm, uint16_t redCount) |
__STATIC_INLINE void |
DL_MCPWM_setRisingEdgeDelayCountShadow(MCPWM_Regs * mcpwm, uint16_t redCount) |
__STATIC_INLINE void |
DL_MCPWM_setFallingEdgeDelayCountActive(MCPWM_Regs * mcpwm, uint16_t fedCount) |
__STATIC_INLINE void |
DL_MCPWM_setFallingEdgeDelayCountShadow(MCPWM_Regs * mcpwm, uint16_t fedCount) |
__STATIC_INLINE void |
DL_MCPWM_enableTripZoneSignals(MCPWM_Regs * mcpwm, uint32_t tzSignal) |
__STATIC_INLINE void |
DL_MCPWM_disableTripZoneSignals(MCPWM_Regs * mcpwm, uint32_t tzSignal) |
__STATIC_INLINE void |
DL_MCPWM_setTripZoneAction(MCPWM_Regs * mcpwm, DL_MCPWM_TRIP_ZONE_EVENT tzEvent, DL_MCPWM_TRIP_ZONE_ACTION tzAction) |
__STATIC_INLINE void |
DL_MCPWM_selectTripZoneCBCEvent(MCPWM_Regs * mcpwm, DL_MCPWM_TRIP_ZONE_CBC_MODE clearEvent) |
__STATIC_INLINE uint32_t |
DL_MCPWM_getTripZoneFlagStatus(MCPWM_Regs * mcpwm) |
__STATIC_INLINE void |
DL_MCPWM_clearTripZoneFlagStatus(MCPWM_Regs * mcpwm, uint32_t tzFlags) |
__STATIC_INLINE void |
DL_MCPWM_enableADCTrigger(MCPWM_Regs * mcpwm, DL_MCPWM_SOC_TYPE adcSOCType) |
__STATIC_INLINE void |
DL_MCPWM_disableADCTrigger(MCPWM_Regs * mcpwm, DL_MCPWM_SOC_TYPE adcSOCType) |
__STATIC_INLINE void |
DL_MCPWM_setADCTriggerSource(MCPWM_Regs * mcpwm, DL_MCPWM_SOC_TYPE adcSOCType, DL_MCPWM_SOC_SOURCE socSource) |
__STATIC_INLINE void |
DL_MCPWM_setADCTriggerEventPrescale(MCPWM_Regs * mcpwm, DL_MCPWM_SOC_TYPE adcSOCType, uint16_t preScaleCount) |
__STATIC_INLINE uint16_t |
DL_MCPWM_getADCTriggerEventCount(MCPWM_Regs * mcpwm, DL_MCPWM_SOC_TYPE adcSOCType) |
__STATIC_INLINE bool |
DL_MCPWM_getADCTriggerFlagStatus(MCPWM_Regs * mcpwm, DL_MCPWM_SOC_TYPE adcSOCType) |
__STATIC_INLINE void |
DL_MCPWM_clearADCTriggerFlag(MCPWM_Regs * mcpwm, DL_MCPWM_SOC_TYPE adcSOCType) |
__STATIC_INLINE void |
DL_MCPWM_setEventTriggerSource(MCPWM_Regs * mcpwm, DL_MCPWM_EVENT_TRIGGER_TYPE evtTrigType, DL_MCPWM_EVENT_TRIGGER_SOURCE evtTrigSource) |
__STATIC_INLINE void |
DL_MCPWM_setEventTriggerEventPrescale(MCPWM_Regs * mcpwm, DL_MCPWM_EVENT_TRIGGER_TYPE evtTrigType, uint16_t preScaleCount) |
__STATIC_INLINE uint16_t |
DL_MCPWM_getEventTriggerEventCount(MCPWM_Regs * mcpwm, DL_MCPWM_EVENT_TRIGGER_TYPE evtTrigType) |
__STATIC_INLINE void |
DL_MCPWM_enableInterrupt(MCPWM_Regs * mcpwm, uint16_t intFlags) |
__STATIC_INLINE void |
DL_MCPWM_disableInterrupt(MCPWM_Regs * mcpwm, uint16_t intFlags) |
__STATIC_INLINE uint16_t |
DL_MCPWM_getInterruptSource(MCPWM_Regs * mcpwm) |
__STATIC_INLINE bool |
DL_MCPWM_getGlobalInterruptStatus(MCPWM_Regs * mcpwm) |
__STATIC_INLINE void |
DL_MCPWM_clearInterrupt(MCPWM_Regs * mcpwm, uint16_t intFlags) |
__STATIC_INLINE void |
DL_MCPWM_clearGlobalInterrupt(MCPWM_Regs * mcpwm) |
__STATIC_INLINE void |
DL_MCPWM_forceInterrupt(MCPWM_Regs * mcpwm, uint16_t intFlags) |
__STATIC_INLINE void |
DL_MCPWM_enableTBCLK(void ) |
__STATIC_INLINE void |
DL_MCPWM_disableTBCLK(void ) |
void |
DL_MCPWM_setEmulationMode(MCPWM_Regs * mcpwm, DL_MCPWM_EMULATION_MODE emulationMode) |
void |
DL_MCPWM_initParamsSetDefault(DL_MCPWM_Config * config) |
void |
DL_MCPWM_init(MCPWM_Regs * mcpwm, DL_MCPWM_Config * config) |
void |
DL_MCPWM_configureTimeBase(MCPWM_Regs * mcpwm, DL_MCPWM_TimeBaseConfig * timeBaseConfig) |
void |
DL_MCPWM_configureCounterCompare(MCPWM_Regs * mcpwm, DL_MCPWM_CounterCompareConfig * counterCompareConfig) |
void |
DL_MCPWM_configureActionQualifierActions(MCPWM_Regs * mcpwm, DL_MCPWM_ACTION_QUALIFIER_OUTPUT_MODULE output, DL_MCPWM_Actions * aqPwm) |
void |
DL_MCPWM_configureDeadBand(MCPWM_Regs * mcpwm, DL_MCPWM_DeadBandConfig * deadBandConfig) |
void |
DL_MCPWM_configureTripZone(MCPWM_Regs * mcpwm, DL_MCPWM_TripZoneConfig * config) |
void |
DL_MCPWM_configureEventTrigger(MCPWM_Regs * mcpwm, DL_MCPWM_EventTriggerConfig * eventTriggerConfig) |
void |
DL_MCPWM_configureLoadMode(MCPWM_Regs * mcpwm, DL_MCPWM_LoadModeConfig * loadModeConfig) |
Defines
Types Documentation
enum DL_MCPWM_TIME_BASE_COUNT_MODE
Enumerator |
Value |
Description |
|---|---|---|
DL_MCPWM_COUNTER_MODE_UP |
0 |
Up-count mode |
DL_MCPWM_COUNTER_MODE_UP_DOWN |
1 |
Up-down count mode |
DL_MCPWM_COUNTER_MODE_STOP_FREEZE |
2 |
Stop-Freeze counter |
enum DL_MCPWM_CLOCK_DIVIDER
Enumerator |
Value |
Description |
|---|---|---|
DL_MCPWM_CLOCK_DIVIDER_1 |
0 |
Divide clock by 1 |
DL_MCPWM_CLOCK_DIVIDER_2 |
1 |
Divide clock by 2 |
DL_MCPWM_CLOCK_DIVIDER_4 |
2 |
Divide clock by 4 |
DL_MCPWM_CLOCK_DIVIDER_8 |
3 |
Divide clock by 8 |
DL_MCPWM_CLOCK_DIVIDER_16 |
4 |
Divide clock by 16 |
DL_MCPWM_CLOCK_DIVIDER_32 |
5 |
Divide clock by 32 |
DL_MCPWM_CLOCK_DIVIDER_64 |
6 |
Divide clock by 64 |
DL_MCPWM_CLOCK_DIVIDER_128 |
7 |
Divide clock by 128 |
DL_MCPWM_CLOCK_DIVIDER_256 |
8 |
Divide clock by 256 |
DL_MCPWM_CLOCK_DIVIDER_512 |
9 |
Divide clock by 512 |
DL_MCPWM_CLOCK_DIVIDER_1024 |
10 |
Divide clock by 1024 |
DL_MCPWM_CLOCK_DIVIDER_2048 |
11 |
Divide clock by 2048 |
DL_MCPWM_CLOCK_DIVIDER_4096 |
12 |
Divide clock by 4096 |
DL_MCPWM_CLOCK_DIVIDER_8192 |
13 |
Divide clock by 8192 |
DL_MCPWM_CLOCK_DIVIDER_16384 |
14 |
Divide clock by 16384 |
DL_MCPWM_CLOCK_DIVIDER_32768 |
15 |
Divide clock by 32768 |
enum DL_MCPWM_EMULATION_MODE
Enumerator |
Value |
Description |
|---|---|---|
DL_MCPWM_EMULATION_STOP_AFTER_NEXT_TB |
0 |
Stop after TBCTR incrments or decrements |
DL_MCPWM_EMULATION_STOP_AFTER_FULL_CYCLE |
1 |
Stop when counter completes whole cycle |
DL_MCPWM_EMULATION_FREE_RUN |
2 |
Free run |
enum DL_MCPWM_PERIOD_LOAD_MODE
Enumerator |
Value |
Description |
|---|---|---|
DL_MCPWM_PERIOD_SHADOW_LOAD_ENABLE |
0 |
Load when counter equals zero |
DL_MCPWM_PERIOD_SHADOW_LOAD_DISABLE |
1 |
Disable load from Shadow register |
enum DL_MCPWM_SYNC_COUNT_MODE
Enumerator |
Value |
Description |
|---|---|---|
DL_MCPWM_COUNT_MODE_DOWN_AFTER_SYNC |
0 |
Count down after sync event |
DL_MCPWM_COUNT_MODE_UP_AFTER_SYNC |
1 |
Count up after sync event |
enum DL_MCPWM_SYNC_OUT_PULSE_MODE
Enumerator |
Value |
Description |
|---|---|---|
DL_MCPWM_SYNC_OUT_PULSE_ON_SOFTWARE |
0 |
Sync pulse is generated by software |
DL_MCPWM_SYNC_OUT_PULSE_ON_COUNTER_ZERO |
1 |
Sync pulse is generated when time base counter equals zero |
DL_MCPWM_SYNC_OUT_PULSE_ON_COUNTER_COMPARE_C |
2 |
Sync pulse is generated when time base counter equals compare C value |
DL_MCPWM_SYNC_OUT_PULSE_ON_COUNTER_COMPARE_D |
3 |
Sync pulse is generated when time base counter equals compare D value |
DL_MCPWM_SYNC_OUT_PULSE_DISABLED |
4 |
Sync pulse is disabled |
enum DL_MCPWM_SYNCPERSEL_SOURCE
Enumerator |
Value |
Description |
|---|---|---|
DL_MCPWM_SYNC_PULSE_DISABLED |
0 |
Sync Peripheral Signal Pulse is disabled |
DL_MCPWM_SYNCPERSEL_SOURCE_PERIOD |
2 |
Sync Peripheral Signal Pulse is generated when time base counter equals Period |
DL_MCPWM_SYNCPERSEL_SOURCE_ZERO |
3 |
Sync Peripheral Signal Pulse is generated when time base counter equals zero |
DL_MCPWM_SYNCPERSEL_SOURCE_CMPC_UP |
4 |
Sync Peripheral Signal Pulse is generated when time base counter equals compare C value while counting up |
DL_MCPWM_SYNCPERSEL_SOURCE_CMPC_DOWN |
5 |
Sync Peripheral Signal Pulse is generated when time base counter equals compare C value while counting down |
DL_MCPWM_SYNCPERSEL_SOURCE_CMPD_UP |
6 |
Sync Peripheral Signal Pulse is generated when time base counter equals compare D value while counting up |
DL_MCPWM_SYNCPERSEL_SOURCE_CMPD_DOWN |
7 |
Sync Peripheral Signal Pulse is generated when time base counter equals compare D value while counting down |
enum DL_MCPWM_SYNC_IN_PULSE_SOURCE
Enumerator |
Value |
Description |
|---|---|---|
DL_MCPWM_SYNC_IN_PULSE_SRC_DISABLE |
0U |
Sync-in source is DISABLE |
DL_MCPWM_SYNC_IN_PULSE_SRC_ECAP0_SYNCOUT |
3U |
Sync-in source is ECAP0_SYNCOUT |
DL_MCPWM_SYNC_IN_PULSE_SRC_ECAP1_SYNCOUT |
4U |
Sync-in source is ECAP1_SYNCOUT |
DL_MCPWM_SYNC_IN_PULSE_SRC_MCPWM0_SYNCOUT |
5U |
Sync-in source is MCPWM0_SYNCOUT |
DL_MCPWM_SYNC_IN_PULSE_SRC_MCPWM1_SYNCOUT |
6U |
Sync-in source is MCPWM1_SYNCOUT |
DL_MCPWM_SYNC_IN_PULSE_SRC_MCPWM2_SYNCOUT |
7U |
Sync-in source is MCPWM2_SYNCOUT |
DL_MCPWM_SYNC_IN_PULSE_SRC_ECAP2_SYNCOUT |
10U |
Sync-in source is ECAP2_SYNCOUT |
DL_MCPWM_SYNC_IN_PULSE_SRC_EPWM0_SYNCOUT |
11U |
Sync-in source is EPWM0_SYNCOUT |
DL_MCPWM_SYNC_IN_PULSE_SRC_EPWM1_SYNCOUT |
12U |
Sync-in source is EPWM1_SYNCOUT |
DL_MCPWM_SYNC_IN_PULSE_SRC_EPWM2_SYNCOUT |
13U |
Sync-in source is EPWM2_SYNCOUT |
DL_MCPWM_SYNC_IN_PULSE_SRC_EPWM3_SYNCOUT |
14U |
Sync-in source is EPWM3_SYNCOUT |
DL_MCPWM_SYNC_IN_PULSE_SRC_EPWM4_SYNCOUT |
15U |
Sync-in source is EPWM4_SYNCOUT |
DL_MCPWM_SYNC_IN_PULSE_SRC_EPWM5_SYNCOUT |
16U |
Sync-in source is EPWM5_SYNCOUT |
DL_MCPWM_SYNC_IN_PULSE_SRC_ECAT_SYNC0 |
17U |
Sync-in source is ECAT_SYNC0 |
DL_MCPWM_SYNC_IN_PULSE_SRC_ECAT_SYNC1 |
18U |
Sync-in source is ECAT_SYNC1 |
DL_MCPWM_SYNC_IN_PULSE_SRC_FSIRXA_TRIG1 |
19U |
Sync-in source is FSIRXA_TRIG1 |
DL_MCPWM_SYNC_IN_PULSE_SRC_INPUTXBAR5 |
20U |
Sync-in source is INPUTXBAR5 |
DL_MCPWM_SYNC_IN_PULSE_SRC_INPUTXBAR6 |
21U |
Sync-in source is INPUTXBAR6 |
enum DL_MCPWM_COUNTER_COMPARE_MODULE
Enumerator |
Value |
Description |
|---|---|---|
DL_MCPWM_COUNTER_COMPARE_1A |
0 |
Counter compare 1A |
DL_MCPWM_COUNTER_COMPARE_1B |
1 |
Counter compare 1B |
DL_MCPWM_COUNTER_COMPARE_2A |
2 |
Counter compare 2A |
DL_MCPWM_COUNTER_COMPARE_2B |
3 |
Counter compare 2B |
DL_MCPWM_COUNTER_COMPARE_3A |
4 |
Counter compare 3A |
DL_MCPWM_COUNTER_COMPARE_3B |
5 |
Counter compare 3B |
DL_MCPWM_COUNTER_COMPARE_C |
6 |
Counter compare C |
DL_MCPWM_COUNTER_COMPARE_D |
7 |
Counter compare D |
enum DL_MCPWM_COUNTER_COMPARE_LOAD_MODE
Enumerator |
Value |
Description |
|---|---|---|
DL_MCPWM_COMP_LOAD_ON_CNTR_ZERO |
0 |
Load when counter equals zero |
DL_MCPWM_COMP_LOAD_ON_CNTR_PERIOD |
1 |
Load when counter equals period |
DL_MCPWM_COMP_LOAD_ON_CNTR_ZERO_PERIOD |
2 |
Load when counter equals zero or period |
DL_MCPWM_COMP_LOAD_FREEZE |
3 |
Freeze shadow to active load |
enum DL_MCPWM_ACTION_QUALIFIER_OUTPUT_MODULE
Enumerator |
Value |
Description |
|---|---|---|
DL_MCPWM_AQ_OUTPUT_1A |
0 |
DL_MCPWMx1A output |
DL_MCPWM_AQ_OUTPUT_1B |
1 |
DL_MCPWMx1B output |
DL_MCPWM_AQ_OUTPUT_2A |
2 |
DL_MCPWMx2A output |
DL_MCPWM_AQ_OUTPUT_2B |
3 |
DL_MCPWMx2B output |
DL_MCPWM_AQ_OUTPUT_3A |
4 |
DL_MCPWMx3A output |
DL_MCPWM_AQ_OUTPUT_3B |
5 |
DL_MCPWMx3B output |
enum DL_MCPWM_ACTION_QUALIFIER_OUTPUT
Enumerator |
Value |
Description |
|---|---|---|
DL_MCPWM_AQ_OUTPUT_NO_CHANGE |
0 |
No change in the output pins |
DL_MCPWM_AQ_OUTPUT_LOW |
1 |
Set output pins to low |
DL_MCPWM_AQ_OUTPUT_HIGH |
2 |
Set output pins to High |
DL_MCPWM_AQ_OUTPUT_TOGGLE |
3 |
Toggle the output pins |
enum DL_MCPWM_ACTION_QUALIFIER_SW_FORCE_OUTPUT
Enumerator |
Value |
Description |
|---|---|---|
DL_MCPWM_AQ_SW_FORCE_DISABLED |
0 |
SW force Action is disabled |
DL_MCPWM_AQ_SW_CONTINUOUS_LOW |
1 |
Set output pins to continuos low |
DL_MCPWM_AQ_SW_CONTINUOUS_HIGH |
2 |
Set output pins to continuos High |
DL_MCPWM_AQ_SW_ONE_SHOT_LOW |
5 |
Set output to low when one shot is triggered |
DL_MCPWM_AQ_SW_ONE_SHOT_HIGH |
6 |
Set output to high when one shot is triggered |
DL_MCPWM_AQ_SW_ONE_SHOT_TOGGLE |
7 |
Toggle output when one shot is triggered |
enum DL_MCPWM_ACTION_QUALIFIER_MODULE
Enumerator |
Value |
Description |
|---|---|---|
DL_MCPWM_ACTION_QUALIFIER_1A |
0 |
Action Qualifier 1A |
DL_MCPWM_ACTION_QUALIFIER_1B |
1 |
Action Qualifier 1B |
DL_MCPWM_ACTION_QUALIFIER_2A |
2 |
Action Qualifier 2A |
DL_MCPWM_ACTION_QUALIFIER_2B |
3 |
Action Qualifier 2B |
DL_MCPWM_ACTION_QUALIFIER_3A |
4 |
Action Qualifier 3A |
DL_MCPWM_ACTION_QUALIFIER_3B |
5 |
Action Qualifier 3B |
enum DL_MCPWM_ACTION_QUALIFIER_LOAD_MODE
Enumerator |
Value |
Description |
|---|---|---|
DL_MCPWM_AQ_LOAD_ON_CNTR_ZERO |
0 |
Load when counter equals zero |
DL_MCPWM_AQ_LOAD_ON_CNTR_PERIOD |
1 |
Load when counter equals period |
DL_MCPWM_AQ_LOAD_ON_CNTR_ZERO_PERIOD |
2 |
Load when counter equals zero or period |
DL_MCPWM_AQ_LOAD_FREEZE |
3 |
Freeze shadow to active load |
enum DL_MCPWM_ACTION_QUALIFIER_OUTPUT_EVENT
Enumerator |
Value |
Description |
|---|---|---|
DL_MCPWM_AQ_OUTPUT_ON_TIMEBASE_ZERO |
MCPWM_PWM1_AQCTLA_ZRO_OFS |
Time base counter equals zero |
DL_MCPWM_AQ_OUTPUT_ON_TIMEBASE_PERIOD |
MCPWM_PWM1_AQCTLA_PRD_OFS |
Time base counter equals period |
DL_MCPWM_AQ_OUTPUT_ON_TIMEBASE_UP_CMPA |
MCPWM_PWM1_AQCTLA_CAU_OFS |
Time base counter up equals CMPA |
DL_MCPWM_AQ_OUTPUT_ON_TIMEBASE_DOWN_CMPA |
MCPWM_PWM1_AQCTLA_CAD_OFS |
Time base counter down equals CMPA |
DL_MCPWM_AQ_OUTPUT_ON_TIMEBASE_UP_CMPB |
MCPWM_PWM1_AQCTLA_CBU_OFS |
Time base counter up equals CMPB |
DL_MCPWM_AQ_OUTPUT_ON_TIMEBASE_DOWN_CMPB |
MCPWM_PWM1_AQCTLA_CBD_OFS |
Time base counter down equals CMPB |
enum DL_MCPWM_ACTION_QUALIFIER_EVENT_ACTION
Enumerator |
Value |
Description |
|---|---|---|
DL_MCPWM_AQ_OUTPUT_NO_CHANGE_ZERO |
0x0 |
Time base counter equals zero and no change in the output pins |
DL_MCPWM_AQ_OUTPUT_LOW_ZERO |
0x1 |
Time base counter equals zero and set output pins to low |
DL_MCPWM_AQ_OUTPUT_HIGH_ZERO |
0x2 |
Time base counter equals zero and set output pins to high |
DL_MCPWM_AQ_OUTPUT_TOGGLE_ZERO |
0x3 |
Time base counter equals zero and toggle the output pins |
DL_MCPWM_AQ_OUTPUT_NO_CHANGE_PERIOD |
0x0 |
Time base counter equals period and no change in the output pins |
DL_MCPWM_AQ_OUTPUT_LOW_PERIOD |
0x4 |
Time base counter equals period and set output pins to low |
DL_MCPWM_AQ_OUTPUT_HIGH_PERIOD |
0x8 |
Time base counter equals period and set output pins to high |
DL_MCPWM_AQ_OUTPUT_TOGGLE_PERIOD |
0xC |
Time base counter equals period and toggle the output pins |
DL_MCPWM_AQ_OUTPUT_NO_CHANGE_UP_CMPA |
0x00 |
Time base counter up equals CMPA and no change in the output pins |
DL_MCPWM_AQ_OUTPUT_LOW_UP_CMPA |
0x10 |
Time base counter up equals CMPA and set output pins to low |
DL_MCPWM_AQ_OUTPUT_HIGH_UP_CMPA |
0x20 |
Time base counter up equals CMPA and set output pins to high |
DL_MCPWM_AQ_OUTPUT_TOGGLE_UP_CMPA |
0x30 |
Time base counter up equals CMPA and toggle the output pins |
DL_MCPWM_AQ_OUTPUT_NO_CHANGE_DOWN_CMPA |
0x00 |
Time base counter down equals CMPA and no change in the output pins |
DL_MCPWM_AQ_OUTPUT_LOW_DOWN_CMPA |
0x40 |
Time base counter down equals CMPA and set output pins to low |
DL_MCPWM_AQ_OUTPUT_HIGH_DOWN_CMPA |
0x80 |
Time base counter down equals CMPA and set output pins to high |
DL_MCPWM_AQ_OUTPUT_TOGGLE_DOWN_CMPA |
0xC0 |
Time base counter down equals CMPA and toggle the output pins |
DL_MCPWM_AQ_OUTPUT_NO_CHANGE_UP_CMPB |
0x000 |
Time base counter up equals CMPB and no change in the output pins |
DL_MCPWM_AQ_OUTPUT_LOW_UP_CMPB |
0x100 |
Time base counter up equals CMPB and set output pins to low |
DL_MCPWM_AQ_OUTPUT_HIGH_UP_CMPB |
0x200 |
Time base counter up equals CMPB and set output pins to high |
DL_MCPWM_AQ_OUTPUT_TOGGLE_UP_CMPB |
0x300 |
Time base counter up equals CMPB and toggle the output pins |
DL_MCPWM_AQ_OUTPUT_NO_CHANGE_DOWN_CMPB |
0x000 |
Time base counter down equals CMPB and no change in the output pins |
DL_MCPWM_AQ_OUTPUT_LOW_DOWN_CMPB |
0x400 |
Time base counter down equals CMPB and set output pins to low |
DL_MCPWM_AQ_OUTPUT_HIGH_DOWN_CMPB |
0x800 |
Time base counter down equals CMPB and set output pins to high |
DL_MCPWM_AQ_OUTPUT_TOGGLE_DOWN_CMPB |
0xC00 |
Time base counter down equals CMPB and toggle the output pins |
enum DL_MCPWM_GLOBAL_LOAD_TRIGGER
Enumerator |
Value |
Description |
|---|---|---|
DL_MCPWM_GL_LOAD_PULSE_CNTR_ZERO |
0x0 |
Load when counter is equal to zero |
DL_MCPWM_GL_LOAD_PULSE_CNTR_PERIOD |
0x1 |
Load when counter is equal to period |
DL_MCPWM_GL_LOAD_PULSE_CNTR_ZERO_PERIOD |
0x2 |
Load when counter is equal to zero or period |
DL_MCPWM_GL_LOAD_PULSE_GLOBAL_FORCE |
0x3 |
Load on global force |
enum DL_MCPWM_DEADBAND_OUTPUT
Enumerator |
Value |
Description |
|---|---|---|
DL_MCPWM_DB_OUTPUT_A |
1 |
DB output is DL_MCPWMA |
DL_MCPWM_DB_OUTPUT_B |
0 |
DB output is DL_MCPWMB |
enum DL_MCPWM_DEADBAND_DELAY_MODE
Enumerator |
Value |
Description |
|---|---|---|
DL_MCPWM_DB_RED |
1 |
DB RED (Rising Edge Delay) mode |
DL_MCPWM_DB_FED |
0 |
DB FED (Falling Edge Delay) mode |
enum DL_MCPWM_DEADBAND_POLARITY
Enumerator |
Value |
Description |
|---|---|---|
DL_MCPWM_DB_POLARITY_ACTIVE_HIGH |
0 |
DB polarity is not inverted |
DL_MCPWM_DB_POLARITY_ACTIVE_LOW |
1 |
DB polarity is inverted |
enum DL_MCPWM_RISING_EDGE_DELAY_LOAD_MODE
Enumerator |
Value |
Description |
|---|---|---|
DL_MCPWM_RED_LOAD_ON_CNTR_ZERO |
0 |
Load when counter equals zero |
DL_MCPWM_RED_LOAD_ON_CNTR_PERIOD |
1 |
Load when counter equals period |
DL_MCPWM_RED_LOAD_ON_CNTR_ZERO_PERIOD |
2 |
Load when counter equals zero or period |
DL_MCPWM_RED_LOAD_FREEZE |
3 |
Freeze shadow to active load |
enum DL_MCPWM_FALLING_EDGE_DELAY_LOAD_MODE
Enumerator |
Value |
Description |
|---|---|---|
DL_MCPWM_FED_LOAD_ON_CNTR_ZERO |
0 |
Load when counter equals zero |
DL_MCPWM_FED_LOAD_ON_CNTR_PERIOD |
1 |
Load when counter equals period |
DL_MCPWM_FED_LOAD_ON_CNTR_ZERO_PERIOD |
2 |
Load when counter equals zero or period |
DL_MCPWM_FED_LOAD_FREEZE |
3 |
Freeze shadow to active load |
enum DL_MCPWM_TRIP_ZONE_EVENT
Enumerator |
Value |
Description |
|---|---|---|
DL_MCPWM_TZ_ACTION_EVENT_TZA |
0 |
TZ1 - TZ8 action on TZ event A |
DL_MCPWM_TZ_ACTION_EVENT_TZB |
1 |
TZ1 - TZ8 action on TZ event B |
enum DL_MCPWM_TRIP_ZONE_ACTION
Enumerator |
Value |
Description |
|---|---|---|
DL_MCPWM_TZ_ACTION_HIGH_Z |
0 |
High impedance state |
DL_MCPWM_TZ_ACTION_HIGH |
1 |
High voltage state |
DL_MCPWM_TZ_ACTION_LOW |
2 |
Low voltage state |
DL_MCPWM_TZ_ACTION_DISABLE |
3 |
Disable action |
enum DL_MCPWM_TRIP_ZONE_CBC_MODE
Enumerator |
Value |
Description |
|---|---|---|
DL_MCPWM_TZ_CBC_PULSE_CLR_NONE |
0 |
Disable CBC pulse Clear |
DL_MCPWM_TZ_CBC_PULSE_CLR_CNTR_ZERO |
1 |
Clear CBC pulse when counter equals zero |
DL_MCPWM_TZ_CBC_PULSE_CLR_CNTR_PERIOD |
2 |
Clear CBC pulse when counter equals period |
DL_MCPWM_TZ_CBC_PULSE_CLR_CNTR_ZERO_PERIOD |
3 |
Clear CBC pulse when counter equals zero or period |
enum DL_MCPWM_SOC_TYPE
Enumerator |
Value |
Description |
|---|---|---|
DL_MCPWM_SOC_A |
0 |
SOC A |
DL_MCPWM_SOC_B |
1 |
SOC B |
DL_MCPWM_SOC_C |
2 |
SOC C |
DL_MCPWM_SOC_D |
3 |
SOC D |
enum DL_MCPWM_SOC_SOURCE
Enumerator |
Value |
Description |
|---|---|---|
DL_MCPWM_SOC_DISABLED |
0 |
Event is Disabled |
DL_MCPWM_SOC_TBCTR_ZERO |
2 |
Time-base counter equal to zero |
DL_MCPWM_SOC_TBCTR_PERIOD |
3 |
Time-base counter equal to period |
DL_MCPWM_SOC_TBCTR_ZERO_PERIOD |
4 |
Time-base counter equal to zero or period |
DL_MCPWM_SOC_TBCTR_U_CMPC |
8 |
Time-base counter equal to CMPC when the timer is incrementing |
DL_MCPWM_SOC_TBCTR_U_CMPD |
9 |
Time-base counter equal to CMPD when the timer is incrementing |
DL_MCPWM_SOC_TBCTR_U_CMP1A |
10 |
Time-base counter equal to CMP1A when the timer is incrementing |
DL_MCPWM_SOC_TBCTR_U_CMP1B |
11 |
Time-base counter equal to CMP1B when the timer is incrementing |
DL_MCPWM_SOC_TBCTR_U_CMP2A |
12 |
Time-base counter equal to CMP2A when the timer is incrementing |
DL_MCPWM_SOC_TBCTR_U_CMP2B |
13 |
Time-base counter equal to CMP2B when the timer is incrementing |
DL_MCPWM_SOC_TBCTR_U_CMP3A |
14 |
Time-base counter equal to CMP3A when the timer is incrementing |
DL_MCPWM_SOC_TBCTR_U_CMP3B |
15 |
Time-base counter equal to CMP3B when the timer is incrementing |
DL_MCPWM_SOC_TBCTR_D_CMPC |
16 |
Time-base counter equal to CMPC when the timer is Decrementing |
DL_MCPWM_SOC_TBCTR_D_CMPD |
17 |
Time-base counter equal to CMPD when the timer is Decrementing |
DL_MCPWM_SOC_TBCTR_D_CMP1A |
18 |
Time-base counter equal to CMP1A when the timer is Decrementing |
DL_MCPWM_SOC_TBCTR_D_CMP1B |
19 |
Time-base counter equal to CMP1B when the timer is Decrementing |
DL_MCPWM_SOC_TBCTR_D_CMP2A |
20 |
Time-base counter equal to CMP2A when the timer is Decrementing |
DL_MCPWM_SOC_TBCTR_D_CMP2B |
21 |
Time-base counter equal to CMP2B when the timer is Decrementing |
DL_MCPWM_SOC_TBCTR_D_CMP3A |
22 |
Time-base counter equal to CMP3A when the timer is Decrementing |
DL_MCPWM_SOC_TBCTR_D_CMP3B |
23 |
Time-base counter equal to CMP3B when the timer is Decrementing |
enum DL_MCPWM_EVENT_TRIGGER_TYPE
Enumerator |
Value |
Description |
|---|---|---|
DL_MCPWM_ET_1 |
0 |
EVT 1 |
DL_MCPWM_ET_2 |
1 |
EVT 2 |
enum DL_MCPWM_EVENT_TRIGGER_SOURCE
Enumerator |
Value |
Description |
|---|---|---|
DL_MCPWM_EVT_DISABLED |
0 |
Event is Disabled |
DL_MCPWM_EVT_TBCTR_ZERO |
2 |
Time-base counter equal to zero |
DL_MCPWM_EVT_TBCTR_PERIOD |
3 |
Time-base counter equal to period |
DL_MCPWM_EVT_TBCTR_ZERO_PERIOD |
4 |
Time-base counter equal to zero or period |
DL_MCPWM_EVT_TBCTR_U_CMPC |
8 |
Time-base counter equal to CMPC when the timer is incrementing |
DL_MCPWM_EVT_TBCTR_U_CMPD |
9 |
Time-base counter equal to CMPD when the timer is incrementing |
DL_MCPWM_EVT_TBCTR_U_CMP1A |
10 |
Time-base counter equal to CMP1A when the timer is incrementing |
DL_MCPWM_EVT_TBCTR_U_CMP1B |
11 |
Time-base counter equal to CMP1B when the timer is incrementing |
DL_MCPWM_EVT_TBCTR_U_CMP2A |
12 |
Time-base counter equal to CMP2A when the timer is incrementing |
DL_MCPWM_EVT_TBCTR_U_CMP2B |
13 |
Time-base counter equal to CMP2B when the timer is incrementing |
DL_MCPWM_EVT_TBCTR_U_CMP3A |
14 |
Time-base counter equal to CMP3A when the timer is incrementing |
DL_MCPWM_EVT_TBCTR_U_CMP3B |
15 |
Time-base counter equal to CMP3B when the timer is incrementing |
DL_MCPWM_EVT_TBCTR_D_CMPC |
16 |
Time-base counter equal to CMPC when the timer is Decrementing |
DL_MCPWM_EVT_TBCTR_D_CMPD |
17 |
Time-base counter equal to CMPD when the timer is Decrementing |
DL_MCPWM_EVT_TBCTR_D_CMP1A |
18 |
Time-base counter equal to CMP1A when the timer is Decrementing |
DL_MCPWM_EVT_TBCTR_D_CMP1B |
19 |
Time-base counter equal to CMP1B when the timer is Decrementing |
DL_MCPWM_EVT_TBCTR_D_CMP2A |
20 |
Time-base counter equal to CMP2A when the timer is Decrementing |
DL_MCPWM_EVT_TBCTR_D_CMP2B |
21 |
Time-base counter equal to CMP2B when the timer is Decrementing |
DL_MCPWM_EVT_TBCTR_D_CMP3A |
22 |
Time-base counter equal to CMP3A when the timer is Decrementing |
DL_MCPWM_EVT_TBCTR_D_CMP3B |
23 |
Time-base counter equal to CMP3B when the timer is Decrementing |
Functions Documentation
function DL_MCPWM_setPhaseShift
__STATIC_INLINE void DL_MCPWM_setPhaseShift(
MCPWM_Regs * mcpwm,
uint16_t phaseCount
)
Sets the phase shift offset counter value.
Parameters:
mcpwm Pointer to the register overlay for the peripheral.
phaseCount Phase shift count value.
function DL_MCPWM_setTimeBaseCounter
__STATIC_INLINE void DL_MCPWM_setTimeBaseCounter(
MCPWM_Regs * mcpwm,
uint16_t count
)
Sets the time base count.
Parameters:
mcpwm Pointer to the register overlay for the peripheral.
count Time base count value.
function DL_MCPWM_getTimeBaseCounterValue
__STATIC_INLINE uint16_t DL_MCPWM_getTimeBaseCounterValue(
MCPWM_Regs * mcpwm
)
Returns time base counter value.
Parameters:
mcpwm Pointer to the register overlay for the peripheral.
Return: Returns the time base counter value
function DL_MCPWM_setTimeBaseCounterMode
__STATIC_INLINE void DL_MCPWM_setTimeBaseCounterMode(
MCPWM_Regs * mcpwm,
DL_MCPWM_TIME_BASE_COUNT_MODE counterMode
)
Set time base counter mode.
Parameters:
mcpwm Pointer to the register overlay for the peripheral.
counterMode Time base counter mode.
function DL_MCPWM_getTimeBaseCounterDirection
__STATIC_INLINE uint32_t DL_MCPWM_getTimeBaseCounterDirection(
MCPWM_Regs * mcpwm
)
Return time base counter direction.
Parameters:
mcpwm Pointer to the register overlay for the peripheral.
Returns:
Return: Returns the time base counter direction
function DL_MCPWM_setClockPrescaler
__STATIC_INLINE void DL_MCPWM_setClockPrescaler(
MCPWM_Regs * mcpwm,
DL_MCPWM_CLOCK_DIVIDER prescaler
)
Set the time base clock and the high speed time base clock count pre-scaler.
Parameters:
mcpwm Pointer to the register overlay for the peripheral.
prescaler The time base count pre scale value.
function DL_MCPWM_setPeriodLoadMode
__STATIC_INLINE void DL_MCPWM_setPeriodLoadMode(
MCPWM_Regs * mcpwm,
DL_MCPWM_PERIOD_LOAD_MODE loadMode
)
Set PWM period load mode.
Parameters:
mcpwm Pointer to the register overlay for the peripheral.
loadMode TPWM period load mode.
function DL_MCPWM_enablePhaseShiftLoad
__STATIC_INLINE void DL_MCPWM_enablePhaseShiftLoad(
MCPWM_Regs * mcpwm
)
Enable phase shift load.
Parameters:
mcpwm Pointer to the register overlay for the peripheral.
function DL_MCPWM_disablePhaseShiftLoad
__STATIC_INLINE void DL_MCPWM_disablePhaseShiftLoad(
MCPWM_Regs * mcpwm
)
Disable phase shift load.
Parameters:
mcpwm Pointer to the register overlay for the peripheral.
function DL_MCPWM_setCountModeAfterSync
__STATIC_INLINE void DL_MCPWM_setCountModeAfterSync(
MCPWM_Regs * mcpwm,
DL_MCPWM_SYNC_COUNT_MODE mode
)
Set count mode after phase shift sync.
Parameters:
mcpwm Pointer to the register overlay for the peripheral.
mode This is the count mode.
function DL_MCPWM_forceSyncPulse
__STATIC_INLINE void DL_MCPWM_forceSyncPulse(
MCPWM_Regs * mcpwm
)
Force a software sync pulse.
Parameters:
mcpwm Pointer to the register overlay for the peripheral.
function DL_MCPWM_setSyncOutPulseMode
__STATIC_INLINE void DL_MCPWM_setSyncOutPulseMode(
MCPWM_Regs * mcpwm,
DL_MCPWM_SYNC_OUT_PULSE_MODE mode
)
Set up the sync out pulse event.
Parameters:
mcpwm Pointer to the register overlay for the peripheral.
mode This is the sync out mode.
function DL_MCPWM_setSyncPulseSource
__STATIC_INLINE void DL_MCPWM_setSyncPulseSource(
MCPWM_Regs * mcpwm,
DL_MCPWM_SYNCPERSEL_SOURCE syncPulseSource
)
Set up the sync out pulse source.
Parameters:
mcpwm Pointer to the register overlay for the peripheral.
syncPulseSource This is the SYNCPERSEL source.
function DL_MCPWM_setSyncInPulseSource
__STATIC_INLINE void DL_MCPWM_setSyncInPulseSource(
MCPWM_Regs * mcpwm,
DL_MCPWM_SYNC_IN_PULSE_SOURCE source
)
Set up the source for sync-in pulse.
Parameters:
mcpwm Pointer to the register overlay for the peripheral.
source This is the sync-in pulse source.
function DL_MCPWM_getSyncStatus
__STATIC_INLINE bool DL_MCPWM_getSyncStatus(
MCPWM_Regs * mcpwm
)
Return external sync signal status.
Parameters:
mcpwm Pointer to the register overlay for the peripheral.
Returns:
true External sync event has occurred.
false No external event has occured.
Return: Returns the external sync status.
function DL_MCPWM_clearSyncStatus
__STATIC_INLINE void DL_MCPWM_clearSyncStatus(
MCPWM_Regs * mcpwm
)
Return external sync signal status.
Parameters:
mcpwm Pointer to the register overlay for the peripheral.
function DL_MCPWM_setTimeBasePeriodActive
__STATIC_INLINE void DL_MCPWM_setTimeBasePeriodActive(
MCPWM_Regs * mcpwm,
uint16_t periodCount
)
Sets the PWM period count in its Active Register.
Parameters:
mcpwm Pointer to the register overlay for the peripheral.
periodCount This is the period count value.
This function sets the period of the PWM count in its Active period register. The value of periodCount is the value written to the register. User should map the desired period or frequency of the waveform into the correct periodCount.
function DL_MCPWM_setTimeBasePeriodShadow
__STATIC_INLINE void DL_MCPWM_setTimeBasePeriodShadow(
MCPWM_Regs * mcpwm,
uint16_t periodCount
)
Sets the PWM period count in shadow register.
Parameters:
mcpwm Pointer to the register overlay for the peripheral.
periodCount This is the period count value.
This function sets the period of the PWM count in its Shadow period register. The value of periodCount is the value written to the register. User should map the desired period or frequency of the waveform into the correct periodCount.
function DL_MCPWM_getTimeBasePeriodActive
__STATIC_INLINE uint16_t DL_MCPWM_getTimeBasePeriodActive(
MCPWM_Regs * mcpwm
)
Gets the PWM period count.
Parameters:
mcpwm Pointer to the register overlay for the peripheral.
Return: Returns the PWM period count value.
function DL_MCPWM_getTimeBasePeriodShadow
__STATIC_INLINE uint16_t DL_MCPWM_getTimeBasePeriodShadow(
MCPWM_Regs * mcpwm
)
Gets the PWM period count.
Parameters:
mcpwm Pointer to the register overlay for the peripheral.
Return: Returns the PWM period count value in its register.
This function gets the period of the PWM count in its shadow register.
function DL_MCPWM_setCounterCompareActiveValue
__STATIC_INLINE void DL_MCPWM_setCounterCompareActiveValue(
MCPWM_Regs * mcpwm,
DL_MCPWM_COUNTER_COMPARE_MODULE compModule,
uint16_t compCount
)
Set counter compare values.
Parameters:
mcpwm Pointer to the register overlay for the peripheral.
compModule Counter compare value module.
compCount Counter compare count value.
This function sets the active counter compare value for counter compare registers. The maximum value for compCount is 0xFFFF.
function DL_MCPWM_getCounterCompareActiveValue
__STATIC_INLINE uint16_t DL_MCPWM_getCounterCompareActiveValue(
MCPWM_Regs * mcpwm,
DL_MCPWM_COUNTER_COMPARE_MODULE compModule
)
Get counter compare values.
Parameters:
mcpwm Pointer to the register overlay for the peripheral.
compModule Counter compare value module.
Return: Returns active counter compare values for a selected counter compare module.
This function gets the active counter compare value for counter compare registers.
function DL_MCPWM_setCounterCompareShadowValue
__STATIC_INLINE void DL_MCPWM_setCounterCompareShadowValue(
MCPWM_Regs * mcpwm,
DL_MCPWM_COUNTER_COMPARE_MODULE compModule,
uint16_t compCount
)
Set counter compare values.
Parameters:
mcpwm Pointer to the register overlay for the peripheral.
compModule Counter compare value module.
compCount Counter compare count value.
This function sets the shadow counter compare value for counter compare registers.
function DL_MCPWM_getCounterCompareShadowValue
__STATIC_INLINE uint16_t DL_MCPWM_getCounterCompareShadowValue(
MCPWM_Regs * mcpwm,
DL_MCPWM_COUNTER_COMPARE_MODULE compModule
)
Get counter compare values.
Parameters:
mcpwm Pointer to the register overlay for the peripheral.
compModule Counter compare value module.
Return: Returns shadow counter compare values for a selected counter compare module.
This function gets the value for shadow counter compare registers. registers.
function DL_MCPWM_setCounterCompareShadowLoadMode
__STATIC_INLINE void DL_MCPWM_setCounterCompareShadowLoadMode(
MCPWM_Regs * mcpwm,
DL_MCPWM_COUNTER_COMPARE_MODULE compModule,
DL_MCPWM_COUNTER_COMPARE_LOAD_MODE loadMode
)
Sets up the Counter Compare shadow load mode.
Parameters:
mcpwm Pointer to the register overlay for the peripheral.
compModule Counter compare value module.
loadMode Shadow to active load mode.
This function enables and sets up the counter compare shadow load mode. registers.
function DL_MCPWM_setActionQualifierSWAction
__STATIC_INLINE void DL_MCPWM_setActionQualifierSWAction(
MCPWM_Regs * mcpwm,
DL_MCPWM_ACTION_QUALIFIER_OUTPUT_MODULE mcpwmOutput,
DL_MCPWM_ACTION_QUALIFIER_SW_FORCE_OUTPUT output
)
Set up one time software forced Action qualifier outputs.
Parameters:
mcpwm Pointer to the register overlay for the peripheral.
mcpwmOutput This is the MCPWM pin type.
output This is the action qualifier output.
This function sets up the one time software forced Action Qualifier output on MCPWM A or MCPWMB, depending on the value of mcpwmOutput to a value specified by output.
function DL_MCPWM_forceActionQualifierSWAction
__STATIC_INLINE void DL_MCPWM_forceActionQualifierSWAction(
MCPWM_Regs * mcpwm,
DL_MCPWM_ACTION_QUALIFIER_OUTPUT_MODULE mcpwmOutput
)
Triggers a one time software forced event on Action qualifier.
Parameters:
mcpwm Pointer to the register overlay for the peripheral.
mcpwmOutput This is the MCPWM pin type.
function DL_MCPWM_setActionQualifierShadowLoadMode
__STATIC_INLINE void DL_MCPWM_setActionQualifierShadowLoadMode(
MCPWM_Regs * mcpwm,
DL_MCPWM_ACTION_QUALIFIER_MODULE aqModule,
DL_MCPWM_ACTION_QUALIFIER_LOAD_MODE loadMode
)
Sets the Action Qualifier shadow load mode.
Parameters:
mcpwm Pointer to the register overlay for the peripheral.
aqModule This is the Action Qualifier module value.
loadMode This is the shadow to active load mode.
This function enables and sets the Action Qualifier shadow load mode.
function DL_MCPWM_setActionQualifierActionActive
__STATIC_INLINE void DL_MCPWM_setActionQualifierActionActive(
MCPWM_Regs * mcpwm,
DL_MCPWM_ACTION_QUALIFIER_OUTPUT_MODULE mcpwmOutput,
DL_MCPWM_ACTION_QUALIFIER_OUTPUT output,
DL_MCPWM_ACTION_QUALIFIER_OUTPUT_EVENT event
)
Set up Action qualifier outputs.
Parameters:
mcpwm Pointer to the register overlay for the peripheral.
mcpwmOutput This is the DL_MCPWM pin type.
output This is the Active Action Qualifier output.
event This is the event that causes a change in output.
This function sets up the Action Qualifier output on DL_MCPWM A or DL_MCPWMB, depending on the value of mcpwmOutput, to a value specified by outPut based on the input events - specified by event.
function DL_MCPWM_setActionQualifierActionShadow
__STATIC_INLINE void DL_MCPWM_setActionQualifierActionShadow(
MCPWM_Regs * mcpwm,
DL_MCPWM_ACTION_QUALIFIER_OUTPUT_MODULE mcpwmOutput,
DL_MCPWM_ACTION_QUALIFIER_OUTPUT output,
DL_MCPWM_ACTION_QUALIFIER_OUTPUT_EVENT event
)
Set up Action qualifier outputs in Shadow register.
Parameters:
mcpwm Pointer to the register overlay for the peripheral.
mcpwmOutput This is the DL_MCPWM pin type.
output This is the Active Action Qualifier output.
event This is the event that causes a change in output.
function DL_MCPWM_setActionQualifierActionCompleteActive
__STATIC_INLINE void DL_MCPWM_setActionQualifierActionCompleteActive(
MCPWM_Regs * mcpwm,
DL_MCPWM_ACTION_QUALIFIER_OUTPUT_MODULE mcpwmOutput,
uint16_t action
)
Set up Action qualifier action for all events in one go.
Parameters:
mcpwm Pointer to the register overlay for the peripheral.
mcpwmOutput This is the DL_MCPWM pin type.
action This is the desired action when the specified event occurs
This function sets up the Action Qualifier output on DL_MCPWMA or DL_MCPWMB, depending on the value of mcpwmOutput, to a value specified by action. Valid action param values from different time base counter scenarios should be OR’d together to configure complete action for a pwm output.
function DL_MCPWM_setActionQualifierActionCompleteShadow
__STATIC_INLINE void DL_MCPWM_setActionQualifierActionCompleteShadow(
MCPWM_Regs * mcpwm,
DL_MCPWM_ACTION_QUALIFIER_OUTPUT_MODULE mcpwmOutput,
uint16_t action
)
Set up Action qualifier action for all events in one go in shadow register.
Parameters:
mcpwm Pointer to the register overlay for the peripheral.
mcpwmOutput This is the DL_MCPWM pin type.
action This is the desired action when the specified event occurs
This function sets up the Action Qualifier output on DL_MCPWMA or DL_MCPWMB, depending on the value of mcpwmOutput, to a value specified by action. Valid action param values from different time base counter scenarios should be OR’d together to configure complete action for a pwm output.
function DL_MCPWM_enableGlobalLoad
__STATIC_INLINE void DL_MCPWM_enableGlobalLoad(
MCPWM_Regs * mcpwm
)
Enable Global shadow load mode.
Parameters:
mcpwm Pointer to the register overlay for the peripheral.
This function enables Global shadow to active load mode of registers. The trigger source for loading shadow to active is determined by DL_MCPWM_setGlobalLoadTrigger() function.
function DL_MCPWM_disableGlobalLoad
__STATIC_INLINE void DL_MCPWM_disableGlobalLoad(
MCPWM_Regs * mcpwm
)
Disable Global shadow load mode.
Parameters:
mcpwm Pointer to the register overlay for the peripheral.
This function disables Global shadow to active load mode of registers. Loading shadow to active is determined individually…
function DL_MCPWM_setGlobalLoadTrigger
__STATIC_INLINE void DL_MCPWM_setGlobalLoadTrigger(
MCPWM_Regs * mcpwm,
DL_MCPWM_GLOBAL_LOAD_TRIGGER loadTrigger
)
Set the Global shadow load pulse.
Parameters:
mcpwm Pointer to the register overlay for the peripheral.
loadTrigger This is the pulse that causes global shadow load.
This function sets the pulse that causes Global shadow to active load.
function DL_MCPWM_enableGlobalLoadOneShotMode
__STATIC_INLINE void DL_MCPWM_enableGlobalLoadOneShotMode(
MCPWM_Regs * mcpwm
)
Enable One shot global shadow to active load.
Parameters:
mcpwm Pointer to the register overlay for the peripheral.
This function enables a one time global shadow to active load. Register load happens every time the event set by the DL_MCPWM_setGlobalLoadTrigger() occurs.
function DL_MCPWM_disableGlobalLoadOneShotMode
__STATIC_INLINE void DL_MCPWM_disableGlobalLoadOneShotMode(
MCPWM_Regs * mcpwm
)
Enable continuous global shadow to active load.
Parameters:
mcpwm Pointer to the register overlay for the peripheral.
This function enables global continuous shadow to active load. Register load happens every time the event set by the DL_MCPWM_setGlobalLoadTrigger() occurs.
function DL_MCPWM_setGlobalLoadOneShotLatch
__STATIC_INLINE void DL_MCPWM_setGlobalLoadOneShotLatch(
MCPWM_Regs * mcpwm
)
Set One shot global shadow to active load pulse.
Parameters:
mcpwm Pointer to the register overlay for the peripheral.
This function sets a one time global shadow to active load pulse. The pulse propagates to generate a load signal if any of the events set by DL_MCPWM_setGlobalLoadTrigger() occur.
function DL_MCPWM_clearGlobalLoadOneShotLatch
__STATIC_INLINE void DL_MCPWM_clearGlobalLoadOneShotLatch(
MCPWM_Regs * mcpwm
)
Clears the one shot global shadow to active load latch.
Parameters:
mcpwm Pointer to the register overlay for the peripheral.
This function clears the global load one shot latch. Use DL_MCPWM_setGlobalLoadOneShotLatch to arm the latch.
function DL_MCPWM_getGlobalLoadOneShotLatchStatus
__STATIC_INLINE bool DL_MCPWM_getGlobalLoadOneShotLatchStatus(
MCPWM_Regs * mcpwm
)
Get One shot global shadow to active load pulse Status.
Parameters:
mcpwm Pointer to the register overlay for the peripheral.
Return: Returns global one shot latch status
function DL_MCPWM_forceGlobalLoadOneShotEvent
__STATIC_INLINE void DL_MCPWM_forceGlobalLoadOneShotEvent(
MCPWM_Regs * mcpwm
)
Force a software One shot global shadow to active load pulse.
Parameters:
mcpwm Pointer to the register overlay for the peripheral.
This function forces a software a one time global shadow to active load pulse.
function DL_MCPWM_setDeadBandOutputSwapMode
__STATIC_INLINE void DL_MCPWM_setDeadBandOutputSwapMode(
MCPWM_Regs * mcpwm,
DL_MCPWM_DEADBAND_OUTPUT output,
bool enableSwapMode
)
Sets Dead Band signal output swap mode.
Parameters:
mcpwm Pointer to the register overlay for the peripheral.
output DL_MCPWM Dead Band output.
enableSwapMode This is the output swap mode.
This function sets up the output signal swap mode. For example if the output variable is set to DL_MCPWM_DB_OUTPUT_A and enableSwapMode is TRUE, then the DL_MCPWM A output gets its signal from the DL_MCPWM B signal path. Valid values for the input variables are:
function DL_MCPWM_setDeadBandDelayMode
__STATIC_INLINE void DL_MCPWM_setDeadBandDelayMode(
MCPWM_Regs * mcpwm,
DL_MCPWM_DEADBAND_DELAY_MODE delayMode,
bool enableDelayMode
)
Sets Dead Band signal output mode.
Parameters:
mcpwm Pointer to the register overlay for the peripheral.
delayMode This is the Dead Band delay type.
enableDelayMode This is the dead band delay mode.
This function sets up the dead band delay mode. The delayMode variable determines if the applied delay is Rising Edge or Falling Edge. The enableDelayMode determines if a dead band delay should be applied.
function DL_MCPWM_setDeadBandDelayPolarity
__STATIC_INLINE void DL_MCPWM_setDeadBandDelayPolarity(
MCPWM_Regs * mcpwm,
DL_MCPWM_DEADBAND_DELAY_MODE delayMode,
DL_MCPWM_DEADBAND_POLARITY polarity
)
Sets Dead Band delay polarity.
Parameters:
mcpwm Pointer to the register overlay for the peripheral.
delayMode This is the Dead Band delay type.
polarity This is the polarity of the delayed signal.
This function sets up the polarity as determined by the variable polarity of the Falling Edge or Rising Edge delay depending on the value of delayMode.
function DL_MCPWM_setRisingEdgeDeadBandDelayInput
__STATIC_INLINE void DL_MCPWM_setRisingEdgeDeadBandDelayInput(
MCPWM_Regs * mcpwm,
uint16_t input
)
Sets Rising Edge Dead Band delay input.
Parameters:
mcpwm Pointer to the register overlay for the peripheral.
input This is the input signal to the deadband
This function sets up the rising Edge delay input signal. Valid values for input are:
function DL_MCPWM_setFallingEdgeDeadBandDelayInput
__STATIC_INLINE void DL_MCPWM_setFallingEdgeDeadBandDelayInput(
MCPWM_Regs * mcpwm,
uint16_t input
)
Sets Dead Band delay input.
Parameters:
mcpwm Pointer to the register overlay for the peripheral.
input This is the input signal to the deadband
This function sets up the rising Edge delay input signal. Valid values for input are:
function DL_MCPWM_setRisingEdgeDelayCountShadowLoadMode
__STATIC_INLINE void DL_MCPWM_setRisingEdgeDelayCountShadowLoadMode(
MCPWM_Regs * mcpwm,
DL_MCPWM_RISING_EDGE_DELAY_LOAD_MODE loadMode
)
Set the RED (Rising Edge Delay) shadow load mode.
Parameters:
mcpwm Pointer to the register overlay for the peripheral.
loadMode This is the shadow to active load event
This function sets the Rising Edge Delay register shadow load mode.
function DL_MCPWM_setFallingEdgeDelayCountShadowLoadMode
__STATIC_INLINE void DL_MCPWM_setFallingEdgeDelayCountShadowLoadMode(
MCPWM_Regs * mcpwm,
DL_MCPWM_FALLING_EDGE_DELAY_LOAD_MODE loadMode
)
Set the FED (Falling Edge Delay) shadow load mode.
Parameters:
mcpwm Pointer to the register overlay for the peripheral.
loadMode This is the shadow to active load event
This function sets the Falling Edge Delay register shadow load mode.
function DL_MCPWM_setRisingEdgeDelayCountActive
__STATIC_INLINE void DL_MCPWM_setRisingEdgeDelayCountActive(
MCPWM_Regs * mcpwm,
uint16_t redCount
)
Set DL_MCPWM RED count.
Parameters:
mcpwm Pointer to the register overlay for the peripheral.
redCount This is the RED(Rising Edge Delay) count.
This function sets the RED (Rising Edge Delay) count value, in the active register. The value of redCount should be less than 0x4000U.
function DL_MCPWM_setRisingEdgeDelayCountShadow
__STATIC_INLINE void DL_MCPWM_setRisingEdgeDelayCountShadow(
MCPWM_Regs * mcpwm,
uint16_t redCount
)
Set DL_MCPWM RED count in shadow register.
Parameters:
mcpwm Pointer to the register overlay for the peripheral.
redCount This is the RED(Rising Edge Delay) count.
This function sets the RED (Rising Edge Delay) count value, in the shadow register. The value of redCount should be less than 0x4000U.
function DL_MCPWM_setFallingEdgeDelayCountActive
__STATIC_INLINE void DL_MCPWM_setFallingEdgeDelayCountActive(
MCPWM_Regs * mcpwm,
uint16_t fedCount
)
Set DL_MCPWM FED count.
Parameters:
mcpwm Pointer to the register overlay for the peripheral.
fedCount This is the FED(Falling Edge Delay) count.
This function sets the FED (Falling Edge Delay) count value, in the register. The value of fedCount should be less than 0x4000U.
function DL_MCPWM_setFallingEdgeDelayCountShadow
__STATIC_INLINE void DL_MCPWM_setFallingEdgeDelayCountShadow(
MCPWM_Regs * mcpwm,
uint16_t fedCount
)
Set DL_MCPWM FED count in shadow register.
Parameters:
mcpwm Pointer to the register overlay for the peripheral.
fedCount This is the FED(Falling Edge Delay) count.
This function sets the FED (Falling Edge Delay) count value, in the shadow register. The value of fedCount should be less than 0x4000U.
function DL_MCPWM_enableTripZoneSignals
__STATIC_INLINE void DL_MCPWM_enableTripZoneSignals(
MCPWM_Regs * mcpwm,
uint32_t tzSignal
)
Enables Trip Zone signal.
Parameters:
mcpwm Pointer to the register overlay for the peripheral.
tzSignal This is the Trip Zone signal.
This function enables the Trip Zone signals specified by tzSignal as a source for the Trip Zone module.
function DL_MCPWM_disableTripZoneSignals
__STATIC_INLINE void DL_MCPWM_disableTripZoneSignals(
MCPWM_Regs * mcpwm,
uint32_t tzSignal
)
Disables Trip Zone signal.
Parameters:
mcpwm Pointer to the register overlay for the peripheral.
tzSignal This is the Trip Zone signal.
This function disables the Trip Zone signals specified by tzSignal as a source for the Trip Zone module.
function DL_MCPWM_setTripZoneAction
__STATIC_INLINE void DL_MCPWM_setTripZoneAction(
MCPWM_Regs * mcpwm,
DL_MCPWM_TRIP_ZONE_EVENT tzEvent,
DL_MCPWM_TRIP_ZONE_ACTION tzAction
)
Set Trip Zone Action.
Parameters:
mcpwm Pointer to the register overlay for the peripheral.
tzEvent This is the Trip Zone event type.
tzAction This is the Trip Zone action.
This function sets the Trip Zone Action to be taken when a Trip Zone event occurs.
function DL_MCPWM_selectTripZoneCBCEvent
__STATIC_INLINE void DL_MCPWM_selectTripZoneCBCEvent(
MCPWM_Regs * mcpwm,
DL_MCPWM_TRIP_ZONE_CBC_MODE clearEvent
)
Set the Trip Zone CBC pulse clear event.
Parameters:
mcpwm Pointer to the register overlay for the peripheral.
clearEvent This is the CBC trip zone clear event.
This function set the event which automatically clears the CBC (Cycle by Cycle) latch.
function DL_MCPWM_getTripZoneFlagStatus
__STATIC_INLINE uint32_t DL_MCPWM_getTripZoneFlagStatus(
MCPWM_Regs * mcpwm
)
Gets the Trip Zone flag status.
Parameters:
mcpwm Pointer to the register overlay for the peripheral.
Returns:
Bitwise OR of [DL_MCPWM_TZ_SIGNAL] values.
Return: Status of all the Trip Zone flags
This function returns the specific Trip Zone flag status. The function returns the following values.
DL_MCPWM_TZ_FLAG_CBC_TZ1 - CBC 1 status flag
DL_MCPWM_TZ_FLAG_CBC_TZ2 - CBC 2 status flag
DL_MCPWM_TZ_FLAG_CBC_TZ3 - CBC 3 status flag
DL_MCPWM_TZ_FLAG_CBC_TZ4 - CBC 4 status flag
DL_MCPWM_TZ_FLAG_CBC_TZ5 - CBC 5 status flag
DL_MCPWM_TZ_FLAG_CBC_TZ6 - CBC 6 status flag
DL_MCPWM_TZ_FLAG_CBC_TZ7 - CBC 7 status flag
DL_MCPWM_TZ_FLAG_CBC_TZ8 - CBC 8 status flag
DL_MCPWM_TZ_FLAG_OST_TZ1 - OST 1 status flag
DL_MCPWM_TZ_FLAG_OST_TZ2 - OST 2 status flag
DL_MCPWM_TZ_FLAG_OST_TZ3 - OST 3 status flag
DL_MCPWM_TZ_FLAG_OST_TZ4 - OST 4 status flag
DL_MCPWM_TZ_FLAG_OST_TZ5 - OST 5 status flag
DL_MCPWM_TZ_FLAG_OST_TZ6 - OST 6 status flag
DL_MCPWM_TZ_FLAG_OST_TZ7 - OST 7 status flag
DL_MCPWM_TZ_FLAG_OST_TZ8 - OST 8 status flag
function DL_MCPWM_clearTripZoneFlagStatus
__STATIC_INLINE void DL_MCPWM_clearTripZoneFlagStatus(
MCPWM_Regs * mcpwm,
uint32_t tzFlags
)
Clear the Trip Zone flag.
Parameters:
mcpwm Pointer to the register overlay for the peripheral.
tzFlags This is the CBC flag to be cleared.
This function clears the specific Cycle by Cycle Trip Zone flag. The following are valid values for tzFlags.
DL_MCPWM_TZ_FLAG_CBC_TZ1 - CBC 1 status flag
DL_MCPWM_TZ_FLAG_CBC_TZ2 - CBC 2 status flag
DL_MCPWM_TZ_FLAG_CBC_TZ3 - CBC 3 status flag
DL_MCPWM_TZ_FLAG_CBC_TZ4 - CBC 4 status flag
DL_MCPWM_TZ_FLAG_CBC_TZ5 - CBC 5 status flag
DL_MCPWM_TZ_FLAG_CBC_TZ6 - CBC 6 status flag
DL_MCPWM_TZ_FLAG_CBC_TZ7 - CBC 7 status flag
DL_MCPWM_TZ_FLAG_CBC_TZ8 - CBC 8 status flag
DL_MCPWM_TZ_FLAG_OST_TZ1 - OST 1 status flag
DL_MCPWM_TZ_FLAG_OST_TZ2 - OST 2 status flag
DL_MCPWM_TZ_FLAG_OST_TZ3 - OST 3 status flag
DL_MCPWM_TZ_FLAG_OST_TZ4 - OST 4 status flag
DL_MCPWM_TZ_FLAG_OST_TZ5 - OST 5 status flag
DL_MCPWM_TZ_FLAG_OST_TZ6 - OST 6 status flag
DL_MCPWM_TZ_FLAG_OST_TZ7 - OST 7 status flag
DL_MCPWM_TZ_FLAG_OST_TZ8 - OST 8 status flag
DL_MCPWM_TZ_FLAG_ALL - All Trip Zone Flags
function DL_MCPWM_enableADCTrigger
__STATIC_INLINE void DL_MCPWM_enableADCTrigger(
MCPWM_Regs * mcpwm,
DL_MCPWM_SOC_TYPE adcSOCType
)
Enable ADC SOC event.
Parameters:
mcpwm Pointer to the register overlay for the peripheral.
adcSOCType This is the ADC SOC type.
This function enables the MCPWM module to trigger an ADC SOC event. Valid values for adcSOCType are:
DL_MCPWM_SOC_A - SOC A
DL_MCPWM_SOC_B - SOC B
DL_MCPWM_SOC_C - SOC C
DL_MCPWM_SOC_D - SOC D
function DL_MCPWM_disableADCTrigger
__STATIC_INLINE void DL_MCPWM_disableADCTrigger(
MCPWM_Regs * mcpwm,
DL_MCPWM_SOC_TYPE adcSOCType
)
Disable ADC SOC event.
Parameters:
mcpwm Pointer to the register overlay for the peripheral.
adcSOCType This is the ADC SOC type.
This function enables the MCPWM module to trigger an ADC SOC event. Valid values for adcSOCType are:
DL_MCPWM_SOC_A - SOC A
DL_MCPWM_SOC_B - SOC B
DL_MCPWM_SOC_C - SOC C
DL_MCPWM_SOC_D - SOC D
function DL_MCPWM_setADCTriggerSource
__STATIC_INLINE void DL_MCPWM_setADCTriggerSource(
MCPWM_Regs * mcpwm,
DL_MCPWM_SOC_TYPE adcSOCType,
DL_MCPWM_SOC_SOURCE socSource
)
Sets the DL_MCPWM SOC source.
Parameters:
mcpwm Pointer to the register overlay for the peripheral.
adcSOCType This is the ADC SOC type.
socSource This is the SOC source.
This function sets the MCPWM ADC SOC source.
function DL_MCPWM_setADCTriggerEventPrescale
__STATIC_INLINE void DL_MCPWM_setADCTriggerEventPrescale(
MCPWM_Regs * mcpwm,
DL_MCPWM_SOC_TYPE adcSOCType,
uint16_t preScaleCount
)
Sets the DL_MCPWM SOC event counts.
Parameters:
mcpwm Pointer to the register overlay for the peripheral.
adcSOCType This is the ADC SOC type.
preScaleCount This is the event count number.
This function sets the SOC event count that determines the number of events that have to occur before an SOC is issued.
function DL_MCPWM_getADCTriggerEventCount
__STATIC_INLINE uint16_t DL_MCPWM_getADCTriggerEventCount(
MCPWM_Regs * mcpwm,
DL_MCPWM_SOC_TYPE adcSOCType
)
Get the SOC event count.
Parameters:
mcpwm Pointer to the register overlay for the peripheral.
adcSOCType This is the ADC SOC type.
Return: The occurences of selected events for each SOC.
This function returns the MCPWM SOC event count. Valid values for adcSOCType are:
DL_MCPWM_SOC_A - SOC A
DL_MCPWM_SOC_B - SOC B
DL_MCPWM_SOC_C - SOC C
DL_MCPWM_SOC_D - SOC D
function DL_MCPWM_getADCTriggerFlagStatus
__STATIC_INLINE bool DL_MCPWM_getADCTriggerFlagStatus(
MCPWM_Regs * mcpwm,
DL_MCPWM_SOC_TYPE adcSOCType
)
Return the SOC event status.
Parameters:
mcpwm Pointer to the register overlay for the peripheral.
adcSOCType This is the ADC SOC type.
Return:
The status of each SOC status flags.
true if start of conversion pulse was generated on SOC.
false if no event has occurred.
This function returns the MCPWM SOC event count. Valid values for adcSOCType are:
DL_MCPWM_SOC_A - SOC A
DL_MCPWM_SOC_B - SOC B
DL_MCPWM_SOC_C - SOC C
DL_MCPWM_SOC_D - SOC D
function DL_MCPWM_clearADCTriggerFlag
__STATIC_INLINE void DL_MCPWM_clearADCTriggerFlag(
MCPWM_Regs * mcpwm,
DL_MCPWM_SOC_TYPE adcSOCType
)
Clear SOC flag.
Parameters:
mcpwm Pointer to the register overlay for the peripheral.
adcSOCType This is the ADC SOC type.
This function clears the MCPWM SOC flag. Valid values for adcSOCType are:
DL_MCPWM_SOC_A - SOC A
DL_MCPWM_SOC_B - SOC B
DL_MCPWM_SOC_C - SOC C
DL_MCPWM_SOC_D - SOC D
function DL_MCPWM_setEventTriggerSource
__STATIC_INLINE void DL_MCPWM_setEventTriggerSource(
MCPWM_Regs * mcpwm,
DL_MCPWM_EVENT_TRIGGER_TYPE evtTrigType,
DL_MCPWM_EVENT_TRIGGER_SOURCE evtTrigSource
)
Sets the DL_MCPWM Event Trigger source.
Parameters:
mcpwm Pointer to the register overlay for the peripheral.
evtTrigType This is the Event Trigger type.
evtTrigSource This is the EVT source.
This function sets the MCPWM Event Trigger source.
function DL_MCPWM_setEventTriggerEventPrescale
__STATIC_INLINE void DL_MCPWM_setEventTriggerEventPrescale(
MCPWM_Regs * mcpwm,
DL_MCPWM_EVENT_TRIGGER_TYPE evtTrigType,
uint16_t preScaleCount
)
Sets the MCPWM Event Trigger event counts.
Parameters:
mcpwm Pointer to the register overlay for the peripheral.
evtTrigType This is the Event Trigger type.
preScaleCount This is the event count number.
This function sets the event trigger count that determines the number of events that have to occur before an event trigger is issued.
function DL_MCPWM_getEventTriggerEventCount
__STATIC_INLINE uint16_t DL_MCPWM_getEventTriggerEventCount(
MCPWM_Regs * mcpwm,
DL_MCPWM_EVENT_TRIGGER_TYPE evtTrigType
)
Get the Event Trigger event count.
Parameters:
mcpwm Pointer to the register overlay for the peripheral.
evtTrigType This is the Event Trigger type.
Return: The number of occurences of each event trigger.
This function returns the MCPWM Event trigger event count. Valid values for evtTrigType are:
evtTrigType
DL_MCPWM_ET_1 - EVT 1
DL_MCPWM_ET_2 - EVT 2
function DL_MCPWM_enableInterrupt
__STATIC_INLINE void DL_MCPWM_enableInterrupt(
MCPWM_Regs * mcpwm,
uint16_t intFlags
)
Enables interrupt source.
Parameters:
mcpwm Pointer to the register overlay for the peripheral.
intFlags This is the interrupt source to be enabled.
This function sets and enables MCPWM interrupt source. The following are valid interrupt sources.
DL_MCPWM_INT_TZ_CBC - Interrupt Source is Trip Zone CBC signal
DL_MCPWM_INT_TZ_OST - Interrupt Source is Trip Zone OST signal
DL_MCPWM_INT_ET_1 - Interrupt Source is Event Trigger 1 signal
DL_MCPWM_INT_ET_2 - Interrupt Source is Event Trigger 2 signal
DL_MCPWM_INT_TBCTR_OVF - Counter overflow generates interrupt
DL_MCPWM_INT_SOURCE_ALL - All Interrupt Sources
function DL_MCPWM_disableInterrupt
__STATIC_INLINE void DL_MCPWM_disableInterrupt(
MCPWM_Regs * mcpwm,
uint16_t intFlags
)
Disables interrupt source.
Parameters:
mcpwm Pointer to the register overlay for the peripheral.
intFlags This is the interrupt source to be enabled.
This function sets and enables MCPWM interrupt source. The following are valid interrupt sources.
DL_MCPWM_INT_TZ_CBC - Interrupt Source is Trip Zone CBC signal
DL_MCPWM_INT_TZ_OST - Interrupt Source is Trip Zone OST signal
DL_MCPWM_INT_ET_1 - Interrupt Source is Event Trigger 1 signal
DL_MCPWM_INT_ET_2 - Interrupt Source is Event Trigger 2 signal
DL_MCPWM_INT_TBCTR_OVF - Counter overflow generates interrupt
DL_MCPWM_INT_SOURCE_ALL - All Interrupt Sources
function DL_MCPWM_getInterruptSource
__STATIC_INLINE uint16_t DL_MCPWM_getInterruptSource(
MCPWM_Regs * mcpwm
)
Returns the interrupt flag.
Parameters:
mcpwm Pointer to the register overlay for the peripheral.
Return: Returns the status of each MCPWM interrupt.
This function returns the MCPWM interrupt flag. The following are valid interrupt sources corresponding to the MCPWM interrupt flag. Returns the MCPWM interrupt that has occurred. The following are valid return values.
DL_MCPWM_INT_TZ_CBC - Interrupt Source is Trip Zone CBC signal
DL_MCPWM_INT_TZ_OST - Interrupt Source is Trip Zone OST signal
DL_MCPWM_INT_ET_1 - Interrupt Source is Event Trigger 1 signal
DL_MCPWM_INT_ET_2 - Interrupt Source is Event Trigger 2 signal
DL_MCPWM_INT_TBCTR_OVF - Counter overflow generates interrupt
DL_MCPWM_INT_SOURCE_ALL - All Interrupt Sources
function DL_MCPWM_getGlobalInterruptStatus
__STATIC_INLINE bool DL_MCPWM_getGlobalInterruptStatus(
MCPWM_Regs * mcpwm
)
Returns the Global interrupt flag.
Parameters:
mcpwm Pointer to the register overlay for the peripheral.
Return: The status of the global interrupt flag.
This function returns the DL_MCPWM Global interrupt flag.
function DL_MCPWM_clearInterrupt
__STATIC_INLINE void DL_MCPWM_clearInterrupt(
MCPWM_Regs * mcpwm,
uint16_t intFlags
)
Clears interrupt flag.
Parameters:
mcpwm Pointer to the register overlay for the peripheral.
intFlags This is the interrupt source.
This function clears MCPWM interrupt flags. The following are valid interrupt sources.
DL_MCPWM_INT_TZ_CBC - Interrupt Source is Trip Zone CBC signal
DL_MCPWM_INT_TZ_OST - Interrupt Source is Trip Zone OST signal
DL_MCPWM_INT_ET_1 - Interrupt Source is Event Trigger 1 signal
DL_MCPWM_INT_ET_2 - Interrupt Source is Event Trigger 2 signal
DL_MCPWM_INT_TBCTR_OVF - Counter overflow generates interrupt
DL_MCPWM_INT_SOURCE_ALL - All Interrupt Sources-
function DL_MCPWM_clearGlobalInterrupt
__STATIC_INLINE void DL_MCPWM_clearGlobalInterrupt(
MCPWM_Regs * mcpwm
)
Clears global interrupt flag.
Parameters:
mcpwm Pointer to the register overlay for the peripheral.
This function clears the global interrupt bit.
function DL_MCPWM_forceInterrupt
__STATIC_INLINE void DL_MCPWM_forceInterrupt(
MCPWM_Regs * mcpwm,
uint16_t intFlags
)
Forces interrupt source.
Parameters:
mcpwm Pointer to the register overlay for the peripheral.
intFlags This is the interrupt source.
This function forces and enables MCPWM interrupt source. The following are valid interrupt sources.
DL_MCPWM_INT_TZ_CBC - Interrupt Source is Trip Zone CBC signal
DL_MCPWM_INT_TZ_OST - Interrupt Source is Trip Zone OST signal
DL_MCPWM_INT_ET_1 - Interrupt Source is Event Trigger 1 signal
DL_MCPWM_INT_ET_2 - Interrupt Source is Event Trigger 2 signal
DL_MCPWM_INT_TBCTR_OVF - Counter overflow generates interrupt
DL_MCPWM_INT_SOURCE_ALL - All Interrupt Sources-
function DL_MCPWM_enableTBCLK
__STATIC_INLINE void DL_MCPWM_enableTBCLK(
void
)
Enables TBCLK for MCPWM.
This function enables TBCLK for MCPWM.
function DL_MCPWM_disableTBCLK
__STATIC_INLINE void DL_MCPWM_disableTBCLK(
void
)
Disables TBCLK for MCPWM.
This function disables TBCLK for MCPWM.
function DL_MCPWM_setEmulationMode
void DL_MCPWM_setEmulationMode(
MCPWM_Regs * mcpwm,
DL_MCPWM_EMULATION_MODE emulationMode
)
Set emulation mode.
Parameters:
mcpwm Pointer to the register overlay for the peripheral.
emulationMode This is the emulation mode.
This function sets the emulation behaviours of the time base counter. Valid values for emulationMode are:
DL_MCPWM_EMULATION_STOP_AFTER_NEXT_TB - Stop after next Time Base counter increment or decrement.
DL_MCPWM_EMULATION_STOP_AFTER_FULL_CYCLE - Stop when counter completes whole cycle.
DL_MCPWM_EMULATION_FREE_RUN - Free run.
function DL_MCPWM_initParamsSetDefault
void DL_MCPWM_initParamsSetDefault(
DL_MCPWM_Config * config
)
Initializes the MCPWM configuration parameters.
Parameters:
config Pointer to the MCPWM configuration structure.
This function initializes all the parameters of the MCPWM configuration structure to their default values.
function DL_MCPWM_init
void DL_MCPWM_init(
MCPWM_Regs * mcpwm,
DL_MCPWM_Config * config
)
Initializes the MCPWM module.
Parameters:
mcpwm Pointer to the MCPWM register overlay
config Pointer to the MCPWM configuration structure
This function configures the MCPWM module according to the provided configuration.
function DL_MCPWM_configureTimeBase
void DL_MCPWM_configureTimeBase(
MCPWM_Regs * mcpwm,
DL_MCPWM_TimeBaseConfig * timeBaseConfig
)
Configures the MCPWM time base.
Parameters:
mcpwm Pointer to the MCPWM register overlay.
timeBaseConfig Pointer to the time base configuration structure.
This function sets up the time base submodule of the MCPWM module according to the provided configuration.
function DL_MCPWM_configureCounterCompare
void DL_MCPWM_configureCounterCompare(
MCPWM_Regs * mcpwm,
DL_MCPWM_CounterCompareConfig * counterCompareConfig
)
Configures the MCPWM counter compare.
Parameters:
mcpwm Pointer to the MCPWM register overlay.
counterCompareConfig Pointer to the counter compare configuration structure.
This function sets up the counter compare submodule of the MCPWM according to the provided configuration.
function DL_MCPWM_configureActionQualifierActions
void DL_MCPWM_configureActionQualifierActions(
MCPWM_Regs * mcpwm,
DL_MCPWM_ACTION_QUALIFIER_OUTPUT_MODULE output,
DL_MCPWM_Actions * aqPwm
)
Configures the MCPWM action qualifier actions.
Parameters:
mcpwm Pointer to the MCPWM register overlay.
output Action qualifier output module DL_MCPWM_ACTION_QUALIFIER_OUTPUT_MODULE
aqPwm Pointer to DL_MCPWM_Actions structure
This function sets up the actions in the action qualifier submodule of the MCPWM according to the provided configuration.
function DL_MCPWM_configureDeadBand
void DL_MCPWM_configureDeadBand(
MCPWM_Regs * mcpwm,
DL_MCPWM_DeadBandConfig * deadBandConfig
)
Configures the MCPWM dead-band.
Parameters:
mcpwm Pointer to the MCPWM register overlay.
deadBandConfig Pointer to the dead-band configuration structure.
This function sets up the dead-band submodule of the MCPWM according to the provided configuration.
function DL_MCPWM_configureTripZone
void DL_MCPWM_configureTripZone(
MCPWM_Regs * mcpwm,
DL_MCPWM_TripZoneConfig * config
)
Configures the MCPWM trip zone.
Parameters:
mcpwm Pointer to the MCPWM register overlay.
config Pointer to the trip zone configuration structure.
This function sets up the trip zone submodule of the MCPWM according to the provided configuration.
function DL_MCPWM_configureEventTrigger
void DL_MCPWM_configureEventTrigger(
MCPWM_Regs * mcpwm,
DL_MCPWM_EventTriggerConfig * eventTriggerConfig
)
Configures the MCPWM event trigger.
Parameters:
mcpwm Pointer to the MCPWM register overlay.
eventTriggerConfig Pointer to the event trigger configuration structure.
This function sets up the event trigger submodule of the MCPWM according to the provided configuration.
function DL_MCPWM_configureLoadMode
void DL_MCPWM_configureLoadMode(
MCPWM_Regs * mcpwm,
DL_MCPWM_LoadModeConfig * loadModeConfig
)
Configures the MCPWM load modes.
Parameters:
mcpwm Pointer to the MCPWM register overlay.
loadModeConfig Pointer to the load mode configuration structure.
This function sets up the global load feature of the MCPWM according to the provided configuration.
Macros Documentation
define DL_MCPWM_TIME_BASE_STATUS_COUNT_UP
#define DL_MCPWM_TIME_BASE_STATUS_COUNT_UP 1U
Time base counter is counting up.
define DL_MCPWM_TIME_BASE_STATUS_COUNT_DOWN
#define DL_MCPWM_TIME_BASE_STATUS_COUNT_DOWN 0U
Time base counter is counting down.
define DL_MCPWM_DB_INPUT_PWMA
#define DL_MCPWM_DB_INPUT_PWMA 0U
PWMA signal is used as input to RED/FED.
define DL_MCPWM_DB_INPUT_PWMB
#define DL_MCPWM_DB_INPUT_PWMB 1U
PWMB signal is used as input to RED/FED.
define DL_MCPWM_DB_INPUT_DB_RED
#define DL_MCPWM_DB_INPUT_DB_RED 2U
RED output signal is used as input to FED.
define DL_MCPWM_TZ_SIGNAL_CBC1
#define DL_MCPWM_TZ_SIGNAL_CBC1 MCPWM_TZSEL_CBC1_MASK
TZ1 Cycle By Cycle.
define DL_MCPWM_TZ_SIGNAL_CBC2
#define DL_MCPWM_TZ_SIGNAL_CBC2 MCPWM_TZSEL_CBC2_MASK
TZ2 Cycle By Cycle.
define DL_MCPWM_TZ_SIGNAL_CBC3
#define DL_MCPWM_TZ_SIGNAL_CBC3 MCPWM_TZSEL_CBC3_MASK
TZ3 Cycle By Cycle.
define DL_MCPWM_TZ_SIGNAL_CBC4
#define DL_MCPWM_TZ_SIGNAL_CBC4 MCPWM_TZSEL_CBC4_MASK
TZ4 Cycle By Cycle.
define DL_MCPWM_TZ_SIGNAL_CBC5
#define DL_MCPWM_TZ_SIGNAL_CBC5 MCPWM_TZSEL_CBC5_MASK
TZ5 Cycle By Cycle.
define DL_MCPWM_TZ_SIGNAL_CBC6
#define DL_MCPWM_TZ_SIGNAL_CBC6 MCPWM_TZSEL_CBC6_MASK
TZ6 Cycle By Cycle.
define DL_MCPWM_TZ_SIGNAL_CBC7
#define DL_MCPWM_TZ_SIGNAL_CBC7 MCPWM_TZSEL_CBC7_MASK
TZ7 Cycle By Cycle.
define DL_MCPWM_TZ_SIGNAL_CBC8
#define DL_MCPWM_TZ_SIGNAL_CBC8 MCPWM_TZSEL_CBC8_MASK
TZ8 Cycle By Cycle.
define DL_MCPWM_TZ_SIGNAL_OST1
#define DL_MCPWM_TZ_SIGNAL_OST1 MCPWM_TZSEL_OST1_MASK
One-shot TZ1.
define DL_MCPWM_TZ_SIGNAL_OST2
#define DL_MCPWM_TZ_SIGNAL_OST2 MCPWM_TZSEL_OST2_MASK
One-shot TZ2.
define DL_MCPWM_TZ_SIGNAL_OST3
#define DL_MCPWM_TZ_SIGNAL_OST3 MCPWM_TZSEL_OST3_MASK
One-shot TZ3.
define DL_MCPWM_TZ_SIGNAL_OST4
#define DL_MCPWM_TZ_SIGNAL_OST4 MCPWM_TZSEL_OST4_MASK
One-shot TZ4.
define DL_MCPWM_TZ_SIGNAL_OST5
#define DL_MCPWM_TZ_SIGNAL_OST5 MCPWM_TZSEL_OST5_MASK
One-shot TZ5.
define DL_MCPWM_TZ_SIGNAL_OST6
#define DL_MCPWM_TZ_SIGNAL_OST6 MCPWM_TZSEL_OST6_MASK
One-shot TZ6.
define DL_MCPWM_TZ_SIGNAL_OST7
#define DL_MCPWM_TZ_SIGNAL_OST7 MCPWM_TZSEL_OST7_MASK
One-shot TZ7.
define DL_MCPWM_TZ_SIGNAL_OST8
#define DL_MCPWM_TZ_SIGNAL_OST8 MCPWM_TZSEL_OST8_MASK
One-shot TZ8.
define DL_MCPWM_TZ_FLAG_CBC_TZ1
#define DL_MCPWM_TZ_FLAG_CBC_TZ1 MCPWM_TZCBCOSTFLAG_CBC1_MASK
CBC flag 1.
define DL_MCPWM_TZ_FLAG_CBC_TZ2
#define DL_MCPWM_TZ_FLAG_CBC_TZ2 MCPWM_TZCBCOSTFLAG_CBC2_MASK
CBC flag 2.
define DL_MCPWM_TZ_FLAG_CBC_TZ3
#define DL_MCPWM_TZ_FLAG_CBC_TZ3 MCPWM_TZCBCOSTFLAG_CBC3_MASK
CBC flag 3.
define DL_MCPWM_TZ_FLAG_CBC_TZ4
#define DL_MCPWM_TZ_FLAG_CBC_TZ4 MCPWM_TZCBCOSTFLAG_CBC4_MASK
CBC flag 4.
define DL_MCPWM_TZ_FLAG_CBC_TZ5
#define DL_MCPWM_TZ_FLAG_CBC_TZ5 MCPWM_TZCBCOSTFLAG_CBC5_MASK
CBC flag 5.
define DL_MCPWM_TZ_FLAG_CBC_TZ6
#define DL_MCPWM_TZ_FLAG_CBC_TZ6 MCPWM_TZCBCOSTFLAG_CBC6_MASK
CBC flag 6.
define DL_MCPWM_TZ_FLAG_CBC_TZ7
#define DL_MCPWM_TZ_FLAG_CBC_TZ7 MCPWM_TZCBCOSTFLAG_CBC7_MASK
CBC flag 7.
define DL_MCPWM_TZ_FLAG_CBC_TZ8
#define DL_MCPWM_TZ_FLAG_CBC_TZ8 MCPWM_TZCBCOSTFLAG_CBC8_MASK
CBC flag 8.
define DL_MCPWM_TZ_FLAG_OST_TZ1
#define DL_MCPWM_TZ_FLAG_OST_TZ1 MCPWM_TZCBCOSTFLAG_OST1_MASK
OST flag 1.
define DL_MCPWM_TZ_FLAG_OST_TZ2
#define DL_MCPWM_TZ_FLAG_OST_TZ2 MCPWM_TZCBCOSTFLAG_OST2_MASK
OST flag 2.
define DL_MCPWM_TZ_FLAG_OST_TZ3
#define DL_MCPWM_TZ_FLAG_OST_TZ3 MCPWM_TZCBCOSTFLAG_OST3_MASK
OST flag 3.
define DL_MCPWM_TZ_FLAG_OST_TZ4
#define DL_MCPWM_TZ_FLAG_OST_TZ4 MCPWM_TZCBCOSTFLAG_OST4_MASK
OST flag 4.
define DL_MCPWM_TZ_FLAG_OST_TZ5
#define DL_MCPWM_TZ_FLAG_OST_TZ5 MCPWM_TZCBCOSTFLAG_OST5_MASK
OST flag 5.
define DL_MCPWM_TZ_FLAG_OST_TZ6
#define DL_MCPWM_TZ_FLAG_OST_TZ6 MCPWM_TZCBCOSTFLAG_OST6_MASK
OST flag 6.
define DL_MCPWM_TZ_FLAG_OST_TZ7
#define DL_MCPWM_TZ_FLAG_OST_TZ7 MCPWM_TZCBCOSTFLAG_OST7_MASK
OST flag 7.
define DL_MCPWM_TZ_FLAG_OST_TZ8
#define DL_MCPWM_TZ_FLAG_OST_TZ8 MCPWM_TZCBCOSTFLAG_OST8_MASK
OST flag 8.
define DL_MCPWM_TZ_FLAG_ALL
#define DL_MCPWM_TZ_FLAG_ALL (MCPWM_TZCBCOSTFLAG_CBC1_MASK | MCPWM_TZCBCOSTFLAG_CBC2_MASK | MCPWM_TZCBCOSTFLAG_CBC3_MASK | \
MCPWM_TZCBCOSTFLAG_CBC4_MASK | MCPWM_TZCBCOSTFLAG_CBC5_MASK | MCPWM_TZCBCOSTFLAG_CBC6_MASK | \
MCPWM_TZCBCOSTFLAG_CBC7_MASK | MCPWM_TZCBCOSTFLAG_CBC8_MASK | MCPWM_TZCBCOSTFLAG_OST1_MASK | \
MCPWM_TZCBCOSTFLAG_OST2_MASK | MCPWM_TZCBCOSTFLAG_OST3_MASK | MCPWM_TZCBCOSTFLAG_OST4_MASK | \
MCPWM_TZCBCOSTFLAG_OST5_MASK | MCPWM_TZCBCOSTFLAG_OST6_MASK | MCPWM_TZCBCOSTFLAG_OST7_MASK | \
MCPWM_TZCBCOSTFLAG_OST8_MASK)
All Trip Zone flags.
define DL_MCPWM_INT_TZ_CBC
#define DL_MCPWM_INT_TZ_CBC MCPWM_INTFLAG_CBC_MASK
Interrupt Source is Trip Zone CBC signal.
define DL_MCPWM_INT_TZ_OST
#define DL_MCPWM_INT_TZ_OST MCPWM_INTFLAG_OST_MASK
Interrupt Source is Trip Zone OST signal.
define DL_MCPWM_INT_ET_1
#define DL_MCPWM_INT_ET_1 MCPWM_INTFLAG_ET1_MASK
Interrupt Source is ET1 signal.
define DL_MCPWM_INT_ET_2
#define DL_MCPWM_INT_ET_2 MCPWM_INTFLAG_ET2_MASK
Interrupt Source is ET2 signal.
define DL_MCPWM_INT_TBCTR_OVF
#define DL_MCPWM_INT_TBCTR_OVF MCPWM_INTFLAG_CNT_OVF_MASK
Interrupt Source is Counter Overflow signal.
define DL_MCPWM_INT_SOURCE_ALL
#define DL_MCPWM_INT_SOURCE_ALL (DL_MCPWM_INT_TZ_CBC | DL_MCPWM_INT_TZ_OST | DL_MCPWM_INT_ET_1 | DL_MCPWM_INT_ET_2 | DL_MCPWM_INT_TBCTR_OVF)
All Interrupt Sources.