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: ADC SOC using ePWM while running closed loop current control of buck converter

Part Number: TMS320F28379D
Other Parts Discussed in Thread: CONTROLSUITE, C2000WARE

Hi

I checked the sample code and some points are not clear.

In this indefinite loop (picture below), why CTRMODE is changed? I am using UP counter mode and if I use this for SoC conversion, will it affect PWM operation?

Also where will the actual control located in this code.  Should it be after start ePWM commands in picture below.

Thanks

  • Hi Krishan,

    I checked the sample code

    Which sample code are you referring to? Is the snippet you provided from that sample code?

    if I use this for SoC conversion, will it affect PWM operation?

    Assuming that you are only using the PWM to trigger the ADC, no, this should not affect how your PWM operates. What is happening is that you are halting the EPWM counter until you have enabled SOC triggering. Once you complete all of the ADC conversions (fill up the buffer) then the PWM counter will stop. This is also optional depending on what you are trying to accomplish. 

    Also where will the actual control located in this code.  Should it be after start ePWM commands in picture below.

    What kind of control are you trying to implement? Without knowledge on this it is difficult to advise.

    Best Regards,

    Marlyn

  • Hi Marlyn

    Thanks for the response,

    - The sample code is from TI control suite for 28379D controller for triggering ADC with PWM.

    - I am trying to run a closed loop current control for a buck converter, where I am measuring current and generating PWM using that.

    The interaction of PWM switching frequency and ADC sampling frequency is causing a lot of issue with control. I can clearly see low frequency content in ADC signal. That's why I want to sample ADC synchronously with EPWM whie running closed loop current control.

    This looks a very general problem and there must be some sample code. I couldn't find that. I tried changing my code as much as I could find from various sources. 

    Thanks a lot.

  • Hi Krishan,

    I would recommend taking a look at C2000Ware, this is our current software platform. We don't update controlSuite anymore. Within C2000Ware you'll find more updated software, specifically for triggering ADC with PWM.

    Also, I would take a look at the TIDM-DC-DC-BUCK (Digitally Controlled Non-Isolated DC/DC Buck Converter Reference Design). You can find the software through our Digital Power SDK (C:\ti\c2000\C2000Ware_DigitalPower_SDK_Version\solutions\tidm_dc_dc_buck). This will be a good reference to look at.

    Best Regards,

    Marlyn