Hello, all.
I would like to set ePWM to high by trip zone by force by software.
However, an ePWM output is not set to High although trip seems to have started.
The following is description.
/////
void InitTripZone(volatile struct EPWM_REGS *pst)
{
pst->TZCTL2.bit.ETZE = 0; // Ignore TZCTL2
/*
00 High impedance (EPWMxA/B = High-impedance state)
01 Force EPWMxA/B to a high state
10 Force EPWMxA/B to a low state
11 Do nothing, no action is taken on EPWMxA/B.
*/
pst->TZCTL.bit.TZA = 1;
pst->TZCTL.bit.TZB = 1;
}
void StopPwm(volatile struct EPWM_REGS *pst)
{
EALLOW;
pst->TZFRC.bit.OST = 1; // Force One Shot Trip
EDIS;
}
void StartPwm(volatile struct EPWM_REGS *pst)
{
EALLOW;
pst->TZCLR.bit.OST = 1; // Release One Shot Trip
EDIS;
}
/////
Regards, Yasuhisa Kadono.