Part Number: C6745
EPWM1 and EPWM2 generate two PWM to drive one full bridge,and the full bridge are connected to one transformer.
The counter waves of EPWM1 and EPWM2 are showed in below picture(Blue line for EPWM1,Green line for EPWM2):
TBPRD of EPWM1 is one less than EPWM2,so period of two PWMs are identical.CMPA of EPWM2 is loaded from shadow when counter equals to TBPRD,while CMPA of EPWM1 is loaded when counter equal to ZERO.
Here is the problem:
I stop PWM generating by calling function below:
void pwm_igbt_off(void) { PWM1_AQCSFRC = 0x05; PWM1_AQSFRC = 0xED; PWM2_AQCSFRC = 0x05; PWM2_AQSFRC = 0xED; PWM1_CMPA = 0; PWM2_CMPA = 0; } void pwm_igbt_on(void) { PWM1_AQCSFRC = 0x00; PWM1_AQSFRC = 0x00; PWM2_AQCSFRC = 0x00; PWM2_AQSFRC = 0x00; }
but the PWMs are not cleared immediately,below are screenshot of oscilloscope:
picture 1 picture 2
The green line changing from high to low in picture 1 and picture 2 is the time when the program calls function pwm_igbt_off().In picture 1,two tiny pulses are generated after clearing pwm output.In picture 2,PWM1 is cleared but PWM2 still output one pulse that not been influenced.
Any suggestion is appreciated.