Download Hardware Manual - RTD Embedded Technologies, Inc.
Transcript
The initialization process of the controller is: Set all bits to 1 in the Interrupt Clear Mask Register. Read a dummy data from Clear Interrupt set by Clear Mask address. These two steps means that all Interrupt requests are cleared Write Interrupt mask register. If an interrupt source must be used, that position in the register must be set to 1. After this initialization process the Interrupt Controller receives the interrupt requests, and according to their priority order transmits them to the PC. One time one request. In the Interrupt service routine you must identify the current interrupt source reading by (INTCSR; PCI:68h) Interrupt Control/Status Register of PCI9080/9056, and then the Interrupt Status Register of on-board Priority Interrupt Controller. The INTCSR description can be found in the Chapter 8.1.2. In the on-board priority register there is a position where the bit is high, signaling the active interrupt source from the priority interrupt sources. All of the other bits are zero. Identifying the source, it can be serviced. After servicing, the request must be cleared by accessing the Interrupt clear mask and the Clear Interrupt set by Clear Mask registers. In the normal operation, the next interrupt request comes later than clearing of the previous. If this is override, it can be detected by the Interrupt Overrun register. If the interrupts serviced in time all bits are zeros in the overrun register. If a new interrupt request comes before the previous has been serviced and the request is cleared, the appropriate overrun bit goes into high signaling the faulty - too slow interrupt service - operation. 5.8.3 ADVANCED DIGITAL INTERRUPTS The bit programmable digital I/O circuitry supports two Advanced Digital Interrupt modes, event mode or match mode. These modes are used to monitor digital input lines (P0..7) for state changes. The mode is selected at LAS0+7Ch, B3 and enabled at LAS0+7Ch, B4. Event Mode When enabled, this mode samples the Port 0 input lines at a specified clock rate (using the 8 MHz system clock or a programmable clock in User TC Counter 1), looking for a change in state in any one of the eight bits. When a change of state occurs, an interrupt is generated and the input pattern is latched into the Compare Register. You can read the contents of this register at LAS0+78h (LAS0+7C bits 1 and 0 set to 11) to see which bit caused the interrupt to occur. Bits can be masked and their state changes ignored by programming the Mask Register with the mask at LAS0+78h (LAS0+7C bits 1 and 0 set to 10). Match Mode When enabled, this mode samples the Port 0 input lines at a specified clock rate (using the 8 MHz system clock or a programmable clock in User TC Counter 1) and compares all input states to the value programmed in the Compare Register at LAS0+78h (LAS0+7C bits 1 and 0 set to 11). When the states of all of the lines match the value in the Compare Register, an interrupt is generated. Bits can be masked and their states ignored by programming the Mask Register with the mask at LAS0+78h (LAS0+7C bits 1 and 0 set to 10). Sampling Digital Lines for Change of State In the Advanced Digital Interrupt modes, the digital lines are sampled at a rate set by the 8 MHz system clock or the clock programmed in User TC Counter 1. With each clock pulse, the digital circuitry looks at the state of the next Port 0 bits. To provide noise rejection and prevent erroneous interrupt generation because of noise spikes on the digital lines, a change in the state of any bit must be seen for two edges of a clock pulse to be recognized by the circuit. RTD Embedded Technologies, Inc. | www.rtd.com 87 DM35520HR/SDM35540HR User’s Manual