大家好,
// Enable CNT_zero interrupt using EPWM1 Time-base
EPwm1Regs.ETSEL.bit.INTEN = 1; // Enable EPWM1INT generation
EPwm1Regs.ETSEL.bit.INTSEL = 1; // Enable interrupt CNT_zero event
EPwm1Regs.ETPS.bit.INTPRD = 1; // Generate interrupt on the 1st event
EPwm1Regs.ETCLR.bit.INT = 1; // Enable more interrupts
还有下面的主中断程序是怎么进入的?
// Enable PIE group 3 interrupt 1 for EPWM1_INT
PieCtrlRegs.PIEIER3.all = M_INT1;
// Enable CPU INT3 for EPWM1_INT:
IER |= M_INT3;
这应该是中断使能吧。但是中断是怎么触发的呢????
interrupt void MainISR(void)
怎么触发这个主中断????
谢谢各位了。