CBC和Oneshot的区别

来源:互联网 发布:域名提供商 编辑:程序博客网 时间:2024/06/10 10:57
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.
0 0