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

Edge based vs.level based interrupt

Hi all,

The C167 has edge based external interrupts (programmable to rising/falling/both). Does anybody have a reference to info on how to interface it with a level based interrupt device (e.g. an external multi-port UART)? When you OR several interrupt sources together, you miss interrupts. What's the "industry standard" way of handling this?

I just checked the datasheet of an XC167 and it also has edge based external interrupts only. Could somebody explain, to a simple software engineer :-), what the advantage of edge based interrupts is? Level based seems to make alot more sense to me; it's plain and simple.

Regards,
Joost Leeuwesteijn

Parents
  • Whether it's level based or edge based, if you are sharing an interrupt through wired-OR lines, your interrupt service routine must loop through every interrupt source. It must test and clear every source, and the loop termination condition must be that all sources have been cleared.

    The C167 should not miss any interrupt edges unless they occur before the interrupt is enabled. If this is important, the best solution is to test the level of the pin just after you enable the interrupt, and assert the interrupt request bit in your program.

Reply
  • Whether it's level based or edge based, if you are sharing an interrupt through wired-OR lines, your interrupt service routine must loop through every interrupt source. It must test and clear every source, and the loop termination condition must be that all sources have been cleared.

    The C167 should not miss any interrupt edges unless they occur before the interrupt is enabled. If this is important, the best solution is to test the level of the pin just after you enable the interrupt, and assert the interrupt request bit in your program.

Children
No data