Other Parts Discussed in Thread: SYSCONFIG
hi,
i have try to enable the trip zone of the pwm but with no success.
in the config section i config this function:
EPWM_tzTriggerTripAction(epwmBaseAddr,
EPWM_TZ_TRIP_ACTION_TRI_STATE,
EPWM_OUTPUT_CH_A);
EPWM_tzTriggerTripAction(epwmBaseAddr,
EPWM_TZ_TRIP_ACTION_TRI_STATE,
EPWM_OUTPUT_CH_B);
and for the activation part this function:
EPWM_tzTripEventEnable(epwmBaseAddr,EPWM_TZ_EVENT_CYCLE_BY_CYCLE,CONFIG_GPIO0_PIN);
and toggle the IO
or this:
EPWM_tzTriggerSwEvent(epwmBaseAddr,EPWM_TZ_EVENT_CYCLE_BY_CYCLE);
on the sysconfig i have some problem, if i config the PWM like this:

it not link the TZ functionality, and if i using this configuration:

the PWM is not running at all.
i have got from TI response on this issue with this function:
void SOC_allowEpwmTzReg(uint32_t epwmInstance, uint32_t enable)
{
/* Time base clock enable register belongs to partition 1 of the CTRL MMR */
uint32_t epwmPartition = 1;
/* Unlock CTLR_MMR0 registers */
SOC_controlModuleUnlockMMR(SOC_DOMAIN_ID_MAIN, epwmPartition);
uint32_t regOffest = CSL_CTRL_MMR0_CFG0_BASE + CSL_MAIN_CTRL_MMR_CFG0_EPWM0_CTRL_PROXY + (4 * epwmInstance);
if(TRUE == enable)
{
CSL_REG32_WR(regOffest,
((CSL_REG32_RD(regOffest) & 0x710U) | (0x1U << CSL_MAIN_CTRL_MMR_CFG0_EPWM0_CTRL_PROXY_EPWM0_CTRL_EALLOW_PROXY_SHIFT)));
}
else
{
CSL_REG32_WR(regOffest,
((CSL_REG32_RD(regOffest) & 0x710U) & ~(0x1U << CSL_MAIN_CTRL_MMR_CFG0_EPWM0_CTRL_PROXY_EPWM0_CTRL_EALLOW_PROXY_SHIFT)));
}
/* Lock CTRL_MMR0 registers */
SOC_controlModuleLockMMR(SOC_DOMAIN_ID_MAIN, epwmPartition);
}
that need to wrap my trigger like this:
SOC_allowEpwmTzReg(epwmId,true);
EPWM_tzTriggerSwEvent(epwmBaseAddr,EPWM_TZ_EVENT_CYCLE_BY_CYCLE);
SOC_allowEpwmTzReg(epwmId,false);
but it did not helped.
can you pleas give me some direction for solve this problem?
thanks
Ofri