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.

TMS320F28335: EPwm的TZ中断进不去

Part Number: TMS320F28335


大佬们,我配置了TZ中断,外部TZ1由高变低进不去中断,使用软件触发也进不去,配置如下:

//错误联防TZ
EPwm1Regs.TZSEL.bit.OSHT1=1;//使能TZ1(低)联防、
EPwm1Regs.TZCTL.bit.TZB=2;//联防使PWM为低
EPwm1Regs.TZCTL.bit.TZA=2;
EPwm1Regs.TZCLR.bit.INT = 1;
EPwm1Regs.TZCLR.bit.INT = 1;
EPwm1Regs.TZEINT.bit.OST=1;//使能中断

EALLOW;

PieVectTable.EPWM1_TZINT=&PWM1_TZ;//TZ

EDIS;

PieCtrlRegs.PIEIER2.bit.INTx1=1;//TZ

IER |=M_INT2;//TZ

EINT;

//中断服务程序

TZ=1;

PieCtrlRegs.PIEACK.all=PIEACK_GROUP2;
EPwm1Regs.TZCLR.bit.OST=1;
EPwm1Regs.TZCLR.bit.INT=1;

在主程序使用EPwm1Regs.TZFRC.bit.OST=1;触发不了TZ中断,变量TZ一直都是0