Tool/software:
I am switching ePWM blocks to drive power-electronics at 60kHz, the control on the CLA is run at 30kHz, every second ePWM cycle.
To realize this, i have configured the following:
- the ADC is triggered every second time. For this i have set the ADC SOC trigger to this:
- to make sure, the new duty cycles are applied after two ePWM cycles and not before, I configure the global load like this
I now observed, that sometimes, the global load and the Gloal Load and the SOC trigger don't occur at the same time. Instead, they occur with one 60kHz cycle offset. This depends on the startup-timing of the CPU, every time I change the code in main, i need to correct the setting of the "SOC Trigger Event Count Initial value" eithher to 0 or 1.
Therefore my question: is it possible to synchronize the ADC-SOC trigger and the global load? Or to initialize both counters to 0 and release them at the same time?
Thanks,
Flurin