This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Interrupts stalls

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

Parents
  • Do the math: 48MHz base clock / 200kHz => 240 cycles per interrupt. With the cycle counter (or by hand) you can estimate the time your interrupt needs.
    It is likely, you are only handling interrupts and nothing more.

    As for pending interrupts etc.: Check the TRM, I think it tells more about it.

Reply
  • Do the math: 48MHz base clock / 200kHz => 240 cycles per interrupt. With the cycle counter (or by hand) you can estimate the time your interrupt needs.
    It is likely, you are only handling interrupts and nothing more.

    As for pending interrupts etc.: Check the TRM, I think it tells more about it.

Children