Tool/software: Code Composer Studio
Hi,
I am wondering if I can use a GPIO, for example GPIO119 to send a trip signal to the ePWMs, forcing it low? If so, could you please review and correct the following code for me. I don't get PWM signals out, always low.
1. assign GPIO119 to INPUT1.
EALLOW;
InputXbarRegs.INPUT1SELECT = 119;
GpioDataRegs.GPDDAT.bit.GPIO119 = 0;
EDIS;
2. initialize it in ePWM2
EALLOW;
EPwm2Regs.TZSEL.bit.OSHT1 = 1; // Trip-zone 1 (TZ1) Select
EPwm2Regs.TZEINT.bit.OST=1;
EPwm2Regs.TZCTL.bit.TZA = 2; // EPWM2A forces to low
EPwm2Regs.TZCLR.bit.OST = 1; // clear trip zone flags
EDIS;
}