TI中文支持网
TI专业的中文技术问题搜集分享网站

TMS320F28027的TZ怎么理解

void HAL_setupFaults(HAL_Handle handle)
{
HAL_Obj *obj = (HAL_Obj *)handle;
uint_least8_t cnt;

// Configure Trip Mechanism for the Motor control software
// -Cycle by cycle trip on CPU halt
// -One shot fault trip zone
// These trips need to be repeated for EPWM1 ,2 & 3
for(cnt=0;cnt<3;cnt++)
{
PWM_enableTripZoneSrc(obj->pwmHandle[cnt],PWM_TripZoneSrc_CycleByCycle_TZ6_NOT);

PWM_enableTripZoneSrc(obj->pwmHandle[cnt],PWM_TripZoneSrc_OneShot_TZ1_NOT);

// What do we want the OST/CBC events to do?
// TZA events can force EPWMxA
// TZB events can force EPWMxB

PWM_setTripZoneState_TZA(obj->pwmHandle[cnt],PWM_TripZoneState_EPWM_Low);
PWM_setTripZoneState_TZB(obj->pwmHandle[cnt],PWM_TripZoneState_EPWM_Low);
}

return;
} // end of HAL_setupFaults() function

求教!请问一下TZ的低电平触发是写死的还是能修改?能修改怎么改?

Seven Han:

www.ti.com.cn/…/spruge9e.pdf

void HAL_setupFaults(HAL_Handle handle)
{
HAL_Obj *obj = (HAL_Obj *)handle;
uint_least8_t cnt;

// Configure Trip Mechanism for the Motor control software
// -Cycle by cycle trip on CPU halt
// -One shot fault trip zone
// These trips need to be repeated for EPWM1 ,2 & 3
for(cnt=0;cnt<3;cnt++)
{
PWM_enableTripZoneSrc(obj->pwmHandle[cnt],PWM_TripZoneSrc_CycleByCycle_TZ6_NOT);

PWM_enableTripZoneSrc(obj->pwmHandle[cnt],PWM_TripZoneSrc_OneShot_TZ1_NOT);

// What do we want the OST/CBC events to do?
// TZA events can force EPWMxA
// TZB events can force EPWMxB

PWM_setTripZoneState_TZA(obj->pwmHandle[cnt],PWM_TripZoneState_EPWM_Low);
PWM_setTripZoneState_TZB(obj->pwmHandle[cnt],PWM_TripZoneState_EPWM_Low);
}

return;
} // end of HAL_setupFaults() function

求教!请问一下TZ的低电平触发是写死的还是能修改?能修改怎么改?

user5611825:

回复 Seven Han:

谢谢老师,也就是低电平触发是吧能设成高电平触发吗

void HAL_setupFaults(HAL_Handle handle)
{
HAL_Obj *obj = (HAL_Obj *)handle;
uint_least8_t cnt;

// Configure Trip Mechanism for the Motor control software
// -Cycle by cycle trip on CPU halt
// -One shot fault trip zone
// These trips need to be repeated for EPWM1 ,2 & 3
for(cnt=0;cnt<3;cnt++)
{
PWM_enableTripZoneSrc(obj->pwmHandle[cnt],PWM_TripZoneSrc_CycleByCycle_TZ6_NOT);

PWM_enableTripZoneSrc(obj->pwmHandle[cnt],PWM_TripZoneSrc_OneShot_TZ1_NOT);

// What do we want the OST/CBC events to do?
// TZA events can force EPWMxA
// TZB events can force EPWMxB

PWM_setTripZoneState_TZA(obj->pwmHandle[cnt],PWM_TripZoneState_EPWM_Low);
PWM_setTripZoneState_TZB(obj->pwmHandle[cnt],PWM_TripZoneState_EPWM_Low);
}

return;
} // end of HAL_setupFaults() function

求教!请问一下TZ的低电平触发是写死的还是能修改?能修改怎么改?

user5919672:

回复 Seven Han:

hi,请问这个文档在哪?

void HAL_setupFaults(HAL_Handle handle)
{
HAL_Obj *obj = (HAL_Obj *)handle;
uint_least8_t cnt;

// Configure Trip Mechanism for the Motor control software
// -Cycle by cycle trip on CPU halt
// -One shot fault trip zone
// These trips need to be repeated for EPWM1 ,2 & 3
for(cnt=0;cnt<3;cnt++)
{
PWM_enableTripZoneSrc(obj->pwmHandle[cnt],PWM_TripZoneSrc_CycleByCycle_TZ6_NOT);

PWM_enableTripZoneSrc(obj->pwmHandle[cnt],PWM_TripZoneSrc_OneShot_TZ1_NOT);

// What do we want the OST/CBC events to do?
// TZA events can force EPWMxA
// TZB events can force EPWMxB

PWM_setTripZoneState_TZA(obj->pwmHandle[cnt],PWM_TripZoneState_EPWM_Low);
PWM_setTripZoneState_TZB(obj->pwmHandle[cnt],PWM_TripZoneState_EPWM_Low);
}

return;
} // end of HAL_setupFaults() function

求教!请问一下TZ的低电平触发是写死的还是能修改?能修改怎么改?

Susan Yang:

回复 user5919672:

您可以参考 www.ti.com/…/sprui09.pdf 的 3.2.7 Trip-Zone (TZ) Submodule

若有其他问题请您重新发帖询问,请不要跟踪旧贴,谢谢

赞(0)
未经允许不得转载:TI中文支持网 » TMS320F28027的TZ怎么理解
分享到: 更多 (0)