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.

28069比较器模块



现使用Comparator Block做限流控制,设置如下

即Comparator2正端接ADCINA2,负端接内部DAC,将DCAEVT2和DCBEVT2 配制成CBC, 当ADCA2大于DAC时,则产生CBC事件,现在的问题是,当正端ADCINA2撤销后,PWM信号依旧封锁,并没有恢复,而限流希望信号撤销后PWM恢复,请问上面代码有什么问题吗

  • shizhong,

     你应该设置成One-Shot (OSHT)模式,CBC必须在中断中清除出错事件,一般是用于短路保护。OSHT模式是用于限流。

    Eric

  • Eric Ma:

    您好,请问您是不是说反了,CBC是限流,而OSHT是短路呀,CBC应该是信号撤销,就自动恢复吧

  • shsizhong,

      不好意思,说反了。

    one-shot trip for major short circuits or over current conditions。

    cycle-by-cycle trip for current limiting operation。

    下面是对CBC的说明

    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.

    Eric

  • 你的代码中看不出什么问题,你有没有直接量一下芯片的那个ADC引脚,看一下撤销后这里的电平是否真的低于DAC的参考值。

    Eric

  • 您好,刚测量了,撤销之后,ADC仍然没变,我是用导线接的,导线撤掉之后,ADC口没变,我用的是F2803xcontrolCARD,ADC口都是悬着的,是不是这样操作就是ADC口一直为高,除非把ADC口接一下地

  • shizhong,

    ADC悬空的时候,ADC引脚会有一个不能确定的电压状态,所以这个值有可能会大于内部的DAC,导致PWM一直封锁。而实际应用中,也是不会让这个保护信号ADC输入引脚悬空的。保护信号只会大于或是小于内部DAC的参考值,鉴于此,你如果只是要测试TZ的性能的话,可以用一个电位器。如果要实际测的话,就把它连上具体电路,然后模拟过流情况。

    Eric