Controlling the PCI-to-Local Interrupt

For a normal use, the card should be reset by the PCI host (if needed) using only the –SRESET signal. The –HRESET signal is used for special cases, such as FLASH memory re-programming through PCI. Example 4-1is an example of C code routines to reset and run the board from the PCI side.

Example 4-1. Reset and Run Command Routines

￿GHILQH￿7B+5(6(7￿￿￿￿￿￿￿￿￿[￿￿￿￿￿￿￿'%￿￿FRQWUROV￿￿,17￿￿DV￿RXWSXW￿IRU￿￿+5(6(7 ￿GHILQH￿7B65(6(7￿￿￿￿￿￿￿￿￿[￿￿￿￿￿￿￿'%￿￿FRQWUROV￿￿,17￿￿DV￿RXWSXW￿IRU￿￿65(6(7

YRLG￿5HVHW&DUG￿￿YRLG￿

^

5HJ:ULWH￿￿￿￿7B,(5￿￿￿5HJ5HDG￿￿￿￿7B,(5￿￿￿_￿7B65(6(7￿￿

`

YRLG￿5XQ&DUG￿￿YRLG￿

^

5HJ:ULWH￿￿￿￿7B,65￿￿￿7B+5(6(7￿_￿7B65(6(7￿￿

`

Controlling the PCI-to-Local Interrupt

The PowerSpan Interrupt pin –INT0 is used to control the PCI-to-Local interrupt (renamed ATN in the software examples: “Attention to the PowerQUICC II” ). It is associated by convention with doorbell register 2. The PowerSpan Interrupt Map registers must have been previously correctly initialized. This interrupt controls the –IRQ1/DP1/–EXT_BG2 input pin of the PowerQUICC II.

Example 4-2is an example of C code routines to set and reset the PCI-to-Local interrupt and to read the status of this interrupt from the PCI side.

Example 4-2. PCI to Local Interrupt Routines (From the PCI Side)

￿GHILQH￿7B$71￿￿￿￿￿￿￿￿￿￿￿￿￿[￿￿￿￿￿￿￿￿￿￿'%￿￿FRQWUROV￿￿,17￿￿DV￿RXWSXW￿IRU￿￿$71 YRLG￿6HW$WQ￿￿YRLG￿

^

5HJ:ULWH￿￿￿￿7B,(5￿￿￿7B$71￿￿

`

XQVLJQHG￿FKDU￿$WQ6WDWH￿￿YRLG￿

^

UHWXUQ￿￿￿XQVLJQHG￿FKDU￿￿￿￿5HJ5HDG￿￿￿￿7B,65￿￿￿￿￿7B$71￿"￿￿￿￿￿￿￿￿￿￿

`

88

Interphase Corporation