I want to synchronize the ADC sampling with PWM waveforms but somehow I'm not getting the expected output. There are two ePWM modules used phase shifted by 25 percent of time period (only PWM 1A and PWM 2A are shown in DSO). Only one of the module triggers ADCSOC_A at first event and this is used for start of conversion. ADC (CIN2) posts an ADCINT1 after end of conversion which triggers the subsytem.
I'm toggling the output of GPIO pin 26 everytime the subsystem is triggered. The output is shown in DSO picture. This toggling is at much lower frequency (even if it was first event SOC triggering) and also it shift with respect to the PWM waveform (which is triggering the SOC process).
First of all it's supposed to be at same frequency as the PWM signals. Second it's not supposed to be shifting continuously with respect to PWM signal triggering it.
Legend: PINK WAVEFORM : Triggering ePWM 1 module
BLUE WAVEFORM : ePWM 2 module
GREEN WAVEFORM : The GPIO 26 pin indicating when the subsystem is triggered.