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.

TMS320F28335: How to generate phase shifted carrier using EPWM blocks?

Part Number: TMS320F28335


Tool/software:

I am working with DSP f28335. I need to generate three 120 degree phase shifted carrier. I tried to do it by adding phase offset but still I am not getting the phase shift in the pulses.

The EPWM settings are as follows

fsw = 10e3;
Tinv=1/fsw
clk=150e+6; %system clk
tbprd=Tinv*clk/2; % time based period
for 0 degree Phase offset value (TBPHS) is "0".

 for 120 degree Phase offset value is "(tbprd*120)/360 "

 for -120 degree Phase offset value is "(tbprd*240)/360"

   Code

  • Hi Ankita,

    I am not familiar with the Matlab interface to the MCU.

    Please check after loading the code and doing the initialization if the registers are configured correctly.

    Specifically the phase enable is set and TBPHS registers have the correct value.

    Also how is the synchronization source is selected for EPWM2 and 3 ? Since phase value is loaded on sync event its important that the sync source is selected properly

    Thanks