29 #define EPWM_CHANNEL_NUM (6U) 30 #define EPWM_CH_0_MASK (0x1U) 31 #define EPWM_CH_1_MASK (0x2U) 32 #define EPWM_CH_2_MASK (0x4U) 33 #define EPWM_CH_3_MASK (0x8U) 34 #define EPWM_CH_4_MASK (0x10U) 35 #define EPWM_CH_5_MASK (0x20U) 40 #define EPWM_UP_COUNTER (0U) 41 #define EPWM_DOWN_COUNTER (1U) 42 #define EPWM_UP_DOWN_COUNTER (2U) 47 #define EPWM_EDGE_ALIGNED (1U) 48 #define EPWM_CENTER_ALIGNED (2U) 53 #define EPWM_OUTPUT_NOTHING (0U) 54 #define EPWM_OUTPUT_LOW (1U) 55 #define EPWM_OUTPUT_HIGH (2U) 56 #define EPWM_OUTPUT_TOGGLE (3U) 61 #define EPWM_SSCTL_SSRC_EPWM0 (0U<<EPWM_SSCTL_SSRC_Pos) 62 #define EPWM_SSCTL_SSRC_EPWM1 (1U<<EPWM_SSCTL_SSRC_Pos) 63 #define EPWM_SSCTL_SSRC_BPWM0 (2UL<<EPWM_SSCTL_SSRC_Pos) 64 #define EPWM_SSCTL_SSRC_BPWM1 (3UL<<EPWM_SSCTL_SSRC_Pos) 69 #define EPWM_TRG_ADC_EVEN_ZERO (0U) 70 #define EPWM_TRG_ADC_EVEN_PERIOD (1U) 71 #define EPWM_TRG_ADC_EVEN_ZERO_PERIOD (2U) 72 #define EPWM_TRG_ADC_EVEN_COMPARE_UP (3U) 73 #define EPWM_TRG_ADC_EVEN_COMPARE_DOWN (4U) 74 #define EPWM_TRG_ADC_ODD_ZERO (5U) 75 #define EPWM_TRG_ADC_ODD_PERIOD (6U) 76 #define EPWM_TRG_ADC_ODD_ZERO_PERIOD (7U) 77 #define EPWM_TRG_ADC_ODD_COMPARE_UP (8U) 78 #define EPWM_TRG_ADC_ODD_COMPARE_DOWN (9U) 79 #define EPWM_TRG_ADC_CH_0_FREE_CMP_UP (10U) 80 #define EPWM_TRG_ADC_CH_0_FREE_CMP_DOWN (11U) 81 #define EPWM_TRG_ADC_CH_2_FREE_CMP_UP (12U) 82 #define EPWM_TRG_ADC_CH_2_FREE_CMP_DOWN (13U) 83 #define EPWM_TRG_ADC_CH_4_FREE_CMP_UP (14U) 84 #define EPWM_TRG_ADC_CH_4_FREE_CMP_DOWN (15U) 86 #define EPWM_TRIGGER_DAC_ZERO (0x1U) 87 #define EPWM_TRIGGER_DAC_PERIOD (0x100U) 88 #define EPWM_TRIGGER_DAC_COMPARE_UP (0x10000U) 89 #define EPWM_TRIGGER_DAC_COMPARE_DOWN (0x1000000U) 94 #define EPWM_FB_EDGE_ACMP0 (EPWM_BRKCTL0_1_CPO0EBEN_Msk) 95 #define EPWM_FB_EDGE_ACMP1 (EPWM_BRKCTL0_1_CPO1EBEN_Msk) 96 #define EPWM_FB_EDGE_BKP0 (EPWM_BRKCTL0_1_BRKP0EEN_Msk) 97 #define EPWM_FB_EDGE_BKP1 (EPWM_BRKCTL0_1_BRKP1EEN_Msk) 98 #define EPWM_FB_EDGE_ADCRM (EPWM_BRKCTL0_1_EADCEBEN_Msk) 99 #define EPWM_FB_EDGE_SYS_CSS (EPWM_BRKCTL0_1_SYSEBEN_Msk | EPWM_FAILBRK_CSSBRKEN_Msk) 100 #define EPWM_FB_EDGE_SYS_BOD (EPWM_BRKCTL0_1_SYSEBEN_Msk | EPWM_FAILBRK_BODBRKEN_Msk) 101 #define EPWM_FB_EDGE_SYS_RAM (EPWM_BRKCTL0_1_SYSEBEN_Msk | EPWM_FAILBRK_RAMBRKEN_Msk) 102 #define EPWM_FB_EDGE_SYS_COR (EPWM_BRKCTL0_1_SYSEBEN_Msk | EPWM_FAILBRK_CORBRKEN_Msk) 104 #define EPWM_FB_LEVEL_ACMP0 (EPWM_BRKCTL0_1_CPO0LBEN_Msk) 105 #define EPWM_FB_LEVEL_ACMP1 (EPWM_BRKCTL0_1_CPO1LBEN_Msk) 106 #define EPWM_FB_LEVEL_BKP0 (EPWM_BRKCTL0_1_BRKP0LEN_Msk) 107 #define EPWM_FB_LEVEL_BKP1 (EPWM_BRKCTL0_1_BRKP1LEN_Msk) 108 #define EPWM_FB_LEVEL_ADCRM (EPWM_BRKCTL0_1_EADCLBEN_Msk) 109 #define EPWM_FB_LEVEL_SYS_CSS (EPWM_BRKCTL0_1_SYSLBEN_Msk | EPWM_FAILBRK_CSSBRKEN_Msk) 110 #define EPWM_FB_LEVEL_SYS_BOD (EPWM_BRKCTL0_1_SYSLBEN_Msk | EPWM_FAILBRK_BODBRKEN_Msk) 111 #define EPWM_FB_LEVEL_SYS_RAM (EPWM_BRKCTL0_1_SYSLBEN_Msk | EPWM_FAILBRK_RAMBRKEN_Msk) 112 #define EPWM_FB_LEVEL_SYS_COR (EPWM_BRKCTL0_1_SYSLBEN_Msk | EPWM_FAILBRK_CORBRKEN_Msk) 114 #define EPWM_FB_EDGE (0U) 115 #define EPWM_FB_LEVEL (8U) 120 #define EPWM_LEBCTL_TRGTYPE_RISING (0U<<EPWM_LEBCTL_TRGTYPE_Pos) 121 #define EPWM_LEBCTL_TRGTYPE_FALLING (1U<<EPWM_LEBCTL_TRGTYPE_Pos) 122 #define EPWM_LEBCTL_TRGTYPE_RISING_OR_FALLING (2U<<EPWM_LEBCTL_TRGTYPE_Pos) 123 #define EPWM_LEBCTL_SRCEN0 (EPWM_LEBCTL_SRCEN0_Msk) 124 #define EPWM_LEBCTL_SRCEN2 (EPWM_LEBCTL_SRCEN2_Msk) 125 #define EPWM_LEBCTL_SRCEN4 (EPWM_LEBCTL_SRCEN4_Msk) 126 #define EPWM_LEBCTL_SRCEN0_2 (EPWM_LEBCTL_SRCEN0_Msk|EPWM_LEBCTL_SRCEN2_Msk) 127 #define EPWM_LEBCTL_SRCEN0_4 (EPWM_LEBCTL_SRCEN0_Msk|EPWM_LEBCTL_SRCEN4_Msk) 128 #define EPWM_LEBCTL_SRCEN2_4 (EPWM_LEBCTL_SRCEN2_Msk|EPWM_LEBCTL_SRCEN4_Msk) 129 #define EPWM_LEBCTL_SRCEN0_2_4 (EPWM_LEBCTL_SRCEN0_Msk|EPWM_LEBCTL_SRCEN2_Msk|EPWM_LEBCTL_SRCEN4_Msk) 134 #define EPWM_CAPTURE_INT_RISING_LATCH (1U) 135 #define EPWM_CAPTURE_INT_FALLING_LATCH (0x100U) 137 #define EPWM_CAPTURE_PDMA_RISING_LATCH (0x2U) 138 #define EPWM_CAPTURE_PDMA_FALLING_LATCH (0x4U) 139 #define EPWM_CAPTURE_PDMA_RISING_FALLING_LATCH (0x6U) 144 #define EPWM_DUTY_INT_DOWN_COUNT_MATCH_CMP (1U << EPWM_INTEN0_CMPDIEN0_Pos) 145 #define EPWM_DUTY_INT_UP_COUNT_MATCH_CMP (1U << EPWM_INTEN0_CMPUIEN0_Pos) 150 #define EPWM_IFA_ZERO_POINT (0U) 151 #define EPWM_IFA_PERIOD_POINT (1U) 152 #define EPWM_IFA_COMPARE_UP_COUNT_POINT (2U) 153 #define EPWM_IFA_COMPARE_DOWN_COUNT_POINT (3U) 158 #define EPWM_LOAD_MODE_IMMEDIATE (1U << EPWM_CTL0_IMMLDEN0_Pos) 159 #define EPWM_LOAD_MODE_WINDOW (1U << EPWM_CTL0_WINLDEN0_Pos) 160 #define EPWM_LOAD_MODE_CENTER (1U << EPWM_CTL0_CTRLD0_Pos) 165 #define EPWM_SYNC_OUT_FROM_SYNCIN_SWSYNC (0U) 166 #define EPWM_SYNC_OUT_FROM_COUNT_TO_ZERO (1U) 167 #define EPWM_SYNC_OUT_FROM_COUNT_TO_COMPARATOR (2U) 168 #define EPWM_SYNC_OUT_DISABLE (3U) 169 #define EPWM_PHS_DIR_DECREMENT (0U) 170 #define EPWM_PHS_DIR_INCREMENT (1U) 175 #define EPWM_NF_CLK_DIV_1 (0U) 176 #define EPWM_NF_CLK_DIV_2 (1U) 177 #define EPWM_NF_CLK_DIV_4 (2U) 178 #define EPWM_NF_CLK_DIV_8 (3U) 179 #define EPWM_NF_CLK_DIV_16 (4U) 180 #define EPWM_NF_CLK_DIV_32 (5U) 181 #define EPWM_NF_CLK_DIV_64 (6U) 182 #define EPWM_NF_CLK_DIV_128 (7U) 187 #define EPWM_CLKSRC_EPWM_CLK (0U) 188 #define EPWM_CLKSRC_TIMER0 (1U) 189 #define EPWM_CLKSRC_TIMER1 (2U) 190 #define EPWM_CLKSRC_TIMER2 (3U) 191 #define EPWM_CLKSRC_TIMER3 (4U) 196 #define EPWM_FDCTL_FDCKSEL_CLK_DIV_1 (0UL << EPWM_FDCTL0_FDCKSEL_Pos) 197 #define EPWM_FDCTL_FDCKSEL_CLK_DIV_2 (1UL << EPWM_FDCTL0_FDCKSEL_Pos) 198 #define EPWM_FDCTL_FDCKSEL_CLK_DIV_4 (2UL << EPWM_FDCTL0_FDCKSEL_Pos) 199 #define EPWM_FDCTL_FDCKSEL_CLK_DIV_8 (3UL << EPWM_FDCTL0_FDCKSEL_Pos) 216 #define EPWM_ENABLE_COMPLEMENTARY_MODE(epwm) ((epwm)->CTL1 = (epwm)->CTL1 | (0x7ul<<EPWM_CTL1_OUTMODE0_Pos)) 225 #define EPWM_DISABLE_COMPLEMENTARY_MODE(epwm) ((epwm)->CTL1 = (epwm)->CTL1 & ~(0x7ul<<EPWM_CTL1_OUTMODE0_Pos)) 234 #define EPWM_ENABLE_GROUP_MODE(epwm) ((epwm)->CTL0 = (epwm)->CTL0 | EPWM_CTL0_GROUPEN_Msk) 243 #define EPWM_DISABLE_GROUP_MODE(epwm) ((epwm)->CTL0 = (epwm)->CTL0 & ~EPWM_CTL0_GROUPEN_Msk) 259 #define EPWM_ENABLE_TIMER_SYNC(epwm, u32ChannelMask, u32SyncSrc) ((epwm)->SSCTL = ((epwm)->SSCTL & ~EPWM_SSCTL_SSRC_Msk) | (u32SyncSrc) | (u32ChannelMask)) 270 #define EPWM_DISABLE_TIMER_SYNC(epwm, u32ChannelMask) \ 273 for(i = 0; i < 6; i++) { \ 274 if((u32ChannelMask) & (1 << i)) \ 275 (epwm)->SSCTL &= ~(1UL << i); \ 287 #define EPWM_TRIGGER_SYNC_START(epwm) ((epwm)->SSTRG = EPWM_SSTRG_CNTSEN_Msk) 298 #define EPWM_ENABLE_OUTPUT_INVERTER(epwm, u32ChannelMask) ((epwm)->POLCTL = (u32ChannelMask)) 308 #define EPWM_GET_CAPTURE_RISING_DATA(epwm, u32ChannelNum) ((epwm)->CAPDAT[(u32ChannelNum)].RCAPDAT) 318 #define EPWM_GET_CAPTURE_FALLING_DATA(epwm, u32ChannelNum) ((epwm)->CAPDAT[(u32ChannelNum)].FCAPDAT) 331 #define EPWM_MASK_OUTPUT(epwm, u32ChannelMask, u32LevelMask) \ 333 (epwm)->MSKEN = (u32ChannelMask); \ 334 (epwm)->MSK = (u32LevelMask); \ 348 #define EPWM_SET_PRESCALER(epwm, u32ChannelNum, u32Prescaler) ((epwm)->CLKPSC[(u32ChannelNum) >> 1] = (u32Prescaler)) 360 #define EPWM_GET_PRESCALER(epwm, u32ChannelNum) ((epwm)->CLKPSC[(u32ChannelNum) >> 1U]) 372 #define EPWM_SET_CMR(epwm, u32ChannelNum, u32CMR) ((epwm)->CMPDAT[(u32ChannelNum)]= (u32CMR)) 382 #define EPWM_GET_CMR(epwm, u32ChannelNum) ((epwm)->CMPDAT[(u32ChannelNum)]) 394 #define EPWM_SET_FTCMR(epwm, u32ChannelNum, u32FTCMR) (((epwm)->FTCMPDAT[((u32ChannelNum) >> 1U)]) = (u32FTCMR)) 407 #define EPWM_SET_CNR(epwm, u32ChannelNum, u32CNR) ((epwm)->PERIOD[(u32ChannelNum)] = (u32CNR)) 417 #define EPWM_GET_CNR(epwm, u32ChannelNum) ((epwm)->PERIOD[(u32ChannelNum)]) 431 #define EPWM_SET_ALIGNED_TYPE(epwm, u32ChannelMask, u32AlignedType) \ 434 for(i = 0; i < 6; i++) { \ 435 if((u32ChannelMask) & (1 << i)) \ 436 (epwm)->CTL1 = (((epwm)->CTL1 & ~(3UL << (i << 1))) | ((u32AlignedType) << (i << 1))); \ 449 #define EPWM_SET_LOAD_WINDOW(epwm, u32ChannelMask) ((epwm)->LOAD |= (u32ChannelMask)) 460 #define EPWM_TRIGGER_SYNC(epwm, u32ChannelNum) ((epwm)->SWSYNC |= (1 << ((u32ChannelNum) >> 1))) 471 #define EPWM_CLR_COUNTER(epwm, u32ChannelMask) ((epwm)->CNTCLR |= (u32ChannelMask)) 502 #define EPWM_SET_OUTPUT_LEVEL(epwm, u32ChannelMask, u32ZeroLevel, u32CmpUpLevel, u32PeriodLevel, u32CmpDownLevel) \ 505 for(i = 0; i < 6; i++) { \ 506 if((u32ChannelMask) & (1 << i)) { \ 507 (epwm)->WGCTL0 = (((epwm)->WGCTL0 & ~(3UL << (i << 1))) | ((u32ZeroLevel) << (i << 1))); \ 508 (epwm)->WGCTL0 = (((epwm)->WGCTL0 & ~(3UL << (EPWM_WGCTL0_PRDPCTL0_Pos + (i << 1)))) | ((u32PeriodLevel) << (EPWM_WGCTL0_PRDPCTL0_Pos + (i << 1)))); \ 509 (epwm)->WGCTL1 = (((epwm)->WGCTL1 & ~(3UL << (i << 1))) | ((u32CmpUpLevel) << (i << 1))); \ 510 (epwm)->WGCTL1 = (((epwm)->WGCTL1 & ~(3UL << (EPWM_WGCTL1_CMPDCTL0_Pos + (i << 1)))) | ((u32CmpDownLevel) << (EPWM_WGCTL1_CMPDCTL0_Pos + (i << 1)))); \ 527 #define EPWM_TRIGGER_BRAKE(epwm, u32ChannelMask, u32BrakeType) ((epwm)->SWBRK |= ((u32ChannelMask) << (u32BrakeType))) 539 #define EPWM_SET_DEADZONE_CLK_SRC(epwm, u32ChannelNum, u32AfterPrescaler) \ 540 ((epwm)->DTCTL[(u32ChannelNum) >> 1] = (((epwm)->DTCTL[(u32ChannelNum) >> 1] & ~EPWM_DTCTL0_1_DTCKSEL_Msk) | \ 541 ((u32AfterPrescaler) << EPWM_DTCTL0_1_DTCKSEL_Pos))) 566 void EPWM_EnablePDMA(
EPWM_T *epwm, uint32_t u32ChannelNum, uint32_t u32RisingFirst, uint32_t u32Mode);
590 void EPWM_EnableAcc(
EPWM_T *epwm, uint32_t u32ChannelNum, uint32_t u32IntFlagCnt, uint32_t u32IntAccSrc);
604 void EPWM_ConfigSyncPhase(
EPWM_T *epwm, uint32_t u32ChannelNum, uint32_t u32SyncSrc, uint32_t u32Direction, uint32_t u32StartPhase);
void EPWM_DisablePDMA(EPWM_T *epwm, uint32_t u32ChannelNum)
Disables PDMA transfer of selected channel for EPWM capture.
void EPWM_ClearFaultDetectInt(EPWM_T *epwm, uint32_t u32ChannelNum)
Clear fault detect interrupt of selected channel.
void EPWM_EnableFaultDetectOutput(EPWM_T *epwm, uint32_t u32ChannelNum)
Enable fault detect output of selected channel.
void EPWM_ClearAccInt(EPWM_T *epwm, uint32_t u32ChannelNum)
Clear interrupt flag accumulator interrupt of selected channel.
void EPWM_EnableFaultDetectMask(EPWM_T *epwm, uint32_t u32ChannelNum, uint32_t u32MaskCnt)
Enable fault detect mask function of selected channel.
void EPWM_EnableDutyInt(EPWM_T *epwm, uint32_t u32ChannelNum, uint32_t u32IntDutyType)
Enable duty interrupt of selected channel.
void EPWM_EnableDACTrigger(EPWM_T *epwm, uint32_t u32ChannelNum, uint32_t u32Condition)
Enable selected channel to trigger DAC.
uint32_t EPWM_ConfigOutputChannel(EPWM_T *epwm, uint32_t u32ChannelNum, uint32_t u32Frequency, uint32_t u32DutyCycle)
This function Configure EPWM generator and get the nearest frequency in edge aligned(up counter type)...
void EPWM_DisableCaptureInt(EPWM_T *epwm, uint32_t u32ChannelNum, uint32_t u32Edge)
Disable capture interrupt of selected channel.
uint32_t EPWM_GetPeriodIntFlag(EPWM_T *epwm, uint32_t u32ChannelNum)
Get period interrupt of selected channel.
void EPWM_DisableBrakeNoiseFilter(EPWM_T *epwm, uint32_t u32BrakePinNum)
Disable EPWM brake noise filter function.
void EPWM_SetClockSource(EPWM_T *epwm, uint32_t u32ChannelNum, uint32_t u32ClkSrcSel)
Set EPWM clock source.
uint32_t EPWM_GetFaultBrakeIntFlag(EPWM_T *epwm, uint32_t u32BrakeSource)
This function get fault brake interrupt flag of selected source.
int32_t EPWM_EnableADCTriggerPrescale(EPWM_T *epwm, uint32_t u32ChannelNum, uint32_t u32Prescale, uint32_t u32PrescaleCnt)
Enable and configure trigger ADC prescale.
uint32_t EPWM_GetAccInt(EPWM_T *epwm, uint32_t u32ChannelNum)
Get interrupt flag accumulator interrupt of selected channel.
void EPWM_EnablePDMA(EPWM_T *epwm, uint32_t u32ChannelNum, uint32_t u32RisingFirst, uint32_t u32Mode)
Enables PDMA transfer of selected channel for EPWM capture.
void EPWM_DisablePeriodInt(EPWM_T *epwm, uint32_t u32ChannelNum)
Disable period interrupt of selected channel.
void EPWM_DisableCapture(EPWM_T *epwm, uint32_t u32ChannelMask)
Disable capture of selected channel(s)
void EPWM_DisableFaultDetect(EPWM_T *epwm, uint32_t u32ChannelNum)
Disable fault detect of selected channel.
void EPWM_EnableBrakePinInverse(EPWM_T *epwm, uint32_t u32BrakePinNum)
Enable EPWM brake pin inverse function.
void EPWM_EnableZeroInt(EPWM_T *epwm, uint32_t u32ChannelNum)
Enable zero interrupt of selected channel.
uint32_t EPWM_GetDutyIntFlag(EPWM_T *epwm, uint32_t u32ChannelNum)
Get duty interrupt flag of selected channel.
void EPWM_DisableFaultDetectMask(EPWM_T *epwm, uint32_t u32ChannelNum)
Disable fault detect mask function of selected channel.
void EPWM_DisableAcc(EPWM_T *epwm, uint32_t u32ChannelNum)
Disable interrupt flag accumulator of selected channel.
void EPWM_DisableADCTriggerPrescale(EPWM_T *epwm, uint32_t u32ChannelNum)
Disable Trigger ADC prescale function.
void EPWM_EnableDeadZone(EPWM_T *epwm, uint32_t u32ChannelNum, uint32_t u32Duration)
Enable Dead zone of selected channel.
void EPWM_EnableAccInt(EPWM_T *epwm, uint32_t u32ChannelNum)
Enable interrupt flag accumulator interrupt of selected channel.
void EPWM_ConfigSyncPhase(EPWM_T *epwm, uint32_t u32ChannelNum, uint32_t u32SyncSrc, uint32_t u32Direction, uint32_t u32StartPhase)
Configure synchronization phase of selected channel.
void EPWM_EnableSyncNoiseFilter(EPWM_T *epwm, uint32_t u32ClkCnt, uint32_t u32ClkDivSel)
Enable EPWM SYNC_IN noise filter function.
void EPWM_DisableFaultDetectInt(EPWM_T *epwm, uint32_t u32ChannelNum)
Disable fault detect interrupt of selected channel.
void EPWM_DisableZeroInt(EPWM_T *epwm, uint32_t u32ChannelNum)
Disable zero interrupt of selected channel.
uint32_t EPWM_GetFaultDetectInt(EPWM_T *epwm, uint32_t u32ChannelNum)
Get fault detect interrupt of selected channel.
void EPWM_DisableSyncPhase(EPWM_T *epwm, uint32_t u32ChannelMask)
Disable SYNC phase of selected channel(s)
void EPWM_ClearZeroIntFlag(EPWM_T *epwm, uint32_t u32ChannelNum)
Clear zero interrupt of selected channel.
void EPWM_ClearADCTriggerFlag(EPWM_T *epwm, uint32_t u32ChannelNum, uint32_t u32Condition)
Clear selected channel trigger ADC flag.
uint32_t EPWM_GetZeroIntFlag(EPWM_T *epwm, uint32_t u32ChannelNum)
Get zero interrupt of selected channel.
void EPWM_EnableAccStopMode(EPWM_T *epwm, uint32_t u32ChannelNum)
Enable interrupt flag accumulator stop mode of selected channel.
void EPWM_EnableFaultDetectInt(EPWM_T *epwm, uint32_t u32ChannelNum)
Enable fault detect interrupt of selected channel.
void EPWM_ClearFTDutyIntFlag(EPWM_T *epwm, uint32_t u32ChannelNum)
Clear free trigger duty interrupt flag of selected channel.
void EPWM_DisableAccPDMA(EPWM_T *epwm, uint32_t u32ChannelNum)
Disable accumulator PDMA of selected channel.
void EPWM_EnableFaultBrake(EPWM_T *epwm, uint32_t u32ChannelMask, uint32_t u32LevelMask, uint32_t u32BrakeSource)
This function enable fault brake of selected channel(s)
void EPWM_DisableFaultDetectDeglitch(EPWM_T *epwm, uint32_t u32ChannelNum)
Disable fault detect deglitch function of selected channel.
void EPWM_EnableCaptureInt(EPWM_T *epwm, uint32_t u32ChannelNum, uint32_t u32Edge)
Enable capture interrupt of selected channel.
void EPWM_DisableDACTrigger(EPWM_T *epwm, uint32_t u32ChannelNum)
Disable selected channel to trigger DAC.
uint32_t EPWM_GetCaptureIntFlag(EPWM_T *epwm, uint32_t u32ChannelNum)
Get capture interrupt of selected channel.
void EPWM_DisableSyncPinInverse(EPWM_T *epwm)
Disable EPWM SYNC input pin inverse function.
void EPWM_DisableFaultBrakeInt(EPWM_T *epwm, uint32_t u32BrakeSource)
This function disable fault brake interrupt.
void EPWM_ClearFaultBrakeIntFlag(EPWM_T *epwm, uint32_t u32BrakeSource)
This function clear fault brake interrupt of selected source.
void EPWM_ClearWrapAroundFlag(EPWM_T *epwm, uint32_t u32ChannelNum)
Clear the time-base counter reached its maximum value flag of selected channel.
void EPWM_SetBrakePinSource(EPWM_T *epwm, uint32_t u32BrakePinNum, uint32_t u32SelAnotherModule)
Set EPWM brake pin source.
void EPWM_DisableAccStopMode(EPWM_T *epwm, uint32_t u32ChannelNum)
Disable interrupt flag accumulator stop mode of selected channel.
void EPWM_ForceStop(EPWM_T *epwm, uint32_t u32ChannelMask)
Stop EPWM generation immediately by clear channel enable bit.
void EPWM_DisableDutyInt(EPWM_T *epwm, uint32_t u32ChannelNum)
Disable duty interrupt of selected channel.
uint32_t EPWM_GetWrapAroundFlag(EPWM_T *epwm, uint32_t u32ChannelNum)
Get the time-base counter reached its maximum value flag of selected channel.
void EPWM_DisableLoadMode(EPWM_T *epwm, uint32_t u32ChannelNum, uint32_t u32LoadMode)
Disable load mode of selected channel.
void EPWM_EnableSyncPhase(EPWM_T *epwm, uint32_t u32ChannelMask)
Enable SYNC phase of selected channel(s)
void EPWM_EnableBrakeNoiseFilter(EPWM_T *epwm, uint32_t u32BrakePinNum, uint32_t u32ClkCnt, uint32_t u32ClkDivSel)
Enable EPWM brake noise filter function.
void EPWM_ClearDutyIntFlag(EPWM_T *epwm, uint32_t u32ChannelNum)
Clear duty interrupt flag of selected channel.
void EPWM_EnableADCTrigger(EPWM_T *epwm, uint32_t u32ChannelNum, uint32_t u32Condition)
Enable selected channel to trigger ADC.
void EPWM_DisableOutput(EPWM_T *epwm, uint32_t u32ChannelMask)
Disables EPWM output generation of selected channel(s)
void EPWM_ClearCaptureIntFlag(EPWM_T *epwm, uint32_t u32ChannelNum, uint32_t u32Edge)
Clear capture interrupt of selected channel.
uint32_t EPWM_GetADCTriggerFlag(EPWM_T *epwm, uint32_t u32ChannelNum)
Get selected channel trigger ADC flag.
void EPWM_EnableOutput(EPWM_T *epwm, uint32_t u32ChannelMask)
Enables EPWM output generation of selected channel(s)
uint32_t EPWM_GetFTDutyIntFlag(EPWM_T *epwm, uint32_t u32ChannelNum)
Get free trigger duty interrupt flag of selected channel.
void EPWM_EnableFaultDetect(EPWM_T *epwm, uint32_t u32ChannelNum, uint32_t u32AfterPrescaler, uint32_t u32ClkSel)
Enable fault detect of selected channel.
void EPWM_DisableSyncNoiseFilter(EPWM_T *epwm)
Disable EPWM SYNC_IN noise filter function.
void EPWM_EnablePeriodInt(EPWM_T *epwm, uint32_t u32ChannelNum, uint32_t u32IntPeriodType)
Enable period interrupt of selected channel.
void EPWM_EnableFaultBrakeInt(EPWM_T *epwm, uint32_t u32BrakeSource)
This function enable fault brake interrupt.
void EPWM_Stop(EPWM_T *epwm, uint32_t u32ChannelMask)
Stop EPWM module.
void EPWM_DisableDeadZone(EPWM_T *epwm, uint32_t u32ChannelNum)
Disable Dead zone of selected channel.
void EPWM_ClearPeriodIntFlag(EPWM_T *epwm, uint32_t u32ChannelNum)
Clear period interrupt of selected channel.
void EPWM_ClearDACTriggerFlag(EPWM_T *epwm, uint32_t u32ChannelNum, uint32_t u32Condition)
Clear selected channel trigger DAC flag.
void EPWM_EnableAccPDMA(EPWM_T *epwm, uint32_t u32ChannelNum)
Enable accumulator PDMA of selected channel.
void EPWM_Start(EPWM_T *epwm, uint32_t u32ChannelMask)
Start EPWM module.
void EPWM_DisableAccInt(EPWM_T *epwm, uint32_t u32ChannelNum)
Disable interrupt flag accumulator interrupt of selected channel.
void EPWM_EnableCapture(EPWM_T *epwm, uint32_t u32ChannelMask)
Enable capture of selected channel(s)
void EPWM_DisableFaultDetectOutput(EPWM_T *epwm, uint32_t u32ChannelNum)
Disable fault detect output of selected channel.
void EPWM_EnableLoadMode(EPWM_T *epwm, uint32_t u32ChannelNum, uint32_t u32LoadMode)
Enable load mode of selected channel.
void EPWM_EnableFaultDetectDeglitch(EPWM_T *epwm, uint32_t u32ChannelNum, uint32_t u32DeglitchSmpCycle)
Enable fault detect deglitch function of selected channel.
void EPWM_DisableBrakePinInverse(EPWM_T *epwm, uint32_t u32BrakePinNum)
Disable EPWM brake pin inverse function.
void EPWM_SetLeadingEdgeBlanking(EPWM_T *epwm, uint32_t u32TrigSrcSel, uint32_t u32TrigType, uint32_t u32BlankingCnt, uint32_t u32BlankingEnable)
Set EPWM leading edge blanking function.
void EPWM_EnableAcc(EPWM_T *epwm, uint32_t u32ChannelNum, uint32_t u32IntFlagCnt, uint32_t u32IntAccSrc)
Enable interrupt flag accumulator of selected channel.
void EPWM_EnableSyncPinInverse(EPWM_T *epwm)
Enable EPWM SYNC input pin inverse function.
uint32_t EPWM_ConfigCaptureChannel(EPWM_T *epwm, uint32_t u32ChannelNum, uint32_t u32UnitTimeNsec, uint32_t u32CaptureEdge)
Configure EPWM capture and get the nearest unit time.
void EPWM_DisableADCTrigger(EPWM_T *epwm, uint32_t u32ChannelNum)
Disable selected channel to trigger ADC.
uint32_t EPWM_GetDACTriggerFlag(EPWM_T *epwm, uint32_t u32ChannelNum)
Get selected channel trigger DAC flag.