Because of the holidays, TI E2E™ design support forum responses will be delayed from Dec. 25 through Jan. 2. Thank you for your patience.

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 it able to use 12 TRIP signal for PWM TZ

Part Number: TMS320F28388D

Hi Expert,

My customer want to do over current protection by using 12 comparators inside F28388,  then send 12 different CMPSS event signal to  different PWM modules.

what they require is to use all 12 TRIP signal below, there is no issue to use TRIP4, TRIP5,TRIP7,,, which connected to ePWM X-BAR,

but for TRIP1,TRIP2,TRIP3,TRIP6, these are connected to input X-BAR. there are checking if these signal can connect to CMPSS?

what I am thinking is that these CMPSS signal like CTRIPH can connected to output X-bar and then GPIO pin, and the GPIO pin can be connected to input X-bar, then can go to ePWM module as TRIP1,TRIP2,TRIP3,TRIP6, 

I am not sure if these can be done only by software, do they require to do PCB layout to connect GPIO of OUTPUTXBARx to another GPIO which used as input X-bar?

  • Hello,

    Good news! For most use cases, there's actually no need for any external connections or GPIO interaction! I'll first address the configuration settings needed to do this, then also address the GPIO question for the sake of completeness.

    If you look in the device TRM, Table 17-3. ePWM X-BAR Mux Configuration Table, note that each of the CMPSS modules allows you to send a 'CMPSSx.CTRIPH_OR_CTRIPL' signal to the ePWM, which is a logical OR of the CTRIPH/CTRIPL signals. This should allow you to halve the number of ePWM XBAR inputs that are required.

    Additionally, each ePWM XBAR input can actually be set to a logical OR of a selection of the 32 MUXes. This allows you to send every CMPSS CTRIPH/CTRIPL signal along the same ePWM TRIPx input!

    1. TRIP4MUXENABLE
      1. [MUX0,2,4,6,8,10] = 0x1 (enabled)
    2. TRIP4MUX0TO15CFG
      1. [MUX0,2,4,6,8,10] =   0x1 (CMPSS1-6.CTRIPH_OR_CTRIPL)

    Now, only TRIP4 is required to send all 12 CMPSS trip signals to the ePWM- no need for any GPIO interactions at all!

    Finally, if a logical OR of each of the CMPSS signals is not sufficient for the logic desired in the ePWM, each of the TRIPx inputs can be set to a different combination of CMPSS inputs using the TRIPxMUXENABLE, TRIPxMUX0TO15CFG, and TRIPxMUX16TO31CFG registers, where 'x' is any number 4-12.

    Note:

    For completeness, I'll also address the workaround question of GPIO routing, even though it shouldn't be required here thanks to the ePWM XBAR configuration possibilities. If you utilize the output XBAR to route something to a selected GPIO, then set that same GPIO to an input using the Input XBAR, there is no need for additional external connections- the output and input signals become directly connected.

    As an example, say that CMPSS5.CTRIPOUTH is routed to GPIO 3 via the Output XBAR (CMPSS5 and GPIO3 chosen arbitrarily here). By setting the Input XBAR such that one of its inputs is set to the same GPIO- GPIO3 in this case- you are able to route CTRIPOUTH anywhere that the Input XBAR can be routed to without the need for additional external connection.

    A useful side-effect of this is that if you are utilizing a lower-pin device that does not have all of the device GPIOs available externally, you are still able to use the GPIOs that are unavailable externally to route signals that do not have a direct internal connection.

    Always happy to help,
    Jason Osborn
    Note 2: Key takeaways in this post are bolded.

  • Hi Jason,

    Thanks a lot for your reply in details.

    There is no allow to use logical OR to combine the signal, all 12 signal are separated, so workaround of GPIO routing internally should be used for TRIP1,TRIP2,TRIP3,TRIP6, and make those GPIO unused externally. 

    Thanks for your confirm. 

  • If every single signal has independent logic, I believe that might be the easiest way to do what you're looking for.

    Regards,

    Jason Osborn