Is there a way to detect CPU timer interrupt overruns, i.e., if the interrupt service routine is taking to long to complete so timer interrupts are lost? I tried to use a simple overrun flag but it looks like that interrupt service routines are not called unless the previous one is completed:
interrupt void cpu_timer0_isr(void) { static int overrunflag = 0; DINT; if (overrunflag) // Detect overruns overruns++; overrunflag = 1; // Set overrun flag EINT; PieCtrlRegs.PIEACK.all = PIEACK_GROUP1; // Acknowledge interrupt CpuTimer0.InterruptCount++; // Do something DELAY_US(delaytime); // Waste time... overrunflag = 0; // Clear overrun flag }