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.
Tool/software: Code Composer Studio
Each ePWM module has Trip-Zone sub-module.
If a digital compare event occurs, the relevant DC trip event flag (TZFLG[DCAEVT1/2] / TZFLG[DCBEVT1/2]) is set.
Is the set relevant DC trip event flag (TZFLG[DCAEVT1/2] / TZFLG[DCBEVT1/2]) equivalent to the pwm module in a protected state?
When I clear this flag, the ePWM module returns to normal operation?
Hi,
MINGHAN DONG said:Is the set relevant DC trip event flag (TZFLG[DCAEVT1/2] / TZFLG[DCBEVT1/2]) equivalent to the pwm module in a protected state?
When I clear this flag, the ePWM module returns to normal operation?
You've to enable DCxEVTy as OST or CBC event for the trip action to last till it's cleared.
Having this flag set doesn't mean that the PWMs remain in protected state. This is only a status flag.
While the CBC/OST flags retain the protected state.
If DCxEVTy is not enabled as CBC or OST events the trip action will be active only as long as the input DCxEVTy is active, not based on TZFLG.
From TRM -
In addition, the relevant DC trip event flag (TZFLG[DCAEVT1/2] / TZFLG[DCBEVT1/2]) is set and a
EPWMx_TZINT interrupt is generated if it is enabled in the TZEINT register and PIE peripheral.
The specified condition on the pins is automatically cleared when the DC trip event is no longer
present. The TZFLG[DCAEVT1/2] or TZFLG[DCBEVT1/2] flag bit will remain set until it is manually
cleared by writing to the TZCLR[DCAEVT1/2] or TZCLR[DCBEVT1/2] bit. If the DC trip event is still
present when the TZFLG[DCAEVT1/2] or TZFLG[DCBEVT1/2] flag is cleared, then it will again be
immediately set.
If I use this function EPWM_clearTripZoneFlag, which control the EPWM_O_TZCLR register, the shut-down PWM module (OST or CBC) could re-work?
Hi,
Yes, once you clear the flag - it'll be set again if there is another trip event.