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.

ePWMxB problem

Other Parts Discussed in Thread: TMS320F28335

Hello,

i have a project with ePWM modules that once worked, but now the ePWMxB modules have a 0 output at any time. The ePWMxA modules work just fine. I am using the ADC-PWM synchronization via ADC interrupt demo via Matlab.

Using the Data Store Memory and Data Store Write blocks, I can see with the graphs in Code composer that I do have an something on the WB input value going into my ePWMxB modules, yet nothing happens.

Here is a copy of my project in Code composer as well as an image of the modules that I want to work in Matlab.

Can anyone help me? http://e2e.ti.com/cfs-file.ashx/__key/communityserver-discussions-components-files/171/8623.Convertisseur_5F00_bidirectionnel_5F00_DSP_5F00_ticcs.7zThank you.

  

  • Here is the code for ePWM5B in Code Composer :

    /* Start for S-Function (c280xpwm): '<S1>/ePWM5B' */

    /*** Initialize ePWM5 modules ***/
    {
    EPWMPARAMS EPwm5Params;

    /*-- Setup Time-Base (TB) Submodule --*/
    EPwm5Params.TBPRD = 3750;
    EPwm5Params.TBCTL_CTRMODE = 2;
    EPwm5Params.TBCTL_SYNCOSEL = 1;
    EPwm5Params.TBCTL_PHSEN = 1;
    EPwm5Params.TBCTL_PHSDIR = 1;
    EPwm5Params.TBPHS = 0;
    EPwm5Params.TBCTL_HSPCLKDIV = 0;
    EPwm5Params.TBCTL_CLKDIV = 0;

    /*-- Setup Counter_Compare (CC) Submodule --*/
    EPwm5Params.CMPCTL_LOADAMODE = 0;
    EPwm5Params.CMPCTL_LOADBMODE = 0;
    EPwm5Params.CMPA = 0;
    EPwm5Params.CMPB = 0;

    /*-- Setup Action-Qualifier (AQ) Submodule --*/
    EPwm5Params.AQCTLA = 0;
    EPwm5Params.AQCTLB = 2306;
    EPwm5Params.AQCSFRC_CSFA = 0;
    EPwm5Params.AQCSFRC_CSFB = 0;
    EPwm5Params.AQCSFRC_RLDCSF = 0;

    /*-- Setup Dead-Band Generator (DB) Submodule --*/
    EPwm5Params.DBCTL_OUT_MODE = 0;
    EPwm5Params.DBCTL_IN_MODE = 2;
    EPwm5Params.DBCTL_POLSEL = 0;
    EPwm5Params.DBRED = 0.0;
    EPwm5Params.DBFED = 0.0;

    /*-- Setup Event-Trigger (ET) Submodule --*/
    EPwm5Params.ETSEL_SOCAEN = 0;
    EPwm5Params.ETSEL_SOCASEL = 1;
    EPwm5Params.ETPS_SOCAPRD = 1;
    EPwm5Params.ETSEL_SOCBEN = 0;
    EPwm5Params.ETSEL_SOCBSEL = 1;
    EPwm5Params.ETPS_SOCBPRD = 1;
    EPwm5Params.ETSEL_INTEN = 0;
    EPwm5Params.ETSEL_INTSEL = 1;
    EPwm5Params.ETPS_INTPRD = 1;

    /*-- Setup PWM-Chopper (PC) Submodule --*/
    EPwm5Params.PCCTL_CHPEN = 0;
    EPwm5Params.PCCTL_CHPFREQ = 0;
    EPwm5Params.PCCTL_OSHTWTH = 0;
    EPwm5Params.PCCTL_CHPDUTY = 0;

    /*-- Setup Trip-Zone (TZ) Submodule --*/
    EPwm5Params.TZSEL = 0;
    EPwm5Params.TZCTL_TZA = 3;
    EPwm5Params.TZCTL_TZB = 3;
    EPwm5Params.TZEINT_OST = 0;
    EPwm5Params.TZEINT_CBC = 0;

    /*-- Initial ePWM5 --*/
    config_ePWMRegs(&EPwm5Regs, &EPwm5Params);
    }

  • We have ordered new TMS320F28335 on digikey because the old one I used busted. The program worked fine with the old one, could it be a design error in the controller? 

  • Hi,

    You need to concentrate with this configuration.

    /*-- Setup Action-Qualifier (AQ) Submodule --*/
    EPwm5Params.AQCTLA = 0;
    EPwm5Params.AQCTLB = 2306;

    Refer technical datasheet of this controller. It should be,

    /*-- Setup Action-Qualifier (AQ) Submodule --*/
    EPwm5Params.AQCTLA = 6;
    EPwm5Params.AQCTLB = 6;

    Please check it once And let me know.

    Regard's 

    Thirumoorthy.R

  • Hello Thirumoorthy,

    Turns out the problem was as simple as a dip switch that was not OFF on my development board. Thank you.

    Pascal