Currently I'm working on a C8051F120 MCU where External Interrupts can be defined in two ways:
- Edge sensitive (Falling)
- 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?
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.
No comments:
Post a Comment