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.

CCS/LAUNCHXL-F28069M: ePWM, ADC, Required Interrupts

Part Number: LAUNCHXL-F28069M
Other Parts Discussed in Thread: CONTROLSUITE

Tool/software: Code Composer Studio

Hey all,

I need to ask about the graph below.

I have a 1kHz ePWM1A signal. So the period is 1ms. Its duty is %47 maximum. (Ton = 470us)

I want to start reading adc values on EPWM1A's rising edge, stop reading on EPWM1A's falling edge. 

While 470us Ton duty time, I want to read 100 adc values. Then while Toff, I will calculate adc rms value and change the duty cycle for the next EPWM1A signal.

PWM's required ETSEL SOC interrupts start reading adc values on rising edge (CAU) with SOC control register.  But it ends with EOC signal after 7 adc cycles I guess.The rest 99 required adc values are not being read, am I right?

My oscilloscope or ccs's registers window are not fast enough to follow so I need your help to clarify. Should I follow what happens with ccs's graph part?

I think every time adc0's EOC is on, I must trigger my adc0 again or maybe I need another cpu timer with 10us or less period to send SOC to my adc0 while Ton?

I used controlsuite's continuous adc example with round robin but that was not suitable and then modified with triggered adc example. Sorry for the confusion.

At the end, I am planning to finish reading with EPWM's CAD interrupt. Calculate the value and repeat these. 

Am I thinking right or would you give me other advices? 

Thank you.

  • Hi John,

    At least at a conceptual level, you will need to trigger the ADC 100 times using a timer (CPU or ePWM) if you want 100 evenly spaced conversions.

    Probably you want to use a second ePWM module that starts counting when you enter Ton and that has period that is as close as you can get to Ton/100.
  • Hi John,

    Were you able to get things working as desired, or do you need additional guidance?