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.

CCS/TMS320F28379D: The overcurrent protection in IDDK PM project example

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 

  • You should be able to see this information in the relevant user guide.

    TripFlagDMC is set by the MCU if any of the three phases senses over current through the trip zone and comparator.
    ClearTripFlagDMC is a user flag that is fed in using the expressions window during debug time. When this clear flag is set, the MCU will clear all the over current flags.