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.

TMS320F28388D: pwm output is broken when Sync-in signal comes

Part Number: TMS320F28388D

Tool/software:

Hi Expert,

In another thread, there is a statement "When an ePWM receives a Sync-In pulse, it loads the value stored in the TBPHS (phase) register, replacing the current value of the TBCTR.", my question is when current pwm is working before the sync-in pulse, and then a sync-in pulse comes and then the TBCTR changes, and this will break the last PWM period and cause an incomplete pwm period after the sync.

If it's true, do you have any solution to avoid this incomplete pwm period happen while sync is still working?

  • Echo,

    Synchronization feature of ePWM is used to ensure synchronization between multiple ePWM modules. Time base counters from separate PWM modules can be synchronized together to produce synchronized or phase-shifted outputs. SYNCOUT signal from one ePWM is used as SYNCIN signal on other ePWMs. ePWM modules can send a SYNCOUT signal on specified events such as TBCTR=0, TBCTR=PRD, etc. This make sure that sync event happens at start/end of PWM cycle. Value in phase register (TBPHS) is immediately loaded into TBCTR when a SYNCIN signal is received. This operation generally takes 1-2 system cycle. Now, loss of % of PWM depends on how fast your ePWM is running as compare to cpu clock. Although sync happens every cycle, change / adjustment doesn't happen frequently since variation in module to module are generally static and depend on temperature, humidity, etc which are slow varying entity.

    Regards,

    Sumit

  • Sumit,

    There is already a phase difference between multiple PWM channels. Choosing SYNCOUT can only ensure that the PWM cycle of the SYNCOUT channel is complete, but other PWM channel cycles that are synchronized may be damaged. Is there any good solution to this? 

  • Echo,

    If there is phase difference in the multiple PWM channel then you have to write that exact phase difference (in terms of counts) in TBPHS register. This will make sure that when SYNCOUT is being sent on TBCTR=0 then phase shifted ePWM is at exactly at that phase TBCTR=TBPHS. This is the way it can synchronized without getting damaged.

    Regards,

    Sumit

  • Sumit,

    In case there is a new TBPHS(new means the phase difference is totally different with before) needed during the sync event, do you have any good solution to avoid the incomplete PWM period?

  • Echo,

    Isn't feedback loop supposed take care of that lost portion in next cycle as part feedback mechanism by adjusting duty, considering this change is minor in nature? May I know what topology/converter are we talking about here since you mentioned this mechanism can cause damage?

    Regards,

    Sumit