Thursday 12 January 2012

Embedded: Edge vs Level Triggered Interrupts




S.No Edge Triggered Interrupts Level Triggered Interrupts
1 Can cause high spurious Interrupts (if there is no signal proper filters, but can be avoided with filters) Minimal Spurious Interrupts
2 If the Pulse is very short it needs dedicated HW to detect it It is easy to detect the Level triggered Interrupts
3 From H/W Perspective more gates and complex to implement Less gates required and Less complex to implement
4 Not good for Interrupt Sharing. As if we dont clear the interrupt immediately it will cause other device interrupt to get lost. (But can be avoided if we clear the interrupt immediately) Good for Interrupt sharing with devices.
5 No Lockup problem If there is any interrupt without the handler to clear it will cause the whole system to Lockup
6 While Processing the interrupt first Clear the interrupt and then process Process the interrupt and then Clear. (or else may get the same interrupt again)


Verdict:  Edge Triggered Interrupts are preferred.