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.

[求助]F28069 PWM使用DCAEVT1和DCBEVT1作为OSHT锁驱动无法锁死



应用中希望用COMP1OUT产生DCAEVT1和DCBEVT1作为OSHT锁驱动,但是配置完毕后测试发现是CBC模式的。

代码如下,帮忙看下那里有问题。

 GpioCtrlRegs.AIOMUX1.bit.AIO2    = 3;  // SET AIO2 ADCINA2/ COMP1A,AIO2 disabled
 Comp1Regs.COMPCTL.bit.COMPDACEN  = 1;    // Power up Comparator locally
 Comp1Regs.COMPCTL.bit.COMPSOURCE = 0;    // Connect the inverting input to internal DAC
 Comp1Regs.DACVAL.bit.DACVAL      = LLC_CURRENT_LIMIT;
 Comp1Regs.DACCTL.bit.DACSOURCE   = 0;  // 0 - DACVAL; 1 - Internal ramp for slope compensation

/***************************************************************************************************/

 EPwm1Regs.DCTRIPSEL.bit.DCAHCOMPSEL = DC_COMP1OUT;
 EPwm1Regs.TZDCSEL.bit.DCAEVT1       = TZ_DCAH_HI;
 EPwm1Regs.DCACTL.bit.EVT1SRCSEL     = DC_EVT1;
 EPwm1Regs.DCACTL.bit.EVT1FRCSYNCSEL = DC_EVT_ASYNC;

 EPwm1Regs.DCTRIPSEL.bit.DCBHCOMPSEL = DC_COMP1OUT;
 EPwm1Regs.TZDCSEL.bit.DCBEVT1       = TZ_DCBH_HI;
 EPwm1Regs.DCBCTL.bit.EVT1SRCSEL     = DC_EVT1;
 EPwm1Regs.DCBCTL.bit.EVT1FRCSYNCSEL = DC_EVT_ASYNC;

 EPwm1Regs.TZSEL.bit.DCAEVT1 = 1;                  /* Enable DCAEVT1 as one-shot-trip source for this ePWM module.*/
 EPwm1Regs.TZSEL.bit.DCBEVT1 = 1;                  /* Enable DCBEVT1 as one-shot-trip source for this ePWM module.*/
 EPwm1Regs.TZCTL.bit.TZA     = TZ_FORCE_LO;      

 EPwm1Regs.TZCTL.bit.TZB     = TZ_FORCE_LO;       

 EPwm1Regs.TZCTL.bit.DCAEVT1 = TZ_FORCE_LO;
 EPwm1Regs.TZCTL.bit.DCBEVT1 = TZ_FORCE_LO;

请问哪里出问题了,为何OSHT变成CBC??