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.

trip zone 模块

请问one shot 和CBC有什么区别?

  • 楼主你好!

    简单来说CBC是一旦TZ信号出现以后,是基于每个周期切断PWM输出的,如果TZ保护信号撤除掉了,那么下一个PWM周期输出将恢复。

    而One Shot指的是一旦TZ保护信号出现则彻底关断PWM输出,在保护信号撤除以后,需要软件清除掉TZ保护寄存器相应标志后,PWM才会继续输出。

    因此CBC通过是用来做限流的,而One shot模式用来做过流保护如IPM过流保护。

  • 你好,这是不是意味着,在使用one shot 中断时,不要将中断标志位清零,而使用CBC时就要响应一次清零一次呢?

  • One Shot:  一次性

    CBC: Cycle By Cycle

  • 您好,我用比较器做限流保护,可发现,故障信号消失后,并没有恢复PWM波,请问是什么原因,代码如下

    EALLOW;
    Comp2Regs.COMPCTL.bit.COMPDACEN = 1; // Power up Comparator 2 locally
    Comp2Regs.COMPCTL.bit.CMPINV = 1;
    Comp2Regs.COMPCTL.bit.COMPSOURCE = 0; // Connect the inverting input to the internal DAC
    Comp2Regs.DACVAL.bit.DACVAL = 512;

    EPwm1Regs.DCTRIPSEL.bit.DCAHCOMPSEL = DC_COMP2OUT; // DCAH = Comparator 2 output
    EPwm1Regs.DCTRIPSEL.bit.DCALCOMPSEL = DC_TZ2; // DCAL = TZ2
    EPwm1Regs.TZDCSEL.bit.DCAEVT2 = TZ_DCAH_LOW; // DCAEVT1 = DCAH low (will become active as Comparator output goes low)
    EPwm1Regs.DCACTL.bit.EVT2SRCSEL = DC_EVT2; // DCAEVT1 = DCAEVT1 (not filtered)
    EPwm1Regs.DCACTL.bit.EVT2FRCSYNCSEL = DC_EVT_ASYNC; // Take async path

    EPwm1Regs.DCTRIPSEL.bit.DCBHCOMPSEL = DC_COMP2OUT; // DCBH = Comparator 2 output
    EPwm1Regs.DCTRIPSEL.bit.DCBLCOMPSEL = DC_TZ2; // DCAL = TZ2
    EPwm1Regs.TZDCSEL.bit.DCBEVT2 = TZ_DCBH_LOW; // DCBEVT1 = DCBH low (will become active as Comparator output goes low)
    EPwm1Regs.DCBCTL.bit.EVT2SRCSEL = DC_EVT2; // DCBEVT1 = DCBEVT1 (not filtered)
    EPwm1Regs.DCBCTL.bit.EVT2FRCSYNCSEL = DC_EVT_ASYNC; // Take async path

    EPwm1Regs.TZSEL.bit.DCAEVT2 = 1;
    EPwm1Regs.TZSEL.bit.DCBEVT2 = 1;

    EPwm1Regs.TZCTL.bit.TZA = TZ_FORCE_LO; 
    EPwm1Regs.TZCTL.bit.TZB = TZ_FORCE_LO;

    EDIS