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.
CBC和OSHT这两种保护是怎么理解,怎么使用,谢谢
CBC和One shot的解释在user guide SPRUG04A 的解释如下图:
• Cycle-by-Cycle (CBC):
When a cycle-by-cycle trip event occurs, the action specified in the TZCTL register is carried out
immediately on the EPWMxA and/or EPWMxB output. Table 19 lists the possible actions. In addition,
the cycle-by-cycle trip event flag (TZFLG[CBC]) 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 ePWM time-base counter
reaches zero (TBCTR = 0x0000) if the trip event is no longer present. Therefore, in this mode, the trip
event is cleared or reset every PWM cycle. The TZFLG[CBC] flag bit will remain set until it is manually
cleared by writing to the TZCLR[CBC] bit. If the cycle-by-cycle trip event is still present when the
TZFLG[CBC] bit is cleared, then it will again be immediately set.
意思是,CBC模式就是cycle by cycle模式,他的特点是一旦触发就会立即装载TZCTL中TZA,TZB的配置的PWM状态(高,低,高阻,或者不变),但是每次PWM计数器为0的时候他会再次检测TZ引脚的输入是否仍然被触发,如果仍然被触发,就继续保护,如果不再被触发,就恢复PWM输出
• One-Shot (OSHT):
When a one-shot trip event occurs, the action specified in the TZCTL register is carried out
immediately on the EPWMxA and/or EPWMxB output. Table 19 lists the possible actions. In addition,
the one-shot trip event flag (TZFLG[OST]) is set and a EPWMx_TZINT interrupt is generated if it is
enabled in the TZEINT register and PIE peripheral. The one-shot trip condition must be cleared
manually by writing to the TZCLR[OST] bit.
One-shot总的来说区别就是,一旦触发就无法自动恢复,会始终处于保护状态,直到手动清除TZFLG中的OST位,就是在TZCLR中给OST位赋值1.
想请教一下,按照您的介绍,我是不是可以这样理解,CBC模式下的保护会在计数器归零的时候自动恢复PWM输出,但是此时TZFLG(CBC)不会被清0。也就是说在手动清除TZFLG(CBC)之前,CBC可以逐周期保护(强制PWM的输出状态),但是不会再次发出中断请求;而在OST模式下,一旦触发保护,无法自动恢复,直到TZFLG(OST)被清零,之后可以再次触发OST保护,也可以再次发出中断请求。
不知道理解是否有问题?