
VxWorks
Hardware Considerations Guide, 6.0
16
corruption. Ideally, the driver can disable only the interrupt from the device the
driver controls. However, because of some hardware with limiting designs, the
driver must sometimes disable all interrupts on the board. This is not desirable,
because no interrupts can be serviced during this lock-out period.
Some devices are capable of supplying the interrupt vector during the interrupt
acknowledge bus cycle. In addition, some of these devices can provide a modified
vector, where certain bits are changed to indicate the exact cause of the interrupt
within the device. This is a desirable feature because it allows the proper handler
routine within the driver to be executed faster than if only a single shared handler
routine is provided. (A single handler routine needs to poll the device to determine
which of several possible events caused the interrupt).
Many hardware designs include a special class of device: the interrupt controller.
These devices “field” all of the interrupt sources of the board and provide
programmable selection of interrupt parameters for each source. These parameters
may be: the priority level the interrupt generates, the vector the interrupt
generates, and whether the interrupt source is enabled or disabled. Some interrupt
controllers can be programmed to provide round-robin arbitration of interrupt
sources that are set to the same priority level.
The following are guidelines for interrupt circuitry:
1. Choose devices that can provide the interrupt vector and modify the vector
according to individual events. If this is not possible, then choose devices that
provide a single vector.
2. Interrupt controller devices are considered good features. They can replace or
augment the requirement in (1) above. Wind River has support routines for
several widely available interrupt controller devices. If implemented in-house,
make sure the device is well documented.
3. Each interrupt source on the board should have the capability to individually
enable/disable the interrupt from reaching the processor. This is so the driver
never needs to alter the CPU interrupt level. An interrupt controller device
usually provides this feature. A simple control register can also be used to
block interrupt signals from a device. Most devices contain an interrupt
enable/disable bit in one of the programmable registers. However, this is not
always true: Wind River has experience with devices that have no mechanism
for disabling their interrupt pin from being asserted.
4. All sources of interrupts must be in the de-asserted state after a hardware reset
or power up. This requirement is generally wise practice, but is especially
important in VxWorks. This is because of the way VxWorks is layered into
modules of different functionality. If a device is asserting its interrupt signal
Comentários a estes Manuais