I am trying to measure frequency of two input signals using 2 timers with interrupts on an LPC2368. At the same time the MCU is also sending data over RS232 to a computer. As soon as the frequency of the input signal goes up till 200Khz the serial data transmission stops. LPC2368 has a Vectored Interrupt Controller and is running at 48Mhz. What I think is happening is that as the frequency of the input signal increases the interrupts don't get processed fully before another interrupt happens and the number of interrupts that the MCU has to process keeps on increasing which stalls the main program loop. How many interrupts can stay pending on an LPC2386 if the first ISR hasn't completely been processed and another interrupt happens
Ouch, sorry it is a ARM7TDMI, no cycles counters.
Right. 3rd approach ;-)And you see that you spend too much time in the ISR for a 200kHz interrupt. You can try to tweak either your requirements or go for a MCU with at least 96MHz (but I see you can reach at up to 72MHz with the LPC2368, so why not try this).
Or you go for FIQ and Assembly.
And/or move the interrupt routine into RAM.