Part Number: TMS320F28379D
Tool/software: Code Composer Studio
This is the code sample in the project, i just try to understand how the TripFlagDMC and clearTripFlagDMC works in the chip, i dont understand how to produce the clear cmd ? i have look at the overcurrent MACRO, i understand how comparator, tripN and trip signal work, but i just cannot find exact explain on this one.
if(EPwm1Regs.TZFLG.bit.OST == 0x1)
TripFlagDMC = 1; // Trip on DMC (halt and IPM fault trip )
// If clear cmd received, reset PWM trip
if (clearTripFlagDMC)
{
GpioDataRegs.GPBDAT.bit.GPIO41 = 0; // clear the ocp latch in macro M6
TripFlagDMC = 0;
clearTripFlagDMC = 0;
GpioDataRegs.GPBDAT.bit.GPIO41 = 1;
// clear EPWM trip flags
DELAY_US(1L);
EALLOW;
EPwm1Regs.TZCLR.bit.OST = 1;
EPwm2Regs.TZCLR.bit.OST = 1;
EPwm3Regs.TZCLR.bit.OST = 1;
EDIS;
}
This is the