C2000 ePWM down-count after syncronized in up-down counter

I want to make two PWM module that the counting direction is reverve as picture bellow.
  1. ePWM 1 is start counting Up-down-Up,
  2. ePWM 2 is start counting at Down-up-Down.
I set the PWM module syncronized = zero, without any Phase shifted (TBPHS=0). However, i can not get the desured result.
with kindly, need assistance for set this ePWM matter.

2 commentaires

You have set the counting mode to 'Up-Down' in both the ePWM Block Parameters. Changing that might help you get the desired result.
Sorry, but it was set up-down counting mode at both.
please see my question figure.

Connectez-vous pour commenter.

 Réponse acceptée

Divyanshu
Divyanshu le 30 Juil 2024
Modifié(e) : Divyanshu le 30 Juil 2024
Hi Arifin,
Although in the block parameters of ePWM block you have specified 'Counting-Mode' as 'Up-Down' for both ePWM blocks but the parameter 'Synchronization action' is different for both the blocks.
Now as per the snapshot of Block Parameters for 'ePWM4' block because 'Synchronization action' is 'Set counter to phase value specified via dialog' another parameter 'Counting direction after phase synchronization' is enabled.
The value for 'Counting direction after phase synchronization' is 'Count down after sync' so I guess this is the parameter which is forcefully starting count from down. So if you set 'Synchronization action' to 'Disable' then both plots might become identical.
You can refer the following documentation links for more details about these parameters:
Hope it helps!

Plus de réponses (1)

Romy
Romy le 12 Fév 2026
Hi The syncronization action seems to be in counts, not in degress.
The documentation explains values from 0 to 360, but when I try that it does not work accordingly. Instead, I have observed that it works in terms of counts. My timer Period is 300 to achieve 200KHz PWM using 120MHz CPU core, and ePWM prescaler of 1. Then when I changed the phase larger than 300, I see 0 Duty cycle in my PWM, I only see a phase shift when the value is within 0 to 300.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by