// 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
// Reassign ISRs.
// Reassign the PIE vector for EPWM1_INT to point to a different
// ISR then the shell routine found in DSP280x_DefaultIsr.c.
// This is done if the user does not want to use the shell ISR routine
// but instead wants to use their own ISR.
EALLOW; // This is needed to write to EALLOW protected registers
PieVectTable.EPWM1_INT = &MainISR;
PieVectTable.SCIRXINTC = &scia; //SCI
EDIS; // This is needed to disable write to EALLOW protected registers
// Enable PIE group 3 interrupt 1 for EPWM1_INT
PieCtrlRegs.PIEIER3.all = M_INT1;
// Enable PIE group 8 interrupt 5 for SCIRXINTC
PieCtrlRegs.PIEIER8.all = M_INT5;
// Enable CPU INT3 for EPWM1_INT:
IER |= M_INT3;
IER |= M_INT8;
仔细看看这些配置 就OK了