I have got a report from customer about trip zone error.
LG is using TMS320F28035 and they are using trip function to shut down PWM. Below is the source code for trip configuration and the configuration is one shot time and active falling.
GpioCtrlRegs.GPAMUX1.bit.GPIO12 = 1; // Configure GPIO12 as /TZ1
GpioCtrlRegs.GPAMUX1.bit.GPIO13 = 1; // Configure GPIO13 as /TZ2
GpioCtrlRegs.GPAMUX1.bit.GPIO14 = 1; // Configure GPIO14 as /TZ3
GpioCtrlRegs.GPAQSEL1.bit.GPIO12 = 1; // Asynch input GPIO12 (TZ1)
GpioCtrlRegs.GPAQSEL1.bit.GPIO13 = 1; // Asynch input GPIO13 (TZ2)
GpioCtrlRegs.GPAQSEL1.bit.GPIO14 = 1; // Asynch input GPIO14 (TZ3)
EPwm1Regs.TZSEL.bit.OSHT1 = 1; // Using of One-Shot Trip-Zone1
EPwm1Regs.TZSEL.bit.OSHT2 = 1; // Using of One-Shot Trip-Zone2
EPwm1Regs.TZSEL.bit.OSHT3 = 1; // Using of One-Shot Trip-Zone3
EPwm2Regs.TZSEL.bit.OSHT1 = 1; // Using of One-Shot Trip-Zone1
EPwm2Regs.TZSEL.bit.OSHT2 = 1; // Using of One-Shot Trip-Zone2
EPwm2Regs.TZSEL.bit.OSHT3 = 1; // Using of One-Shot Trip-Zone3
EPwm3Regs.TZSEL.bit.OSHT1 = 1; // Using of One-Shot Trip-Zone1
EPwm3Regs.TZSEL.bit.OSHT2 = 1; // Using of One-Shot Trip-Zone2
EPwm3Regs.TZSEL.bit.OSHT3 = 1; // Using of One-Shot Trip-Zone3
EPwm1Regs.TZCTL.bit.TZA = TZ_FORCE_HI;
EPwm1Regs.TZCTL.bit.TZB = TZ_FORCE_HI;
EPwm2Regs.TZCTL.bit.TZA = TZ_FORCE_HI;
EPwm2Regs.TZCTL.bit.TZB = TZ_FORCE_HI;
EPwm3Regs.TZCTL.bit.TZA = TZ_FORCE_HI;
EPwm3Regs.TZCTL.bit.TZB = TZ_FORCE_HI;
The problem is that PWM stopped on falling edge(active low) but PWM generates on rising edge(it seems like that trip detection is not latched).
Q1 : When the trip takes place on falling edge(active low), is it latched? I mean that the PWM does not generate any more once the trip took place even though the trip signal is toggling. In customer’s case, PWM will generate on rising edge after trip on falling edge in OST mode.
Q2 : Could you inform me of how to enable PWM after a trip took place?
Thanks a lot.
Best regards,
Thomas Song