ABSTRACT

While developing embedded and real-time systems, it is usually necessary to write code that handles interrupts, or code that interacts with interrupt handlers. Interrupts are indispensable because they use hardware support to reduce both the latency and overhead of event detection, when compared to polling. Furthermore, modern embedded processor cores support wake-on-interrupt and can save energy by shutting down when idle, leaving only simple circuitry such as timers running. For example, a TelosB [13] sensor network node drains a pair of AA batteries in a few days by running the processor continuously but can run a useful application for months if the duty cycle is kept appropriately low.