Hello,
I'm using Piccolo F28027's EPWM as a Buck requlator, and I'd like to use the Comparator 1 device for short-circuit protection.
I don't understand completely the Trip Zone Control Register functionality. Several Events can be assigned to an EPWM to force the output to a predefined state.
Theoretically, the priorities of the Events: 1. TZA, 2. DCAEVT1, 3. DCAEVT2.
What is the meaning of the TZA event? I cannot assing any signal to TZA event, however, this has the highest priority.
In code examples, I always see:
EPwm3Regs.DCTRIPSEL.bit.DCAHCOMPSEL = DC_COMP1OUT;
EPwm3Regs.TZDCSEL.bit.DCAEVT2 = TZ_DCAH_HI;
EPwm3Regs.DCACTL.bit.EVT2FRCSYNCSEL = DC_EVT_ASYNC;
EPwm3Regs.DCACTL.bit.EVT2SRCSEL = DC_EVT2;
EPwm3Regs.TZSEL.bit.DCAEVT2 = 1;
EPwm3Regs.TZCTL.bit.TZA = TZ_FORCE_LO;
Why should I use here TZCTL.bit.TZA, instead of TZCTL.bit.DCAEVT2 ?
If I'd like to use DCAEVT2, should I disable the higher priority DCAEVT1, and TZA by initialization: TZCTL.bit.TZA=0x3, TZCTL.bit.DCAEVT1=0x3 ???
(When I've tried the code example above with EPwm3Regs.TZCTL.bit.DCAEVT2 = TZ_FORCE_LO, then the Trip Zone didn't make any actions in case of an overcurrent event).