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.

TMS320F28388D: Is ePWM TBCTL FREE_SOFT functional in normal funciton mode?

Part Number: TMS320F28388D
Other Parts Discussed in Thread: C2000WARE, SYSCONFIG

Tool/software:

Dear Expert,

Is ePWM TBCTL FREE_SOFT functional in normal funciton mode(non-debug mode)? In other words, do we need to set FREE_SOFT to "1x: Free run" in normal function case when we need a continuous PWM output?

  • Echo,

    Yes, that is correct, you need to set FREE_SOFT to "1x: Free run" in normal function case when need a continuous PWM output.

    Regards,

    Sumit

  • Hi Sumit,

    Thanks for your help. In C2000 examples code, I can't find such setting in most of the normal function cases, I attach one aq case for your reference.

    0724.epwm_ex2_updown_aq.c
    Fullscreen
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    //#############################################################################
    //
    // FILE: epwm_ex2_updown_aq.c
    //
    // TITLE: ePWM Action Qualifier Module - Using up/down count.
    //
    //! \addtogroup driver_example_list
    //! <h1> ePWM Up Down Count Action Qualifier</h1>
    //!
    //! This example configures ePWM1, ePWM2, ePWM3 to produce a waveform with
    //! independent modulation on ePWMxA and ePWMxB.
    //!
    //! The compare values CMPA and CMPB are modified within the ePWM's ISR.
    //!
    //! The TB counter is in up/down count mode for this example.
    //!
    //! View the ePWM1A/B(GPIO0 & GPIO1), ePWM2A/B(GPIO2 &GPIO3)
    //! and ePWM3A/B(GPIO4 & GPIO5) waveforms on oscilloscope.
    //
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

  • Echo,

    In C2000ware example, by default/upon reset, this bit is set to zero as shown in TRM section. So that is why you don't see the API/code being called.

    Please build the code first and then follow the instructions to see the generated files by .sysconfig

    If you open .sysconfig file "epwm_ex2_updown_aq.syscfg" in the project you can find this setting as shown in image below. If you change this to free run, the generated code will change accordingly in "board.c" of "Generate Source" folder of the project. 

    If you change this setting to "Free run", you can see the change in generated code as shown in image below. API for this setting get added:

    Alternatively, you can also find this location by building project first then ctrl+click Board_init(); and then ctrl+click EPWM_init(); 

    Regards,

    Sumit

  • Hi Sumit,

    https://e2e.ti.com/support/microcontrollers/c2000-microcontrollers-group/c2000/f/c2000-microcontrollers-forum/897696/tms320f28027f-difference-between-timer-emulation-modes

    In another ticket, it seems the emulation control bits only works "During debug with the debug probe (i.e. emulator)". In other word, when I use pwm in non-debug mode, FREE_SOFT bit should not work at all.. 

  • Echo,

    These bits just define behavior during debug mode. In non-debug mode, it will be simply in "do not care" mode or will not affect operation.

    Regards,

    Sumit