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: Synchronize ePWM Global-Load and ePWM SOC Trigger

Part Number: TMS320F28388D

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

  • Hi Flurin, 

    If you are triggering SOC and using global load on every other event, you will need to start them from a known value and use the same PWM to trigger it. In essence, the counters must start at the same time from a set state to be guarantee that they occur at the same time. Please be sure you are initializing the counters in the code init and try starting the EPWM clock using the SYSCTRL PCLKCR0 register TBCLKSYNC bit to control/start the EPWM clock after initializing.

    Best Regards,

    Allison