Hello,
I am using MSP430F5172 for running a buck converter. I want to be able to set the duty cycle to zero to shut down the converter. I was initially having trouble bringing the duty cycle to zero by using mode 5 (reset mode).
However, setting the period to zero changing and the duty cycles to zero using output mode 5 helped to the pwm signals to zero, but I can still see that there is some glitch in the transitions. It seems like the pwm signal continues to output the last value it had when it is operating at a duty cycle other than zero ,
Am I using the correct approach for setting both the duty cycles to zero?
Is there a reference code or a mode that I should operate at to make sure that both the high side and low side FETs are off all the time when duty is zero?
void main()
{
// while loop in main code
while (1){
D_buckH= 152;
D_buckL= 153;
SetPWM(T_buck, T_boost);
SetDuty_Buck (D_buckH, D_buckL);
i = 100000; // Delay
do (i--);
while (i != 0);
SetPWM(0, T_boost);
OffBuck(0,0);
i = 100000; // Delay
do (i--);
while (i != 0);
__delay_cycles(10); // Delay between sequence convs
}
void OffBuck(unsigned int dH,unsigned int dL){
TD0CCTL1 |= OUTMOD_5 + CLLD_2; // CCR1 toggle/reset
TD0CCR1 = dH; // CCR1 PWM duty cycle of 1000/2000 = 50%
TD0CCTL2 |= OUTMOD_5 + CLLD_2; // CCR2 toggle/set
TD0CCR2 = dL; // CCR2 PWM duty cycle of 500/2000 = 25%
TD1CTL0 |= MC_3 + TDCLR; //up/down mode, clear TDR
}

