COMPACT 7 INTERRUPT ARCHITECTURE

The interrupt mechanism is initiated by a hardware interrupt which manifests at the CPU as an IRQ (Interrupt Request). A Windows Embedded Compact 7 driver will handle an interrupt as two routines: The ISR and the IST. The ISR is the Interrupt Service Routine, which is the first routine called when an interrupt occurs. The IST is the Interrupt Service Thread, which gets called later.

The Compact 7 Interrupt mechanism is shown in Figure 31-4 and is discussed in detail in the following sections.

Setup

The ISR and IST have to be enabled through the operating system before they can handle the interrupt.

  • When the driver is loaded, or when it is enabled, the ISR is registered to handle an IRQ.
  • When the driver is loaded, a high priority thread is started that loops. The thread blocks waiting for an event. When unblocked, it processes the interrupt data and then blocks on that event until it is signaled again.

Interrupt Sequence

The following outlines the interrupt sequence as in Figure 31-4:

1. Hardware generates an interrupt on the CPU’s IRQ pin.

2. CPU disables all other IRQs on that pin.

3. Kernel gets the interrupt and calls the associated ISR, in a high-priority thread.

4. Kernel reenables higher priority IRQs.

5. ISR determines the interrupt source from hardware and returns the system interrupt ID to the kernel via SetEvent.

6. ISR ...

Get Professional Windows® Embedded Compact 7 now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.