Tool/software: Code Composer Studio
I want to use ePWM4 and ePWM7 for a two-phase interleaving buck converter with 180 degrees phase shift. When I set ePWM4 as the master and ePWM7 as the slave, the phase of ePWM7 does not change even if I change the TBPHS value. My master and slave setting is like below. I'm not sure if I need to set something like clock to make them have phase shift. Thanks.
if (mode == 1) { // config as a Master
(*ePWM[j]).TBCTL.bit.SYNCOSEL = TB_CTR_ZERO;
(*ePWM[j]).TBCTL.bit.PHSEN = TB_DISABLE;//TB_DISABLE;
}
if (mode == 2) { // config as a Slave (Note: Phase+2 value used to compensate for logic delay)
(*ePWM[j]).TBPHS.bit.TBPHS = 2 + period*0.5; //phase delay
(*ePWM[j]).TBCTL.bit.SYNCOSEL = TB_SYNC_IN;
(*ePWM[j]).TBCTL.bit.PHSEN = TB_ENABLE;
}