Hi,
I am using an F28027 Launchpad and am not quite sure how to change the ISR interrupt frequency. Since the interrupt is enabled by epwm in my case, I guess the adjustion of frequency lies in the following few lines of codes.
// Reassign ISRs.
EALLOW;
// This is needed to write to EALLOW protected registers
PieVectTable.EPWM1_INT = &MainISR;
EDIS;
// Enable PIE group 3 interrupt 1 for EPWM1_INT
PieCtrlRegs.PIEIER3.bit.INTx1 = 1;
// 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 CPU INT3 for EPWM1_INT:
IER |= M_INT3;
// Enable global Interrupts and higher priority real-time debug events:
EINT;
// Enable Global interrupt INTM
ERTM;
// Enable Global realtime interrupt DBGM
// IDLE loop. Just sit and loop forever:
for(;;); //infinite loop
I can't find out where I can change the interrput frequency. Please help.
Thanks
Jingzhe