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.

TMS320F280049C: Trip zone 4 not working through ePWM x-bar

Part Number: TMS320F280049C

I'm trying to get a number of external trip signals routed to the ePWM modules.

One of the signal chains is:
GPIO9 -> XBARINPUT8 -> ePWMXBAR MUX19.1 -> TRIP4 -> EPWM.TZ4

EALLOW;
InputXbarRegs.INPUT8SELECT = 9;

EpwmXbarRegs.TRIP4MUX16TO31.bit.MUX19 = 1;
EpwmXbarRegs.TRIP4MUXENABLE = 1;
EpwmXbarRegs.TRIPOUTINV.bit.TRIP4 = 1;

EPwm1Regs.TZSEL.bit.OSHT4 = 1
EDIS;

If I use TZ1 mapped to INPUT1, without the ePWM X-bar, it works fine.
It seem like the ePWM X-bar TRIP4 signal is not connected to the ePWM TZ4, as flipping the TRIPOUTINV bit should cause a trip in any case.
I can see that the input X-bar sees the GPIO signal, in the XBARFLAG registers.

Am I missing an enable somewhere?

  • You need to select INPUTXBAR's INPUT8 for EPWM TRIP 4. You need to use the table "ePWM X-BAR Mux Configuration Table" in the Technical Reference Manual to see which input that is 19.1. You are doing this part correctly. 

    EpwmXbarRegs.TRIP4MUX16TO31.bit.MUX19 = 1;

    But then to enable the MUX19 for TRIP4, you need to set the right bit...

    EpwmXbarRegs.TRIP4MUXENABLE = 1 << 19;

    Good luck with the rest of your development. Please mark this as VERIFIED for other users to see.

    Nima Eskandari

  • Unfortunately I had a typo in my example :(

    The line I have in my code is actually:

    EPwmXbarRegs.TRIP4MUXENABLE.bit.MUX19 = 1; // 1:Enable MUX19 for TZ 4

    and it is still not working. But even if I had the wrong MUX enable, I would think that flipping the inverter should have tripped the PWM.
    There must be something else missing.

  • Were you able to make any progress?

  • Yes, sorry for not updating the issue.

    I finally found out that TRIP4 and TZ4 are not connected. I needed to use the Digital Compare instead.
    I think the documentation relating to this could be a bit more clear. In some of the drawings it looks like TRIP1-3 is the same as TZ1-3 and I assumed that this was the same for TRIP4. The naming of signals in the documentation is not always consistent.