Electronic – What’s the actual difference between edge sensitive and level sensitive interrupts

interrupts

Currently I'm working on a C8051F120 MCU where external interrupts can be defined in two ways:

  1. Edge sensitive (falling)
  2. Level sensitive (low-level)

In level-sensitive interrupts as soon as the MCU detects a low level at the external pin it will execute the ISR which is the same as detecting a falling edge.

I know I'm wrong as both can't be the same. Hence I'm asking this question: what's the actual difference between the two, in their detection procedure or in the execution of the ISR?

Best Answer

Its exactlly what is says.

If edge interrupt is set, the ISR will only get fired on falling/rising edge of a pulse. While if level sensitive interrupt (as you say) is set the ISR will get fired everytime there is a low-level/high-level signal on the corresponding pin.

In short, edge interrupt gets fired only on changing edges, while level interrupts gets fired as long as the pulse is low or high.

So if you have low-level interrupt set, MCU will keep executing the ISR as long as the pin is low.