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/TMS320F28377S: EPWM

Part Number: TMS320F28377S
Other Parts Discussed in Thread: CONTROLSUITE

Tool/software: Code Composer Studio

Hello, Cottier
Thank you for your guidance.
We set different EPwmxRegs.CMPA.bit.CMPA values and fixed EPwmxRegs.TBPRD values to generate PWM waves. We set EPwmxRegs.TZCTL.all=10 and EPwmxRegs.TZFRC.bit.OST=1 to stop EPWMA and EPWMB output. We set EPwmxRegs.TZCLR.bit.OST =1 to start EPWMA and EPWMB output. We set EPwmxRegs.TZCTL.bit.TZA=3 to start EPWMA output. We set EPwmxRegs.TZCTL.bit.TZB=3 to start EPWMB output. Before EPWMA or EPWMB starts the output, the EPwmxRegs.CMPA.bit.CMPA active register has been updated as expected value. The The time base counter(TBCTR) always count up-down. The output of the DB submodule is always valid. :

The conditions are as follows: TBCLK=30M, up-down counting mode. EPwmxRegs.TBPRD=1500(The switching frequency is 10k). EPwmxRegs.DBCTL.all=11(x=1/2/3). The time delay 2us of the rising and falling edge of the DB submodule. EPwmxRegs.AQCTLA.all=0x61.

Using ePWM1/2/3's A and B outputs to control three-phase IGBT(100A) bridge. A controls the up half bridge, B controls the down half bridge. A and B output to buffer. Buffer output to control optocoupler. Optocoupler control IGBT. The SVPWM voltage vector amplitude is fixed to 200V, and the DC bus voltage is about 560V. SVPWM voltage vector action time 1ms, stop time 80ms to make the permanent magnet synchronous motor stator winding fully release current. Each voltage vector angle test 20000 times. The voltage vector angles were 348.7, 337.5, 270, 202.5, 180, 157.5, 112, 101.2, 92.8, 90, 88.5, and 0 respectively. Different angles will make the CMPA value different. At CMPB=0, when the voltage vector angle is 88.5 degrees, when each test is about 40 times, the A and B output of ePWM1/2/3 will output high level. This will lead to short circuit of IGBT and optocoupler output protection. Other angles do not have this problem. Set the value of CMPB to 1498 (CMPA does not use this value). These abnormalities occur at 92.8 degrees when each test is about 3000 times. These abnormalities occur at 157.5 degrees when each test is about 3000 times. after change the location of the interrupt service program(The project has 5.C files. We move ISR to other.C files.). The value of CMPB is still 1498. 

What is the reason?

We tested some registers of the ePWM module, including EPwmxRegs.TZFLG.all, EPwmxRges.TZCTL.all, EPwmxRges.DBCTL.all, EPwmxRges.AQCTL.all, EPwmxRges.AQCTLA.all, EPwmxRges.TBCTL.all, (x=1/2/3).The values of these registers are all expected.

TZ submodule registers such as EPwmxRegs.TZCTL, EPwmxRegs.TZFRC, EPwmxRegs.TZCLR can be set up only when EPwmxRegs.TBCTR, EPwmxRegs.CMPA.bit.CMPA and EPwmxRegs.CMPB.bit.CMPB are specific values, or these TZ submodule registers can be set up at any time?

The function of EPwmxRegs.CMPA.bit.CMPA or EPwmxRegs.CMPB.bit.CMPB is only compared with EPwmxRegs.TBCTR, and produces corresponding events without any other functions. Is it this?

  • We are looking into this issue. We expect to get back with you on Monday.

    Regards,
    Manoj
  • When DBCTL=11, the pwms should be tied to the contents of CMPA, and should not be influenced by CMPB. I suspect if there is any initialization attempted without enabling EALLOW. I recommend to look at the EPWM register table that shows which registers are EALLOW protected.

    There are many examples available in controlSUITE that initializes EPWM for three phase pwm generation. I recommend the one below.

    C:\ti\controlSUITE\development_kits\TMDSIDDK_v2.0\IDDK_PM_Servo_F2837x_v2_00_00_00\IDDK_PM_Servo_F2837x.c

    Hope it helps.

    rgds,

    ramesh

  • Hello,
    I am assuming that your issue is resolved, and am closing the thread. If not, you can reject the closure and post your further queries if any.