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.

CCS/TMS320F28379D: Signal PWM in F28379D and DRV8305

Part Number: TMS320F28379D
Other Parts Discussed in Thread: CONTROLSUITE, DRV8305

Tool/software: Code Composer Studio

Good afternoon, I'm using a sinusoidal PWM signal to control the DRV8305 mosfets, so the generated signal controls the upper branch mosfet and the complementary signal controls the lower branch mosfet, 
but the generated complementary signal is not as expected. Could anyone tell me how to configure this complementary signal? The code is shown below:

Va_sin = m*sin(wt);
Vb_sin = m*sin(wt - 2*pi/3);
Vc_sin = m*sin(wt + 2*pi/3);

(motor->PwmARegs)->CMPA.bit.CMPA = (INV_PWM_HALF_TBPRD*Va_sin)+INV_PWM_HALF_TBPRD;
(motor->PwmBRegs)->CMPA.bit.CMPA = (INV_PWM_HALF_TBPRD*Vb_sin)+INV_PWM_HALF_TBPRD;
(motor->PwmCRegs)->CMPA.bit.CMPA = (INV_PWM_HALF_TBPRD*Vc_sin)+INV_PWM_HALF_TBPRD;

Thanks

  • Download the controlSUITE as the link below, refer to the example code in the folder (\ti\controlSUITE\development_kits\TIDM-SERVO-LAUNCHXS) to configure the PWM.

    https://www.ti.com/tool/controlsuite

    Btw, please have a look at the DRV8305 datasheet, the driver device will generate the deadband between high and low side drive signal automatically, the dead time is configured by the register of DRV8305 as well.


  • I'm already using this code, but when I set pwm, only the top branch pwm is changing, the complementary pwm doesn't change.

    The code used is shown below:

    float Va_sin;
    float Vb_sin;
    float Vc_sin;
    #define pi 3.14159265358979
    #define pi_2 2*pi
    float m=0.5;
    float omega_0 = 2*pi*60;
    #define Ts 0.000025 // Sampling Interval (1/freq chav)
    float Theta_ind = 0;
    float wt=0;

    void Integrador_Theta(float *Theta_ind) {
    //Independent angle integration
    static float I_Theta[3] = {0,0,0};

    I_Theta[0] = omega_0; // Integrates omega frequency to get omega * t
    I_Theta[2] = I_Theta[2] + (I_Theta[0] + I_Theta[1])*Ts/2;
    I_Theta[1] = I_Theta[0];

    if(I_Theta[2] >= pi_2) { // Resets the value of the angle as soon as it gets to 2pi
    I_Theta[2] = 0;
    }

    *Theta_ind = I_Theta[2];
    }

    Integrador_Theta(&wt);

    Va_sin = m*sin(wt);
    Vb_sin = m*sin(wt - 2*pi/3);
    Vc_sin = m*sin(wt + 2*pi/3);

    (motor->PwmARegs)->CMPA.bit.CMPA = (INV_PWM_HALF_TBPRD*Va_sin)+INV_PWM_HALF_TBPRD;
    (motor->PwmBRegs)->CMPA.bit.CMPA = (INV_PWM_HALF_TBPRD*Vb_sin)+INV_PWM_HALF_TBPRD;
    (motor->PwmCRegs)->CMPA.bit.CMPA = (INV_PWM_HALF_TBPRD*Vc_sin)+INV_PWM_HALF_TBPRD;


  • Are there any specific settings that adjust or enable complementary pwm?

  • Sorry, debugging the algorithm and control logic of your code is not something we can support through the forum. Please take time to understand and debug. On this forum, we are able to support specific device and reference code related questions.