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.

TMS320F2800132: TMS320F28E120 Trip Zone Setting

Part Number: TMS320F2800132

Hello everyone,

Im trying to configure C2000 TMS320F28E120 mcu.

I want to configure a GPIO and Trip Zone to set all pwms to low.

When external signal which is connected to the my GPIO pin, pulls low, All pwms should be low. (This will be used for over current protection.)

But I couldn't set the corret configurations. You can find my current setup configuration below, Please show me where I did mistake,

    EALLOW;
    GpioCtrlRegs.GPAPUD.bit.GPIO6 = 0;   // Enable pullup on GPIO6
    GpioCtrlRegs.GPAMUX1.bit.GPIO6 = 0;
    GpioCtrlRegs.GPAGMUX1.bit.GPIO6 = 0;
    GpioCtrlRegs.GPADIR.bit.GPIO6 = 0;// input
    GpioCtrlRegs.GPAQSEL1.bit.GPIO6 = 1; // 0,1,Qualification (3 samples)
    EDIS;

EALLOW;
InputXbarRegs.INPUT1SELECT.bit.SELECT = 0x6;   // GPIO6 = TZ1
Pwm1Regs.TZSEL.bit.OST1 = 1;   // TRIP1 one-shot
Pwm1Regs.TZCTL.bit.TZA = 2;     //Set Low
Pwm1Regs.TZCTL.bit.TZB = 2;
Pwm1Regs.TZCBCOSTCLR.bit.OST1 = 0;

PwmXbarRegs.TRIPOUTINV.bit.OUT1 = 1;
PwmXbarRegs.TRIP1MUX0TO15CFG.bit.MUX8 = 1;
PwmXbarRegs.TRIP1MUXENABLE.bit.MUX8 = 1;
EDIS;
image.png
image.png

  • Hi Batuhan,

    Seems here is an issue. You should configure Mux G1 Channel 1 to pass the signal from INPUTXBAR1.

    PwmXbarRegs.TRIP1MUX0TO15CFG.bit.MUX8 = 1;
    PwmXbarRegs.TRIP1MUXENABLE.bit.MUX8 = 1;

    Thanks,

    Jiaxin

  • You are right but main reason is not that. I tried many combinations and I postted wrong config. as a result, main reason to not working properly is not that.

    Pwm1Regs.TZSEL.bit.OST1 = 1; config must be setted after set,

    PwmXbarRegs.TRIP1MUX0TO15CFG.bit.MUX8 = 1;
    PwmXbarRegs.TRIP1MUXENABLE.bit.MUX8 = 1;

    I have tried many time and this is actuall reason. Here it's TRM note;