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.

C2000-DIGITAL-CONTROL-LIBRARY: PWM control logic

Part Number: C2000-DIGITAL-CONTROL-LIBRARY
Other Parts Discussed in Thread: SYSCONFIG, TMS320F280039C

Dear Sir,

    we want a PWM control logic show as below, when OC happens(using CMPSS), PWM off immediately; then when the current is below the OC Back, the PWM on immediately with duty unchange. 

  • Hello Bishlant,

    Which device are you using? Depending on the device, the ePWM has different features  and configurations available.

  • Hello Omer,

    it's 280039, thanks.

  • Hi Bishlant,

    I don't think this is possible to implement on PWM on F28003x, but this should be possible using the CLB. If you're willing to use CLB to produce your EPWM output, I can create a sample configuration that demonstrates this implementation.

    Thank you,

    Luke

  • Hi Luke, that would be great, I never use CLB, please help create a sample. thanks,

  • Hi Blishlant,

    What device are you using? I may need some additional time to create the CLB configuration in SysConfig, should be able to provide this to you by tomorrow.

    Thank you,

    Luke

  • Hi Luke, it's 280039, please take your time, tomorrow is fine. thanks.

  • Hi Bishlant,

    I created this .syscfg file using EPWM1A and CMPSS1:

    trip_and_restart_pwm_with_cmpss.syscfg

    I have not tested this on hardware so hopefully there is nothing missing, you will need to add your own PWM and CMPSS configuration, so feel free to delete the PWM module from this sysconfig file and configure all the PWM settings yourself. Here are some notes on this CLB configuration: 

    /////////////////////////////////////////////

    clb config notes:

    goal:

    take in a pwm output and two cmpss conditions. trip the pwm when triph is true, and do not untrip it until tripl is false.
    Once the pwm is no longer tripped, restart the pwm cycle

    inputs:
    input0: pwm1a
    input1: cmpss1_tripl(via clb xbar)
    input2: cmpss1_triph(via clb xbar)

    have a two-state FSM
    state 0: tripped state
    state 1: non-tripped state
    state 0->1 transition: when tripl is false
    state 1->0 transition: when triph is true

    outputs:
    output 1:sync pulse to restart pwm(goes true when in state 0 and tripl is false)
    send this to a gpio via CLB outputxbar, read this gpio via inputxbar 5, configure epwm1 to use inputxbar5 as a sync source
    output 0: final pwm output(should be a logical AND between pwm1a input and FSM state
    use output override feature to override pwm1a

    ////////////////////////////////////////////////

    It's possible the sync pulse will not be generated correctly since it is a logical AND of two conditions that will only be true simultaneously for a very short period. You can send the sync pulse to another GPIO via CLB outputxbar to test if it's working properly.

    Let me know if you have any additional questions.

    Thank you,

    Luke

  • Hi Luke, i just try to open the sysconfig file, it says Device not found: TMS320F280039C. This device may be available in a newer version of SysConfig. it's C2000 SysConfig (5.01.00.00) that i'm using

  • Hi Bishlant,

    My apologies, I was using a version of sysconfig that uses GPNs instead of generic device names. Try this SysConfig file:

    6012.trip_and_restart_pwm_with_cmpss.syscfg