This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

How to adjust EPWM code for TMSF28035

Hi,

I've been trying to adjust the PWM code of the BLDC_Sensored for the DRV8312-C2-KIT_v128, F2803x. The name of the file is f2803xbldcpwm_BLDC.h. At the moment this code is set to apply PWM to one the upper gates while one of the lower gates is turned on for each of the six states. However, I am trying to adjust it to only apply PWM to one of the lower gates, while the others remain OFF. Can you tell me if the following snippet of code will achieve that? I've only provided what I changed for state 1 , where I am only trying to apply PWM to the lower gate of the 1st leg of the inverter circuit. Thanking you in advance for any assistance you can provide.

/* State s1: current flows to motor windings from phase A->B, de-energized phase = C */\
if (v.CmtnPointer==0) /* */\
{ /* */\
EPwm1Regs.AQCSFRC.bit.CSFA = 0;                 /* Forcing disabledd on output A of EPWM1 */\
EPwm1Regs.AQCTLB.bit.CBU = 2;                 /* Set high when CTR = CMPB on UP-count */\
EPwm1Regs.AQCTLB.bit.ZRO = 1;                 /* Set low when CTR = Zero */\
EPwm1Regs.CMPB = (int16)(Tmp2>>15);        /* PWM signal on output A of EPWM1 (Q15 -> Q0) */ \
EPwm1Regs.AQCSFRC.bit.CSFB = 2;            /* Forcing a continuous High on output B of EPWM1 */\
/* */\
EPwm2Regs.AQCSFRC.bit.CSFA = 1;            /* Forcing a continuous Low on output A of EPWM2 */\
EPwm2Regs.AQCSFRC.bit.CSFB = 1;           /* Forcing a continuous Low on output B of EPWM2 */ \
/* */\
EPwm3Regs.AQCSFRC.bit.CSFA = 1;            /* Forcing a continuous Low on output A of EPWM3 */\
EPwm3Regs.AQCSFRC.bit.CSFB = 1;               /* Forcing a continuous Low on output B of EPWM3 */\
} /* */\

Regards,

Crystal