| M480 BSP V3.05.001 The Board Support Package for M480 Series

epwm.h
Go to the documentation of this file.
1 /**************************************************************************/
9 #ifndef __EPWM_H__
10 #define __EPWM_H__
11
12 #ifdef __cplusplus
13 extern "C"
14 {
15 #endif
16
17
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)
37 /*---------------------------------------------------------------------------------------------------------*/
38 /* Counter Type Constant Definitions */
39 /*---------------------------------------------------------------------------------------------------------*/
40 #define EPWM_UP_COUNTER (0U)
41 #define EPWM_DOWN_COUNTER (1U)
42 #define EPWM_UP_DOWN_COUNTER (2U)
44 /*---------------------------------------------------------------------------------------------------------*/
45 /* Aligned Type Constant Definitions */
46 /*---------------------------------------------------------------------------------------------------------*/
47 #define EPWM_EDGE_ALIGNED (1U)
48 #define EPWM_CENTER_ALIGNED (2U)
50 /*---------------------------------------------------------------------------------------------------------*/
51 /* Output Level Constant Definitions */
52 /*---------------------------------------------------------------------------------------------------------*/
53 #define EPWM_OUTPUT_NOTHING (0U)
54 #define EPWM_OUTPUT_LOW (1U)
55 #define EPWM_OUTPUT_HIGH (2U)
56 #define EPWM_OUTPUT_TOGGLE (3U)
58 /*---------------------------------------------------------------------------------------------------------*/
59 /* Synchronous Start Function Control Constant Definitions */
60 /*---------------------------------------------------------------------------------------------------------*/
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)
66 /*---------------------------------------------------------------------------------------------------------*/
67 /* Trigger Source Select Constant Definitions */
68 /*---------------------------------------------------------------------------------------------------------*/
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)
91 /*---------------------------------------------------------------------------------------------------------*/
92 /* Fail brake Control Constant Definitions */
93 /*---------------------------------------------------------------------------------------------------------*/
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)
117 /*---------------------------------------------------------------------------------------------------------*/
118 /* Leading Edge Blanking Control Constant Definitions */
119 /*---------------------------------------------------------------------------------------------------------*/
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)
131 /*---------------------------------------------------------------------------------------------------------*/
132 /* Capture Control Constant Definitions */
133 /*---------------------------------------------------------------------------------------------------------*/
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)
141 /*---------------------------------------------------------------------------------------------------------*/
142 /* Duty Interrupt Type Constant Definitions */
143 /*---------------------------------------------------------------------------------------------------------*/
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)
147 /*---------------------------------------------------------------------------------------------------------*/
148 /* Interrupt Flag Accumulator Constant Definitions */
149 /*---------------------------------------------------------------------------------------------------------*/
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)
155 /*---------------------------------------------------------------------------------------------------------*/
156 /* Load Mode Constant Definitions */
157 /*---------------------------------------------------------------------------------------------------------*/
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)
162 /*---------------------------------------------------------------------------------------------------------*/
163 /* Synchronize Control Constant Definitions */
164 /*---------------------------------------------------------------------------------------------------------*/
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)
172 /*---------------------------------------------------------------------------------------------------------*/
173 /* Noise Filter Clock Divide Select Constant Definitions */
174 /*---------------------------------------------------------------------------------------------------------*/
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)
184 /*---------------------------------------------------------------------------------------------------------*/
185 /* Clock Source Select Constant Definitions */
186 /*---------------------------------------------------------------------------------------------------------*/
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)
193 /*---------------------------------------------------------------------------------------------------------*/
194 /* Fault Detect Clock Source Select Constant Definitions */
195 /*---------------------------------------------------------------------------------------------------------*/
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)
202 /* end of group EPWM_EXPORTED_CONSTANTS */
203
204
216 #define EPWM_ENABLE_COMPLEMENTARY_MODE(epwm) ((epwm)->CTL1 = (epwm)->CTL1 | (0x7ul<<EPWM_CTL1_OUTMODE0_Pos))
217
225 #define EPWM_DISABLE_COMPLEMENTARY_MODE(epwm) ((epwm)->CTL1 = (epwm)->CTL1 & ~(0x7ul<<EPWM_CTL1_OUTMODE0_Pos))
226
234 #define EPWM_ENABLE_GROUP_MODE(epwm) ((epwm)->CTL0 = (epwm)->CTL0 | EPWM_CTL0_GROUPEN_Msk)
235
243 #define EPWM_DISABLE_GROUP_MODE(epwm) ((epwm)->CTL0 = (epwm)->CTL0 & ~EPWM_CTL0_GROUPEN_Msk)
244
259 #define EPWM_ENABLE_TIMER_SYNC(epwm, u32ChannelMask, u32SyncSrc) ((epwm)->SSCTL = ((epwm)->SSCTL & ~EPWM_SSCTL_SSRC_Msk) | (u32SyncSrc) | (u32ChannelMask))
260
270 #define EPWM_DISABLE_TIMER_SYNC(epwm, u32ChannelMask) \
271 do{ \
272 int i;\
273 for(i = 0; i < 6; i++) { \
274 if((u32ChannelMask) & (1 << i)) \
275 (epwm)->SSCTL &= ~(1UL << i); \
276 } \
277 }while(0)
278
287 #define EPWM_TRIGGER_SYNC_START(epwm) ((epwm)->SSTRG = EPWM_SSTRG_CNTSEN_Msk)
288
298 #define EPWM_ENABLE_OUTPUT_INVERTER(epwm, u32ChannelMask) ((epwm)->POLCTL = (u32ChannelMask))
299
308 #define EPWM_GET_CAPTURE_RISING_DATA(epwm, u32ChannelNum) ((epwm)->CAPDAT[(u32ChannelNum)].RCAPDAT)
309
318 #define EPWM_GET_CAPTURE_FALLING_DATA(epwm, u32ChannelNum) ((epwm)->CAPDAT[(u32ChannelNum)].FCAPDAT)
319
331 #define EPWM_MASK_OUTPUT(epwm, u32ChannelMask, u32LevelMask) \
332 { \
333 (epwm)->MSKEN = (u32ChannelMask); \
334 (epwm)->MSK = (u32LevelMask); \
335 }
336
348 #define EPWM_SET_PRESCALER(epwm, u32ChannelNum, u32Prescaler) ((epwm)->CLKPSC[(u32ChannelNum) >> 1] = (u32Prescaler))
349
360 #define EPWM_GET_PRESCALER(epwm, u32ChannelNum) ((epwm)->CLKPSC[(u32ChannelNum) >> 1U])
361
372 #define EPWM_SET_CMR(epwm, u32ChannelNum, u32CMR) ((epwm)->CMPDAT[(u32ChannelNum)]= (u32CMR))
373
382 #define EPWM_GET_CMR(epwm, u32ChannelNum) ((epwm)->CMPDAT[(u32ChannelNum)])
383
394 #define EPWM_SET_FTCMR(epwm, u32ChannelNum, u32FTCMR) (((epwm)->FTCMPDAT[((u32ChannelNum) >> 1U)]) = (u32FTCMR))
395
407 #define EPWM_SET_CNR(epwm, u32ChannelNum, u32CNR) ((epwm)->PERIOD[(u32ChannelNum)] = (u32CNR))
408
417 #define EPWM_GET_CNR(epwm, u32ChannelNum) ((epwm)->PERIOD[(u32ChannelNum)])
418
431 #define EPWM_SET_ALIGNED_TYPE(epwm, u32ChannelMask, u32AlignedType) \
432 do{ \
433 int i; \
434 for(i = 0; i < 6; i++) { \
435 if((u32ChannelMask) & (1 << i)) \
436 (epwm)->CTL1 = (((epwm)->CTL1 & ~(3UL << (i << 1))) | ((u32AlignedType) << (i << 1))); \
437 } \
438 }while(0)
439
449 #define EPWM_SET_LOAD_WINDOW(epwm, u32ChannelMask) ((epwm)->LOAD |= (u32ChannelMask))
450
460 #define EPWM_TRIGGER_SYNC(epwm, u32ChannelNum) ((epwm)->SWSYNC |= (1 << ((u32ChannelNum) >> 1)))
461
471 #define EPWM_CLR_COUNTER(epwm, u32ChannelMask) ((epwm)->CNTCLR |= (u32ChannelMask))
472
502 #define EPWM_SET_OUTPUT_LEVEL(epwm, u32ChannelMask, u32ZeroLevel, u32CmpUpLevel, u32PeriodLevel, u32CmpDownLevel) \
503 do{ \
504 int i; \
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)))); \
511 } \
512 } \
513 }while(0)
514
527 #define EPWM_TRIGGER_BRAKE(epwm, u32ChannelMask, u32BrakeType) ((epwm)->SWBRK |= ((u32ChannelMask) << (u32BrakeType)))
528
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)))
542
543 /*---------------------------------------------------------------------------------------------------------*/
544 /* Define EPWM functions prototype */
545 /*---------------------------------------------------------------------------------------------------------*/
546 uint32_t EPWM_ConfigCaptureChannel(EPWM_T *epwm, uint32_t u32ChannelNum, uint32_t u32UnitTimeNsec, uint32_t u32CaptureEdge);
547 uint32_t EPWM_ConfigOutputChannel(EPWM_T *epwm, uint32_t u32ChannelNum, uint32_t u32Frequency, uint32_t u32DutyCycle);
548 void EPWM_Start(EPWM_T *epwm, uint32_t u32ChannelMask);
549 void EPWM_Stop(EPWM_T *epwm, uint32_t u32ChannelMask);
550 void EPWM_ForceStop(EPWM_T *epwm, uint32_t u32ChannelMask);
551 void EPWM_EnableADCTrigger(EPWM_T *epwm, uint32_t u32ChannelNum, uint32_t u32Condition);
552 void EPWM_DisableADCTrigger(EPWM_T *epwm, uint32_t u32ChannelNum);
553 int32_t EPWM_EnableADCTriggerPrescale(EPWM_T *epwm, uint32_t u32ChannelNum, uint32_t u32Prescale, uint32_t u32PrescaleCnt);
554 void EPWM_DisableADCTriggerPrescale(EPWM_T *epwm, uint32_t u32ChannelNum);
555 void EPWM_ClearADCTriggerFlag(EPWM_T *epwm, uint32_t u32ChannelNum, uint32_t u32Condition);
556 uint32_t EPWM_GetADCTriggerFlag(EPWM_T *epwm, uint32_t u32ChannelNum);
557 void EPWM_EnableDACTrigger(EPWM_T *epwm, uint32_t u32ChannelNum, uint32_t u32Condition);
558 void EPWM_DisableDACTrigger(EPWM_T *epwm, uint32_t u32ChannelNum);
559 void EPWM_ClearDACTriggerFlag(EPWM_T *epwm, uint32_t u32ChannelNum, uint32_t u32Condition);
560 uint32_t EPWM_GetDACTriggerFlag(EPWM_T *epwm, uint32_t u32ChannelNum);
561 void EPWM_EnableFaultBrake(EPWM_T *epwm, uint32_t u32ChannelMask, uint32_t u32LevelMask, uint32_t u32BrakeSource);
562 void EPWM_EnableCapture(EPWM_T *epwm, uint32_t u32ChannelMask);
563 void EPWM_DisableCapture(EPWM_T *epwm, uint32_t u32ChannelMask);
564 void EPWM_EnableOutput(EPWM_T *epwm, uint32_t u32ChannelMask);
565 void EPWM_DisableOutput(EPWM_T *epwm, uint32_t u32ChannelMask);
566 void EPWM_EnablePDMA(EPWM_T *epwm, uint32_t u32ChannelNum, uint32_t u32RisingFirst, uint32_t u32Mode);
567 void EPWM_DisablePDMA(EPWM_T *epwm, uint32_t u32ChannelNum);
568 void EPWM_EnableDeadZone(EPWM_T *epwm, uint32_t u32ChannelNum, uint32_t u32Duration);
569 void EPWM_DisableDeadZone(EPWM_T *epwm, uint32_t u32ChannelNum);
570 void EPWM_EnableCaptureInt(EPWM_T *epwm, uint32_t u32ChannelNum, uint32_t u32Edge);
571 void EPWM_DisableCaptureInt(EPWM_T *epwm, uint32_t u32ChannelNum, uint32_t u32Edge);
572 void EPWM_ClearCaptureIntFlag(EPWM_T *epwm, uint32_t u32ChannelNum, uint32_t u32Edge);
573 uint32_t EPWM_GetCaptureIntFlag(EPWM_T *epwm, uint32_t u32ChannelNum);
574 void EPWM_EnableDutyInt(EPWM_T *epwm, uint32_t u32ChannelNum, uint32_t u32IntDutyType);
575 void EPWM_DisableDutyInt(EPWM_T *epwm, uint32_t u32ChannelNum);
576 void EPWM_ClearDutyIntFlag(EPWM_T *epwm, uint32_t u32ChannelNum);
577 uint32_t EPWM_GetDutyIntFlag(EPWM_T *epwm, uint32_t u32ChannelNum);
578 void EPWM_EnableFaultBrakeInt(EPWM_T *epwm, uint32_t u32BrakeSource);
579 void EPWM_DisableFaultBrakeInt(EPWM_T *epwm, uint32_t u32BrakeSource);
580 void EPWM_ClearFaultBrakeIntFlag(EPWM_T *epwm, uint32_t u32BrakeSource);
581 uint32_t EPWM_GetFaultBrakeIntFlag(EPWM_T *epwm, uint32_t u32BrakeSource);
582 void EPWM_EnablePeriodInt(EPWM_T *epwm, uint32_t u32ChannelNum, uint32_t u32IntPeriodType);
583 void EPWM_DisablePeriodInt(EPWM_T *epwm, uint32_t u32ChannelNum);
584 void EPWM_ClearPeriodIntFlag(EPWM_T *epwm, uint32_t u32ChannelNum);
585 uint32_t EPWM_GetPeriodIntFlag(EPWM_T *epwm, uint32_t u32ChannelNum);
586 void EPWM_EnableZeroInt(EPWM_T *epwm, uint32_t u32ChannelNum);
587 void EPWM_DisableZeroInt(EPWM_T *epwm, uint32_t u32ChannelNum);
588 void EPWM_ClearZeroIntFlag(EPWM_T *epwm, uint32_t u32ChannelNum);
589 uint32_t EPWM_GetZeroIntFlag(EPWM_T *epwm, uint32_t u32ChannelNum);
590 void EPWM_EnableAcc(EPWM_T *epwm, uint32_t u32ChannelNum, uint32_t u32IntFlagCnt, uint32_t u32IntAccSrc);
591 void EPWM_DisableAcc(EPWM_T *epwm, uint32_t u32ChannelNum);
592 void EPWM_EnableAccInt(EPWM_T *epwm, uint32_t u32ChannelNum);
593 void EPWM_DisableAccInt(EPWM_T *epwm, uint32_t u32ChannelNum);
594 void EPWM_ClearAccInt(EPWM_T *epwm, uint32_t u32ChannelNum);
595 uint32_t EPWM_GetAccInt(EPWM_T *epwm, uint32_t u32ChannelNum);
596 void EPWM_EnableAccPDMA(EPWM_T *epwm, uint32_t u32ChannelNum);
597 void EPWM_DisableAccPDMA(EPWM_T *epwm, uint32_t u32ChannelNum);
598 void EPWM_EnableAccStopMode(EPWM_T *epwm, uint32_t u32ChannelNum);
599 void EPWM_DisableAccStopMode(EPWM_T *epwm, uint32_t u32ChannelNum);
600 void EPWM_ClearFTDutyIntFlag(EPWM_T *epwm, uint32_t u32ChannelNum);
601 uint32_t EPWM_GetFTDutyIntFlag(EPWM_T *epwm, uint32_t u32ChannelNum);
602 void EPWM_EnableLoadMode(EPWM_T *epwm, uint32_t u32ChannelNum, uint32_t u32LoadMode);
603 void EPWM_DisableLoadMode(EPWM_T *epwm, uint32_t u32ChannelNum, uint32_t u32LoadMode);
604 void EPWM_ConfigSyncPhase(EPWM_T *epwm, uint32_t u32ChannelNum, uint32_t u32SyncSrc, uint32_t u32Direction, uint32_t u32StartPhase);
605 void EPWM_EnableSyncPhase(EPWM_T *epwm, uint32_t u32ChannelMask);
606 void EPWM_DisableSyncPhase(EPWM_T *epwm, uint32_t u32ChannelMask);
607 void EPWM_EnableSyncNoiseFilter(EPWM_T *epwm, uint32_t u32ClkCnt, uint32_t u32ClkDivSel);
608 void EPWM_DisableSyncNoiseFilter(EPWM_T *epwm);
609 void EPWM_EnableSyncPinInverse(EPWM_T *epwm);
610 void EPWM_DisableSyncPinInverse(EPWM_T *epwm);
611 void EPWM_SetClockSource(EPWM_T *epwm, uint32_t u32ChannelNum, uint32_t u32ClkSrcSel);
612 void EPWM_EnableBrakeNoiseFilter(EPWM_T *epwm, uint32_t u32BrakePinNum, uint32_t u32ClkCnt, uint32_t u32ClkDivSel);
613 void EPWM_DisableBrakeNoiseFilter(EPWM_T *epwm, uint32_t u32BrakePinNum);
614 void EPWM_EnableBrakePinInverse(EPWM_T *epwm, uint32_t u32BrakePinNum);
615 void EPWM_DisableBrakePinInverse(EPWM_T *epwm, uint32_t u32BrakePinNum);
616 void EPWM_SetBrakePinSource(EPWM_T *epwm, uint32_t u32BrakePinNum, uint32_t u32SelAnotherModule);
617 void EPWM_SetLeadingEdgeBlanking(EPWM_T *epwm, uint32_t u32TrigSrcSel, uint32_t u32TrigType, uint32_t u32BlankingCnt, uint32_t u32BlankingEnable);
618 uint32_t EPWM_GetWrapAroundFlag(EPWM_T *epwm, uint32_t u32ChannelNum);
619 void EPWM_ClearWrapAroundFlag(EPWM_T *epwm, uint32_t u32ChannelNum);
620 void EPWM_EnableFaultDetect(EPWM_T *epwm, uint32_t u32ChannelNum, uint32_t u32AfterPrescaler, uint32_t u32ClkSel);
621 void EPWM_DisableFaultDetect(EPWM_T *epwm, uint32_t u32ChannelNum);
622 void EPWM_EnableFaultDetectOutput(EPWM_T *epwm, uint32_t u32ChannelNum);
623 void EPWM_DisableFaultDetectOutput(EPWM_T *epwm, uint32_t u32ChannelNum);
624 void EPWM_EnableFaultDetectDeglitch(EPWM_T *epwm, uint32_t u32ChannelNum, uint32_t u32DeglitchSmpCycle);
625 void EPWM_DisableFaultDetectDeglitch(EPWM_T *epwm, uint32_t u32ChannelNum);
626 void EPWM_EnableFaultDetectMask(EPWM_T *epwm, uint32_t u32ChannelNum, uint32_t u32MaskCnt);
627 void EPWM_DisableFaultDetectMask(EPWM_T *epwm, uint32_t u32ChannelNum);
628 void EPWM_EnableFaultDetectInt(EPWM_T *epwm, uint32_t u32ChannelNum);
629 void EPWM_DisableFaultDetectInt(EPWM_T *epwm, uint32_t u32ChannelNum);
630 void EPWM_ClearFaultDetectInt(EPWM_T *epwm, uint32_t u32ChannelNum);
631 uint32_t EPWM_GetFaultDetectInt(EPWM_T *epwm, uint32_t u32ChannelNum);
632 /* end of group EPWM_EXPORTED_FUNCTIONS */
634 /* end of group EPWM_Driver */
636 /* end of group Standard_Driver */
638
639 #ifdef __cplusplus
640 }
641 #endif
642
643 #endif /* __EPWM_H__ */
644
645 /*** (C) COPYRIGHT 2016 Nuvoton Technology Corp. ***/
EPWM_DisablePDMA
void EPWM_DisablePDMA(EPWM_T *epwm, uint32_t u32ChannelNum)
Disables PDMA transfer of selected channel for EPWM capture.
Definition: epwm.c:643
EPWM_ClearFaultDetectInt
void EPWM_ClearFaultDetectInt(EPWM_T *epwm, uint32_t u32ChannelNum)
Clear fault detect interrupt of selected channel.
Definition: epwm.c:1673
EPWM_EnableFaultDetectOutput
void EPWM_EnableFaultDetectOutput(EPWM_T *epwm, uint32_t u32ChannelNum)
Enable fault detect output of selected channel.
Definition: epwm.c:1558
EPWM_ClearAccInt
void EPWM_ClearAccInt(EPWM_T *epwm, uint32_t u32ChannelNum)
Clear interrupt flag accumulator interrupt of selected channel.
Definition: epwm.c:1064
EPWM_EnableFaultDetectMask
void EPWM_EnableFaultDetectMask(EPWM_T *epwm, uint32_t u32ChannelNum, uint32_t u32MaskCnt)
Enable fault detect mask function of selected channel.
Definition: epwm.c:1617
EPWM_EnableDutyInt
void EPWM_EnableDutyInt(EPWM_T *epwm, uint32_t u32ChannelNum, uint32_t u32IntDutyType)
Enable duty interrupt of selected channel.
Definition: epwm.c:763
EPWM_EnableDACTrigger
void EPWM_EnableDACTrigger(EPWM_T *epwm, uint32_t u32ChannelNum, uint32_t u32Condition)
Enable selected channel to trigger DAC.
Definition: epwm.c:412
EPWM_ConfigOutputChannel
uint32_t EPWM_ConfigOutputChannel(EPWM_T *epwm, uint32_t u32ChannelNum, uint32_t u32Frequency, uint32_t u32DutyCycle)
This function Configure EPWM generator and get the nearest frequency in edge aligned(up counter type)...
Definition: epwm.c:134
EPWM_DisableCaptureInt
void EPWM_DisableCaptureInt(EPWM_T *epwm, uint32_t u32ChannelNum, uint32_t u32Edge)
Disable capture interrupt of selected channel.
Definition: epwm.c:712
EPWM_GetPeriodIntFlag
uint32_t EPWM_GetPeriodIntFlag(EPWM_T *epwm, uint32_t u32ChannelNum)
Get period interrupt of selected channel.
Definition: epwm.c:929
EPWM_DisableBrakeNoiseFilter
void EPWM_DisableBrakeNoiseFilter(EPWM_T *epwm, uint32_t u32BrakePinNum)
Disable EPWM brake noise filter function.
Definition: epwm.c:1402
EPWM_SetClockSource
void EPWM_SetClockSource(EPWM_T *epwm, uint32_t u32ChannelNum, uint32_t u32ClkSrcSel)
Set EPWM clock source.
Definition: epwm.c:1362
EPWM_T
Definition: epwm_reg.h:71
EPWM_GetFaultBrakeIntFlag
uint32_t EPWM_GetFaultBrakeIntFlag(EPWM_T *epwm, uint32_t u32BrakeSource)
This function get fault brake interrupt flag of selected source.
Definition: epwm.c:870
EPWM_EnableADCTriggerPrescale
int32_t EPWM_EnableADCTriggerPrescale(EPWM_T *epwm, uint32_t u32ChannelNum, uint32_t u32Prescale, uint32_t u32PrescaleCnt)
Enable and configure trigger ADC prescale.
Definition: epwm.c:328
EPWM_GetAccInt
uint32_t EPWM_GetAccInt(EPWM_T *epwm, uint32_t u32ChannelNum)
Get interrupt flag accumulator interrupt of selected channel.
Definition: epwm.c:1079
EPWM_EnablePDMA
void EPWM_EnablePDMA(EPWM_T *epwm, uint32_t u32ChannelNum, uint32_t u32RisingFirst, uint32_t u32Mode)
Enables PDMA transfer of selected channel for EPWM capture.
Definition: epwm.c:625
EPWM_DisablePeriodInt
void EPWM_DisablePeriodInt(EPWM_T *epwm, uint32_t u32ChannelNum)
Disable period interrupt of selected channel.
Definition: epwm.c:899
EPWM_DisableCapture
void EPWM_DisableCapture(EPWM_T *epwm, uint32_t u32ChannelMask)
Disable capture of selected channel(s)
Definition: epwm.c:574
EPWM_DisableFaultDetect
void EPWM_DisableFaultDetect(EPWM_T *epwm, uint32_t u32ChannelNum)
Disable fault detect of selected channel.
Definition: epwm.c:1544
EPWM_EnableBrakePinInverse
void EPWM_EnableBrakePinInverse(EPWM_T *epwm, uint32_t u32BrakePinNum)
Enable EPWM brake pin inverse function.
Definition: epwm.c:1416
EPWM_EnableZeroInt
void EPWM_EnableZeroInt(EPWM_T *epwm, uint32_t u32ChannelNum)
Enable zero interrupt of selected channel.
Definition: epwm.c:943
EPWM_GetDutyIntFlag
uint32_t EPWM_GetDutyIntFlag(EPWM_T *epwm, uint32_t u32ChannelNum)
Get duty interrupt flag of selected channel.
Definition: epwm.c:807
EPWM_DisableFaultDetectMask
void EPWM_DisableFaultDetectMask(EPWM_T *epwm, uint32_t u32ChannelNum)
Disable fault detect mask function of selected channel.
Definition: epwm.c:1631
EPWM_DisableAcc
void EPWM_DisableAcc(EPWM_T *epwm, uint32_t u32ChannelNum)
Disable interrupt flag accumulator of selected channel.
Definition: epwm.c:1022
EPWM_DisableADCTriggerPrescale
void EPWM_DisableADCTriggerPrescale(EPWM_T *epwm, uint32_t u32ChannelNum)
Disable Trigger ADC prescale function.
Definition: epwm.c:363
EPWM_EnableDeadZone
void EPWM_EnableDeadZone(EPWM_T *epwm, uint32_t u32ChannelNum, uint32_t u32Duration)
Enable Dead zone of selected channel.
Definition: epwm.c:660
EPWM_EnableAccInt
void EPWM_EnableAccInt(EPWM_T *epwm, uint32_t u32ChannelNum)
Enable interrupt flag accumulator interrupt of selected channel.
Definition: epwm.c:1036
EPWM_ConfigSyncPhase
void EPWM_ConfigSyncPhase(EPWM_T *epwm, uint32_t u32ChannelNum, uint32_t u32SyncSrc, uint32_t u32Direction, uint32_t u32StartPhase)
Configure synchronization phase of selected channel.
Definition: epwm.c:1225
EPWM_EnableSyncNoiseFilter
void EPWM_EnableSyncNoiseFilter(EPWM_T *epwm, uint32_t u32ClkCnt, uint32_t u32ClkDivSel)
Enable EPWM SYNC_IN noise filter function.
Definition: epwm.c:1300
EPWM_DisableFaultDetectInt
void EPWM_DisableFaultDetectInt(EPWM_T *epwm, uint32_t u32ChannelNum)
Disable fault detect interrupt of selected channel.
Definition: epwm.c:1659
EPWM_DisableZeroInt
void EPWM_DisableZeroInt(EPWM_T *epwm, uint32_t u32ChannelNum)
Disable zero interrupt of selected channel.
Definition: epwm.c:957
EPWM_GetFaultDetectInt
uint32_t EPWM_GetFaultDetectInt(EPWM_T *epwm, uint32_t u32ChannelNum)
Get fault detect interrupt of selected channel.
Definition: epwm.c:1688
EPWM_DisableSyncPhase
void EPWM_DisableSyncPhase(EPWM_T *epwm, uint32_t u32ChannelMask)
Disable SYNC phase of selected channel(s)
Definition: epwm.c:1269
EPWM_ClearZeroIntFlag
void EPWM_ClearZeroIntFlag(EPWM_T *epwm, uint32_t u32ChannelNum)
Clear zero interrupt of selected channel.
Definition: epwm.c:971
EPWM_ClearADCTriggerFlag
void EPWM_ClearADCTriggerFlag(EPWM_T *epwm, uint32_t u32ChannelNum, uint32_t u32Condition)
Clear selected channel trigger ADC flag.
Definition: epwm.c:378
EPWM_GetZeroIntFlag
uint32_t EPWM_GetZeroIntFlag(EPWM_T *epwm, uint32_t u32ChannelNum)
Get zero interrupt of selected channel.
Definition: epwm.c:987
EPWM_EnableAccStopMode
void EPWM_EnableAccStopMode(EPWM_T *epwm, uint32_t u32ChannelNum)
Enable interrupt flag accumulator stop mode of selected channel.
Definition: epwm.c:1121
EPWM_EnableFaultDetectInt
void EPWM_EnableFaultDetectInt(EPWM_T *epwm, uint32_t u32ChannelNum)
Enable fault detect interrupt of selected channel.
Definition: epwm.c:1645
EPWM_ClearFTDutyIntFlag
void EPWM_ClearFTDutyIntFlag(EPWM_T *epwm, uint32_t u32ChannelNum)
Clear free trigger duty interrupt flag of selected channel.
Definition: epwm.c:1149
EPWM_DisableAccPDMA
void EPWM_DisableAccPDMA(EPWM_T *epwm, uint32_t u32ChannelNum)
Disable accumulator PDMA of selected channel.
Definition: epwm.c:1107
EPWM_EnableFaultBrake
void EPWM_EnableFaultBrake(EPWM_T *epwm, uint32_t u32ChannelMask, uint32_t u32LevelMask, uint32_t u32BrakeSource)
This function enable fault brake of selected channel(s)
Definition: epwm.c:493
EPWM_DisableFaultDetectDeglitch
void EPWM_DisableFaultDetectDeglitch(EPWM_T *epwm, uint32_t u32ChannelNum)
Disable fault detect deglitch function of selected channel.
Definition: epwm.c:1602
EPWM_EnableCaptureInt
void EPWM_EnableCaptureInt(EPWM_T *epwm, uint32_t u32ChannelNum, uint32_t u32Edge)
Enable capture interrupt of selected channel.
Definition: epwm.c:695
EPWM_DisableDACTrigger
void EPWM_DisableDACTrigger(EPWM_T *epwm, uint32_t u32ChannelNum)
Disable selected channel to trigger DAC.
Definition: epwm.c:426
EPWM_GetCaptureIntFlag
uint32_t EPWM_GetCaptureIntFlag(EPWM_T *epwm, uint32_t u32ChannelNum)
Get capture interrupt of selected channel.
Definition: epwm.c:746
EPWM_DisableSyncPinInverse
void EPWM_DisableSyncPinInverse(EPWM_T *epwm)
Disable EPWM SYNC input pin inverse function.
Definition: epwm.c:1340
EPWM_DisableFaultBrakeInt
void EPWM_DisableFaultBrakeInt(EPWM_T *epwm, uint32_t u32BrakeSource)
This function disable fault brake interrupt.
Definition: epwm.c:839
EPWM_ClearFaultBrakeIntFlag
void EPWM_ClearFaultBrakeIntFlag(EPWM_T *epwm, uint32_t u32BrakeSource)
This function clear fault brake interrupt of selected source.
Definition: epwm.c:854
EPWM_ClearWrapAroundFlag
void EPWM_ClearWrapAroundFlag(EPWM_T *epwm, uint32_t u32ChannelNum)
Clear the time-base counter reached its maximum value flag of selected channel.
Definition: epwm.c:1508
EPWM_SetBrakePinSource
void EPWM_SetBrakePinSource(EPWM_T *epwm, uint32_t u32BrakePinNum, uint32_t u32SelAnotherModule)
Set EPWM brake pin source.
Definition: epwm.c:1445
EPWM_DisableAccStopMode
void EPWM_DisableAccStopMode(EPWM_T *epwm, uint32_t u32ChannelNum)
Disable interrupt flag accumulator stop mode of selected channel.
Definition: epwm.c:1135
EPWM_ForceStop
void EPWM_ForceStop(EPWM_T *epwm, uint32_t u32ChannelMask)
Stop EPWM generation immediately by clear channel enable bit.
Definition: epwm.c:248
EPWM_DisableDutyInt
void EPWM_DisableDutyInt(EPWM_T *epwm, uint32_t u32ChannelNum)
Disable duty interrupt of selected channel.
Definition: epwm.c:777
EPWM_GetWrapAroundFlag
uint32_t EPWM_GetWrapAroundFlag(EPWM_T *epwm, uint32_t u32ChannelNum)
Get the time-base counter reached its maximum value flag of selected channel.
Definition: epwm.c:1494
EPWM_DisableLoadMode
void EPWM_DisableLoadMode(EPWM_T *epwm, uint32_t u32ChannelNum, uint32_t u32LoadMode)
Disable load mode of selected channel.
Definition: epwm.c:1201
EPWM_EnableSyncPhase
void EPWM_EnableSyncPhase(EPWM_T *epwm, uint32_t u32ChannelMask)
Enable SYNC phase of selected channel(s)
Definition: epwm.c:1246
EPWM_EnableBrakeNoiseFilter
void EPWM_EnableBrakeNoiseFilter(EPWM_T *epwm, uint32_t u32BrakePinNum, uint32_t u32ClkCnt, uint32_t u32ClkDivSel)
Enable EPWM brake noise filter function.
Definition: epwm.c:1387
EPWM_ClearDutyIntFlag
void EPWM_ClearDutyIntFlag(EPWM_T *epwm, uint32_t u32ChannelNum)
Clear duty interrupt flag of selected channel.
Definition: epwm.c:791
EPWM_EnableADCTrigger
void EPWM_EnableADCTrigger(EPWM_T *epwm, uint32_t u32ChannelNum, uint32_t u32Condition)
Enable selected channel to trigger ADC.
Definition: epwm.c:279
EPWM_DisableOutput
void EPWM_DisableOutput(EPWM_T *epwm, uint32_t u32ChannelMask)
Disables EPWM output generation of selected channel(s)
Definition: epwm.c:605
EPWM_ClearCaptureIntFlag
void EPWM_ClearCaptureIntFlag(EPWM_T *epwm, uint32_t u32ChannelNum, uint32_t u32Edge)
Clear capture interrupt of selected channel.
Definition: epwm.c:729
EPWM_GetADCTriggerFlag
uint32_t EPWM_GetADCTriggerFlag(EPWM_T *epwm, uint32_t u32ChannelNum)
Get selected channel trigger ADC flag.
Definition: epwm.c:393
EPWM_EnableOutput
void EPWM_EnableOutput(EPWM_T *epwm, uint32_t u32ChannelMask)
Enables EPWM output generation of selected channel(s)
Definition: epwm.c:590
EPWM_GetFTDutyIntFlag
uint32_t EPWM_GetFTDutyIntFlag(EPWM_T *epwm, uint32_t u32ChannelNum)
Get free trigger duty interrupt flag of selected channel.
Definition: epwm.c:1165
EPWM_EnableFaultDetect
void EPWM_EnableFaultDetect(EPWM_T *epwm, uint32_t u32ChannelNum, uint32_t u32AfterPrescaler, uint32_t u32ClkSel)
Enable fault detect of selected channel.
Definition: epwm.c:1528
EPWM_DisableSyncNoiseFilter
void EPWM_DisableSyncNoiseFilter(EPWM_T *epwm)
Disable EPWM SYNC_IN noise filter function.
Definition: epwm.c:1314
EPWM_EnablePeriodInt
void EPWM_EnablePeriodInt(EPWM_T *epwm, uint32_t u32ChannelNum, uint32_t u32IntPeriodType)
Enable period interrupt of selected channel.
Definition: epwm.c:885
EPWM_EnableFaultBrakeInt
void EPWM_EnableFaultBrakeInt(EPWM_T *epwm, uint32_t u32BrakeSource)
This function enable fault brake interrupt.
Definition: epwm.c:823
EPWM_Stop
void EPWM_Stop(EPWM_T *epwm, uint32_t u32ChannelMask)
Stop EPWM module.
Definition: epwm.c:226
EPWM_DisableDeadZone
void EPWM_DisableDeadZone(EPWM_T *epwm, uint32_t u32ChannelNum)
Disable Dead zone of selected channel.
Definition: epwm.c:677
EPWM_ClearPeriodIntFlag
void EPWM_ClearPeriodIntFlag(EPWM_T *epwm, uint32_t u32ChannelNum)
Clear period interrupt of selected channel.
Definition: epwm.c:913
EPWM_ClearDACTriggerFlag
void EPWM_ClearDACTriggerFlag(EPWM_T *epwm, uint32_t u32ChannelNum, uint32_t u32Condition)
Clear selected channel trigger DAC flag.
Definition: epwm.c:442
EPWM_EnableAccPDMA
void EPWM_EnableAccPDMA(EPWM_T *epwm, uint32_t u32ChannelNum)
Enable accumulator PDMA of selected channel.
Definition: epwm.c:1093
EPWM_Start
void EPWM_Start(EPWM_T *epwm, uint32_t u32ChannelMask)
Start EPWM module.
Definition: epwm.c:211
EPWM_DisableAccInt
void EPWM_DisableAccInt(EPWM_T *epwm, uint32_t u32ChannelNum)
Disable interrupt flag accumulator interrupt of selected channel.
Definition: epwm.c:1050
EPWM_EnableCapture
void EPWM_EnableCapture(EPWM_T *epwm, uint32_t u32ChannelMask)
Enable capture of selected channel(s)
Definition: epwm.c:558
EPWM_DisableFaultDetectOutput
void EPWM_DisableFaultDetectOutput(EPWM_T *epwm, uint32_t u32ChannelNum)
Disable fault detect output of selected channel.
Definition: epwm.c:1572
EPWM_EnableLoadMode
void EPWM_EnableLoadMode(EPWM_T *epwm, uint32_t u32ChannelNum, uint32_t u32LoadMode)
Enable load mode of selected channel.
Definition: epwm.c:1183
EPWM_EnableFaultDetectDeglitch
void EPWM_EnableFaultDetectDeglitch(EPWM_T *epwm, uint32_t u32ChannelNum, uint32_t u32DeglitchSmpCycle)
Enable fault detect deglitch function of selected channel.
Definition: epwm.c:1587
EPWM_DisableBrakePinInverse
void EPWM_DisableBrakePinInverse(EPWM_T *epwm, uint32_t u32BrakePinNum)
Disable EPWM brake pin inverse function.
Definition: epwm.c:1430
EPWM_SetLeadingEdgeBlanking
void EPWM_SetLeadingEdgeBlanking(EPWM_T *epwm, uint32_t u32TrigSrcSel, uint32_t u32TrigType, uint32_t u32BlankingCnt, uint32_t u32BlankingEnable)
Set EPWM leading edge blanking function.
Definition: epwm.c:1476
EPWM_EnableAcc
void EPWM_EnableAcc(EPWM_T *epwm, uint32_t u32ChannelNum, uint32_t u32IntFlagCnt, uint32_t u32IntAccSrc)
Enable interrupt flag accumulator of selected channel.
Definition: epwm.c:1007
EPWM_EnableSyncPinInverse
void EPWM_EnableSyncPinInverse(EPWM_T *epwm)
Enable EPWM SYNC input pin inverse function.
Definition: epwm.c:1327
EPWM_ConfigCaptureChannel
uint32_t EPWM_ConfigCaptureChannel(EPWM_T *epwm, uint32_t u32ChannelNum, uint32_t u32UnitTimeNsec, uint32_t u32CaptureEdge)
Configure EPWM capture and get the nearest unit time.
Definition: epwm.c:36
EPWM_DisableADCTrigger
void EPWM_DisableADCTrigger(EPWM_T *epwm, uint32_t u32ChannelNum)
Disable selected channel to trigger ADC.
Definition: epwm.c:302
EPWM_GetDACTriggerFlag
uint32_t EPWM_GetDACTriggerFlag(EPWM_T *epwm, uint32_t u32ChannelNum)
Get selected channel trigger DAC flag.
Definition: epwm.c:457