Generating Interrupts; General Interrupt Enable Register, Bit Map; General Interrupt Pending Register, Bit Map; Input Irq Enable Register, Bit Map - PEP CP381 Manual

30 channel compactpci digital input controller
Table of Contents

Advertisement

Configuration
4.3.8

Generating Interrupts

Any detected event or, more clearly, any event flag set in the Input Status Register can trigger
an interrupt. Thus, any input can be enabled individually for interrupt generation.
Regardless of the cause of the interrupt, a board interrupt is always handled on the hardware
level in the same way, as follows; after having set the input control registers where compare
data and events are defined, interrupts can be enabled individually within the Input IRQ Enable
Register. The final step is to enable the board interrupt in the General Interrupt Enable Register.
Within the interrupt service routine interrupts should be handled as follows.
1. Check if the board is the cause of the interrupt (General Interrupt Pending is set)
2. If yes, check the reason for the interrupt by reading the input status register
3. Reset the corresponding Input Event Flag by writing a 1 to a set status bit.
4. Reset the boards' IRQ by resetting the General Interrupt Pending Bit by writing a 1 to that
status bit
5. Return from Interrupt
Table 4-14: General Interrupt Enable Register, Bit Map
Bits
Type
31
r/w
30 - 0
r/w
Note...
The board will continue issuing an interrupt until all interrupt sources are com-
pletely dealt with and no interrupt condition remains.
A set bit means that the boards' interrupt is enabled.
Table 4-15: General Interrupt Pending Register, Bit Map
Bits
Type
31
r/w
30 - 0
r/w
Note...
A set bit means that the boards' interrupt is pending. A board interrupt must be
cleared by writing a "1" to the corresponding input event flag.
Table 4-16: Input IRQ Enable Register, Bit Map
Bits
Type
31
r/w
30
r/w
29 - 0
r/w
Page 4 - 12
Default
0
Board Interrupt Enable
0
Reserved
Default
0
Board Interrupt Pending
0
Reserved
Default
0
Not used
0
Input compare interrupt enable
0
Input event interrupt enable
© 2002 PEP Modular Computers GmbH
Function
Function
Function
ID 24107, Rev. 01
CP381

Advertisement

Table of Contents
loading

Table of Contents