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.

Synchronize pulse signal from ehrPWM1 and ehrPWM2 on OMAP L138 LCDK

Dear All,

We are generating two identical pulse signals from the ehrPWM1 and ehrPWM2 modules of OMAP L138 LCDK. I've used the Starterware ehrPWM example. The following shows the results of these two signals on our oscilloscope:

As you can see, the blue signal has a little delay (or phase) in comparison with yellow signal. I would like to achieve the following two goals:

Goal 1: Synchronize both signals. Both signals should start at same time (or one signal starts a little later to achieve the following result.

Goal 2: Invert one of the two ehrPWM signals. In other words, when ehrPWM1 is on, ehrPWM2 should be off. When ehrPWM2 is on, ehrPWM1 should be off. The following image demonstrate our final goal:

Some hints that might help you better answer my question:

  • Perhaps, should we use the synchronization on ehrPWM module? I'm talking about EHRPWMTimebaseSyncEnable() function.

Thank you in advance

  • Hi,

    Thanks for your post.

    Yes, you could use the time-base counter synchronization on ehrPWM module.

    I believe, you need to synchronize the time-base counter between modules through hardware or software. Each ePWM module has a synchronization input (EPWMxSYNCI) and a synchronization output (EPWMxSYNCO) signals. I think, there are time-base synchronization input and output pulses (EPWMxSYNCI, EPWMxSYNCO) available which are used to synchronize the time-base counter with the counter of ePWM module earlier or later accordingly in the synchronization chain.

    Alternatively, Writing a 1 to the TBCTL[SWFSYNC] control bit invokes a software forced synchronization. This pulse is ORed with the synchronization input signal, and therefore has the same effect as a pulse on EPWMxSYNCI.

    Time-Base counter synchronization feature enables the ePWM module to be automatically synchronized to the time base of another ePWM module. Lead or lag phase control can be added to the waveforms generated by different ePWM modules to synchronize them. For more details on this, kindly refer section 17.2.3.2.2 from TRM below:

    http://www.ti.com/lit/ug/spruh77b/spruh77b.pdf

    Thanks & regards,

    Sivaraj K

    -------------------------------------------------------------------------------------------------------

    Please click the Verify Answer button on this post if it answers your question.

    -------------------------------------------------------------------------------------------------------