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.

TMS320F28377S: CMPSS3 and CMPSS4 CBC trip combination

Part Number: TMS320F28377S
Other Parts Discussed in Thread: SYSCONFIG

Hi,

How do I configure CMPSS3 (TRIP4) to trigger CBC trip for ePWM2A and CMPSS4 (TRIP5) to trigger CBC trip for ePWM2B?

If it is not possible independently, how can I make TRIP3 or TRIP4 both trigger the CBC trip at the same time for the ePWM2A and ePWM2B outputs?

I assume DCA(H/L) is used for PWMA and DCB(H/L) is used for PWMB. correct? Why are there H and L possibilities?

  • Hi Ari,

    I recommend taking a look at the following sources:

    C2000 ePWM Developer's Guide

    ePWM Digital Compare Submodule Video 

    How do I configure CMPSS3 (TRIP4) to trigger CBC trip for ePWM2A and CMPSS4 (TRIP5) to trigger CBC trip for ePWM2B?

    It's not possible to natively have separate sources for EPWMxA and EPWMxB if you want to do CBC protection. I highlighted the path in red in the figure below. You'll notice that the output of the CBC path gets fed to both EPWMxA and EPWMxB. So if you want to use CBC then each of the trips would go to EPWMxA and EPWMxB and take on the actions specified by the TZA/TZB bits of the TBCTL register.

    You could use DCAEVT2 and DCBEVT2 bits of the TZCTL register to control EPWMxA and EPWMxB separately based on the different trips. However, if you choose to do this then the output will only reflect the desired state (ex. clear) for as long at the trip is present. This concept is explained in the video I linked above.

    If it is not possible independently, how can I make TRIP3 or TRIP4 both trigger the CBC trip at the same time for the ePWM2A and ePWM2B outputs?

    By hardware design, if you enable both trips to be CBC then the trip would occur at the same time for EPWMxA and EPWMxB. You can use the TZSEL register to select the desired trip signals to be configured for CBC.

    I assume DCA(H/L) is used for PWMA and DCB(H/L) is used for PWMB. correct? Why are there H and L possibilities?

    Correct, if you want to control the output based on when the DCxEVTs are present (ie. using the DCAEVT1/DCBEVT2 and DCBEVT1/DCBEVT2 bits of the TZCTL register).

    If you use the DCxEVT for CBC or One-Shot then it doesn't really matter as the CBC and One-Shot signals are routed to both EPWMxA and EPWMxB. You would only be concerned if the its the EVT2 or EVT1 you are configuring since only DCAEVT2/DCBEVT2 can be used for CBC and DCAEVT1/DCBEVT1 can be used for one-shot.

    H and L signals are used in case you want to compare multiple trip signals.

    If you only care for the status of one trip signal then you can program the appropriate function in the TZDSEL register. For example DCAEVT1 can be set to (DCAH-> high and DCAL-> Dont Care). Then, within the DCTRIPSEL register (snippet above) you can select TRIP4 for DCAH. This way the DCAEVT1 would be configured for when the Trip 4 signal goes high. 

      

    Best Regards,

    Marlyn

  • Thanks Marlyn,

    C2000 ePWM Developer's Guide was very usefull, Texas should make more guides like this, with even more code examples, not only using sysconfig but also using bitfield to make it easier to compare the information with the hardware manual.

    I solve the problem using:

    EPWM_enableDigitalCompareTripCombinationInput(EPWM2_BASE, EPWM_DC_COMBINATIONAL_TRIPIN4, EPWM_DC_TYPE_DCAH);
    EPWM_enableDigitalCompareTripCombinationInput(EPWM2_BASE, EPWM_DC_COMBINATIONAL_TRIPIN5, EPWM_DC_TYPE_DCAH);