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.

TMS320F280025: Trigger different ADC SOC sequential with one EPWM

Part Number: TMS320F280025

Hi,

I am using a PWM in up down count mode and the goal is to trigger different ADC measurements if the PWM counter is equal to period.

But I need to trigger different ADC channels sequential.

This means as example:

The first time the PWM event (counter = Preriod) trigger ADC SOC1.

On second event trigger ADC SOC2.

On third event trigger ADC SOC3.

On fourth event start from beginning (trigger SOC1).

And so on.

What is the best way to do this?

Thanks in advance

  • Hallo Stefan,

    To accomplish what you have described you would need some software intervention. Each ePWM has two trigger outputs (SOCA and SOCB) which can be assigned as a trigger to an ADC SOC. To have a third event trigger SOC3, I believe you would need to disable the trigger for SOC1 in the interrupt service routine that is triggered by SOC1 so that it does not trigger again on the third event. Then after SOC3 completes, you would disable it and re-enable the trigger for SOC1. There is no hardware mechanism to automatically disable an SOC trigger after it has completed conversion.

    Best regards,
    Ibukun