Hi,
I'm working on a code that synchronizes two ePWMs. Each of them are operating with different frequency.
In addition, I'm using two additional ePWMs in order to sync them properly, and to trigger a task on CLA.
in total:
1) ePWM1 - 50Hz. Sync master.
2) ePWM2 - 50Hz. Constant duty cycle. Synchronized with ePWM1.
3) ePWM3 - 50KHz. Duty is being updated by a CLA task that is triggered by ePWM4. Synchronized with ePWM2.
4) ePWM4 - 50Khz. Triggers an CLA task. Synchronized with ePWM1.
There are two operating modes:
1) Constant duty cycle for ePWM3. The Duty is set by the CLA task with the same value repeatedly.
2) ePWM3 duty follows a reference sine-wave. The duty is set by the CLA task.
The issue I'm looking to solve, is that the first operating mode works well, but the second mode doesn't work properly - The sync between ePWM3 and ePWM2 doesn't work, and the phases shift constantly during operation.
Are they any examples of similar projects or any solution for it?
I can share the actual code if needed. in general, I'm using driverlib.
thanks a lot,
Oren
