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.

TMS320F28377S: TMS320F28377S

Part Number: TMS320F28377S
Other Parts Discussed in Thread: C2000WARE, SYSCONFIG

Using TMS320F28377SPTPT, I need to generate a number of high resolution ePWMs (eight precisely but I’ll use two in my enquiry here). These must be phase shifted from one another by different angles which are not fixed but changing dynamically depending on the circuit parameters. For instance, whenever the input and output voltage change, the time at which each of the PWM will switch on will change.

Different cases of fixed phase shift (e.g., 0, 120, 240 degrees)  have been illustrated by TI but I could not apply this to a dynamically changing phase shift. Kindly help on how to switch PWM1 at T1 (Sec) and PWM2 at T2 (Sec). The figure below illustrates the PWMs at their switching instances (times, angles, or counts). Accompnying code may be of help.

                                                                                           

  • Hi Olutayo,

    Have you had a chance to look at the different C2000Ware examples that use HRPWM? 

    Best,

    Ryan Ma

  • Hi Ryan, 

    Thank you for your response. I mentioned that I have tried the examples. None that I saw uses the variable or dynamically changing phase shift. Please advise.

    Regards, 

    Olutayo 

  • Hi Olutayo,

    Dynamically changing phase shift should be possible with HRPWM support. What is your desired switching frequency? What event are you wanting to change the Phase shift value? 

    My suggestion is to setup your EPWM signals with no HRPWM support and test if your phase shift values get updated. Once this works, you can enable HRPWM support. Here is a thread that can help once you switch to HRPWM support.

    Best regards,

    Ryan Ma 

  • Hi Ryan,

    Thank you for your feedback and advice. 

    Firstly, syncinfig is not available for 2837xS family as comfimed by your colleague through this thread:

    https://e2e.ti.com/support/microcontrollers/c2000-microcontrollers-group/c2000/f/c2000-microcontrollers-forum/1175564/tms320f28388d-error-with-new-ccs-project-using-syn-cfg/4437019?tisearch=e2e-sitesearch&keymatch=%2520user%253A545039#4437019.

    Quoting your colleague's response "Hi Olutayo,
    As Vince mentioned , there is an issue with  device XML files in CCS and under the "ccs1200\ccs\ccs_base\common\targetdb\devices" path which is causing the switch operation to fail.
    We will provide an empty project having .syscfg file available for F2837xs in the next release of C2000Ware.
    Best Regards
    Siddharth"

    Secondly, aetting the epwm to operate with dynamic phase shift is the problem not about the high resolution pwm. Again, I think you do not get what I meant by dynamic phase shift. For more clariry, consider pwm1 phase shifted from pwm2 by x-degree. This x-degree is not fixed but may change during my converter operation depending on the input and output voltages. With fixed phase shift, we can just calculate the count equvalent to the angle snd input this. How then can the dynamically changing phaseshift be implemented? The thread you provided could not help for two reasons: I'm not using synconfig (it is not even available for 28377xS) and it does not treat dynamically changing angle or phase shift. Please help

  • Hi Olutayo,

    Sorry about that I was wrong for SysConfig support in CCS for 2837xS.

    You want to change the phase shift value depending on the inputs/outputs voltages from converter operation correct? How are you comparing these values, are you using a CMPSS? Are you trying to update these phase shift values at the end of a PWM period or every EPWM clk cycle?

    If the TBCTL[PHSEN] bit is set, then the time-base counter (TBCTR) of the ePWM module will be automatically loaded with the phase register (TBPHS) contents when one of the following conditions occur

    1. EPWMxSYNCI: Synchronization Input Pulse:

    2. Software Forced Synchronization Pulse:

    3. Digital Compare Event Synchronization Pulse: (this seems to be the more reasonable solution for your application for ex CMPSS event )

    What I assume you are trying to do for example:

    PWM1 TBPHS = x

    PWM2 TBPHS =  x + 120

    And what you want to happen is updating x (shown in red in picture below), for each of the PWM modules. I believe you will need to use the Digtial Compare Event Synchronization pulse to know when a CMPSS event occurs, so you can update your TBPHS register.

    Best,

    Ryan Ma

  • Dear Ryan,

    No problem and thank you for your help.

    Now,  whenever the variables input voltage v1,  output voltage v2, and (or) ouput power P change(s),  each pwm gets a new value (calculated by my code).

    Like I mentioned ealier, there are four complementary swtch pairs to control. The first complementary pair starts from 0 degree phase shift while other pairs are phase shifted from the first pair at different angles which are not fixed but depend value calculated based on the variables. Each time there is a change in any or all the variables, each pwm pair gets a new phase shift calculted based on the new variables v1, v2 and P. There is no need to compare the variables except that the phase shift must be updated to the new values calculated each time there is a chsnge in the values of the variables.  Therefore, I want an automatic loading or updating to the new phase shifts. 

    However, it looks you're suggesting one of the following for the conditions to update the phase shift:

    1. EPWMxSYNCI: Synchronization Input Pulse:

    2. Software Forced Synchronization Pulse:

    3. Digital Compare Event Synchronization Pulse: (this seems to be the more reasonable solution for your application for ex

    Is that correct or applicable based on my new explanation? If yes, how is this done  please?

    Regards, 

    Olutayo 

  • That is correct, you can se either three of these scenarios to update your TBPRD based on several conditions that are found in our TRM.

    This can be done several ways as I tried to explain in my previous post. However it seems you want to 

    phase shift must be updated to the new values calculated each time there is a chsnge in the values of the variables.

    You can create an interrupt such that you set a software force sync every time your variable gets updated.

    This can be done using the TBCTL[SWSYNC] register and making sure to enable the TBCTL[PHSEN] bit. The driverlib functions for these in case you wanted to use driverlib are 

    EPWM_enablePhaseShiftLoad(myEPWM0_BASE); //TBCTL[PHSEN]
    EPWM_setPhaseShift(myEPWM0_BASE, 20);
    EPWM_forceSyncPulse(myEPWM0_BASE); // (TBCTL[SWSYNC])

    Does this help guide you in the right direction?

    If you want some resources to learn more about the ePWM and its submodules here are some great videos that should explain more about synchronization and how the period will get reflected based on certain events.

    https://training.ti.com/c2000-enhanced-pulse-width-modulator-epwm-time-base-submodule?context=1137766-1149551-1149545

    I have also attached a two guides that could help as reference to set up this.

    1. Phase-Shifted Full Bridge DC/DC Power Converter Design Guide: https://www.ti.com/lit/ug/tidu248/tidu248.pdf

    2. C2000 ePWM Developer’s Guide: www.ti.com/.../sprad12.pdf

    Here is also our online training academy that is super helpful

    1. C2000 Academy: dev.ti.com/.../node

    Best,

    Ryan Ma

  • Thank you Ryan.

    As I can see from your web, the 2837xS sysconfig empty project is now available. I have imported one but is giving the following error when I tried to open the C2000.syscfg file:

    To resolve this, I went through the link in the last line of the error information to download the version 1.15.0 of SysConfig. Yet it did not remove the error. As I can see from the property of the empty project below, it is inbuilt with 1.14.0 version. Please advise on a clue to resolving this.

  • Hi Ryan, 

    I got that resolved by updating the sysconfig in the project property. I'll now apply it to the dynamic phase shift configuration (which is the main question here) and keep you informed of the progress.

    Regards,

    Olutayo.

  • Sounds good, if any questions arise from EPWM please create a separate thread. For now I will mark this as resolved.

    Best,

    Ryan Ma