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.

TMS320F28379D: About Synchronizing PWM with ADC

Part Number: TMS320F28379D
Other Parts Discussed in Thread: C2000WARE

Hello,

I am trying to program a power supply with tms320f28379d. In order to improve the response of its three sources, I want the pwm signals I produce to be in sync with the readings I make on the ADC. When I looked at the reference manual for this, there were some points that I could not understand.

Q 1: If I have 2 PWM signals to send to my mosfet drivers for control, can I create a SOC signal that will synchronize my ADCs with any of them? So to do this do I need to create a 3rd signal that will be a copy of these signals?

Q 2: In the example in the reference manual 10.6.2 Oversampled Conversion from ePWM Trigger, all SOCs are connected to the same trigger signal. In this case, I think they will be wanted to be read at the same time, but will they be read in order of priority?

Q 3: When we create SOC with the ePWM signal and then define it on the ADC side, do we need to define an interrupt other than this?

Q 4: Can you share an example of reading with ADC connected to an SOC created with ePWM signal?

Q 5: "10.6.2 Oversampled Conversion from ePWM Trigger" Is there an example of configuring ePWM directly referring to this topic?

Kind regards
Cihangir

  • Hello Cihangir,

    The easiest way to think about the ADC and the ePWM in this context is that the ePWM triggers the ADC- synchronization of the two rarely comes up because one directly triggers the other. Does that make sense? For your specific questions, I'll largely be referring to the Driverlib examples from the C2000Ware Software Development Kit- these are very useful for observing and learning peripheral properties in a practical context.

    1. You can choose either of the two ePWMs. By configuring the Event-Trigger submodule of your chosen ePWM appropriately, it can trigger an SOC which will be received directly by the ADC- no need for additional copied signals. This is described in the TRM section 15.10 'Event-Trigger (ET) Submodule'
    2. When multiple SOCs occur at the same time, they are read in priority order, not at the same time.
      1. Burst mode does exist, described by TRM 11.8.1 Burst Mode Example and 11.8.2 Burst Mode Priority, but isn't used in that example.
    3. No need for any additional interrupts! Using CCS, use the import project function and navigate to the following folder: {C2000Ware Install}\driverlib\f2837xd\examples\cpu1\adc . Import the 'adc_ex2_soc_epwm' project. You can see a complete configuration of an ePWM-triggered ADC conversion. The only interrupt in this project is the one that reads the ADC once it's complete!
    4. See #3
    5. In CCS, navigate to the same folder from #3. Import the 'adc_ex14_soc_oversampling' project. This is exactly what you're looking for!

    I highly recommend going through the rest of these examples as well- they're a fantastic resource. Additionally, the C2000Ware SDK has a 'training' folder, which includes a link to the C2000 Academy- this is directly designed as an introduction to the C2000 environment, and chapter 4. Analog Subsystem has an ADC-specific training page.

    Regards,
    Jason Osborn
    Note: Key takeaways from this post are bolded.