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.

EPWM SOC configuration on 28377D

Dear All,

I am interested in the discussion of the EPWM configuration in order to generate several "time equally spaced" start of conversion (SOC) signals for the ADC unit.

I have read the manual, but I am not sure that I can program, for instance 5 SOC each one separated by 1/4 of the pwm period, without using timers.

Any comments will be welcome for the clarification of this question. 

Best regards,

Oscar

  • Hi Oscar,

    I guess you want to phase shift these ePWM pulses, right?

    Regards,
    Gautam
  • Dear Gautam,
    I have three a 3-phase symmetric pwm. I may use the three phases that to split the pwm period 5 equally spaced slots to generate a SOC when each pwm counter is zero. But is not flexible to achieve the 4 slots that I need...
    Best regards,

  • Hi Oscar,


    The best way that I can think to do this would be to:

    *Use a spare epwm running at 5x speed

    *Set the ADC wrapper to burst mode with burst size of 1 and a burst trigger of the 5x ePWM

    *Set the ADC wrapper to have 5 round-robin SOCs

  • Hi,
    indeed, that is a possibility, to have a secondary pwm that runs 5 times faster than the main pwm signal.

    The SOCs that will generate the start the acquisition will be the same (for instance when the counter is zero).

    However, inside some CPU or CLA task, for instance, I must how where is the burst pointer to the first acquisition (the first acquisition keeping in mind the main pwm signal reference).

    Of course, it is possible to make some calculation based on the main timer counter in order to estimate the number of secondary pwm cycles.

    But there is some simple way to know, or synchronize the ADC conversion results, with the original main pwm signal?

    Best regards,
    Oscar
  • If you use burst mode, you will get 5 different ADC results. I think you can tell which one is the most recent by looking at the round-robin pointer. You can also trigger an interrupt, DMA, or CLA task only on the 5th SOC: when all 5 samples are ready.
  • My idea of using the pwm peripheral to generate SOCs is to ensure an easy way to synchronize it with the main pwm. Using a pwm with 5x the frequency of the main pwm will not allow this mode.