我看了所有关于TZ的帖子,有我想要的,我也看了那个EPwmTripZone那个例程,我想问的是软件强制生成周期错误事件怎么书写才能产生,难道不是简简单单的
EALLOW;
EPwm2Regs.TZFRC.bit.CBC=1;
EDIS;
吗?
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.
我也是这样写的,不过是在初始化程序中写的
EALLOW;
EPwm1Regs.TZFRC.bit.CBC = 1;
// What do we want the TZ1 and TZ2 to do?
EPwm1Regs.TZCTL.bit.TZA = TZ_FORCE_HI;
EPwm1Regs.TZCTL.bit.TZB = TZ_FORCE_LO;
// Enable TZ interrupt
EPwm1Regs.TZEINT.bit.CBC = 1;
EDIS;
但怎么就是进不了中断呢?PIE那里我也写了
PieVectTable.EPWM1_TZINT = &EPWM1_TZINT_ISR;
可是怎么就是进不了中断,而且不能输出想要的波形?求楼主指点,谢谢