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.

TMS320F28032: SYNC and Event Generator

Part Number: TMS320F28032


We are trying to have the ADC SOCs to be generated at half the PWM frequency. We configured the Event Generator to trigger every second event by setting SOCAPRD to 2.

In this scenario, we would like to synchronize the SOCs of multiple Piccolos. The problem is that the SYNCI pulse only resets the TBCNTR to TBPHS; the event counter doesn’t get reset. As a result, depending on when the SYNCI arrives, the SOCs between two Piccolos can be off by one PWM cycle.

Do you have any suggestions on how to address this? Is there a way to force the event counter to 0 when SYNCI arrives?

Thanks,

Stuart

  • Stuart,

    I'm not sure about resetting the SOCAPRD count. I'll let someone else comment on that.

    Here are some alternate approaches that might work:

    Is it possible to use TBCTR=CMPA? Maybe you can avoid missing events if CMPA is offset from the SYNCI pulse.

    Is it possible to allow the EPWM to trigger a conversion every period and ignore the conversions that aren't wanted?

    Is there an unused EPWM that can be set with a PRD twice as long as the pace EPWM and use the 1/2 rate EPWM to generate SOCs?

    -Tommy