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.

TMDSDCDCLEDKIT: ePWM1 to ePWM2 synchronization error

Part Number: TMDSDCDCLEDKIT

Hi Support,

my customer is facing issues in synchronizing ePWM modules using DcDc LED kit. Can you kindly help me identifying the root of the issue, based on teh attached detailed description of the issue?

Thanks and regards,

Alberto

SyncronizationIssuePWMSignals.pdf

  • Hi Alberto,

    Thank you for providing detailed description of the issue. I believe it is quite clear what is happening. 

    We expect that the ePWM1A (SEPIC) and ePWM2A or ePWM2B signals (MASTER module that manages the first two strings of LEDs) are synchronizedThis does not happen, just look at the screenshots of the oscilloscope below.

    The reason expected behavior is not seen is because PWM1 and PWM2 are both set-up as Masters. There are two ways to ensure that PWM1 and PWM2 will be perfectly synchronized. 

    1. You can leave PWM1 and PWM2 as Masters and follow the procedure outlined in the user guide to disable TBCLKSYNC bit at the start of initialization routine, configure all PWM registers, and then enable TBCLKSYNC bit. This will make sure that all PWM clocks are started at the same time. This way as long as PWM1 and PWM2 frequencies are integral multiples of each other, and fixed, these PWMs will always be in sync.

    2. The other option is to use PWM1 for driving the 1st LED string and PWM2 for driving the SEPIC switch. You can now make PWM1 the Master and PWM2, 3, 4.. as the slaves. PWM1 syncout will sync PWM2 time-base (use a TBPHS value of 0 or 2 for PWM2). As PWM1 is 20kHz, this will only happen every 5th PWM2 cycle. Again, as long as these two frequencies are integral multiples of each other, you won't have to worry about anything else. PWM2 syncout should just pass-through the syncin input from PWM1 to PWM3. PWM3, 4... can now still be synced to PWM1 with desired phase shifts.

    I hope this helps.

    Hrishi

  • Hrishi,

    Thanks for your support.
    Both solutions are not working.
    In particular, first is not solving the issue and second is not feasible because GPIO00 Is used for SEPIC .
    Can you kindly provide your feedback?

    Thanks and regards
    Alberto
  • Alberto,

    Two things in implementing solution #1:

    1. Make sure EALLOW and EDIS are used for TBLCKSYNC.

    2. I see that prd_sepic and prd_led are set to 600 and 3000 counts respectively. Although these numbers are integral multiples, the actual period of the PWM outputs (in up-count mode) will correspond to 601 and 3001 counts respectively. These are not integral multiples and will result in PWM phase shift drifting over time. Please change prd_sepic and prd_led to 599 and 2999 counts respectively.

    I believe above should fix the issue.

    Hrishi