
Interrupt Handling
2-33
2.10.2.1 ISTAT
ISTAT is the only register that can be accessed as a slave during
SCRIPTS operation; therefore, the ISTAT register is polled when polled
interrupts are used. It is also the rst register that should be read when
the IRQ/ pin has been asserted in association with a hardware interrupt.
The Interrupt on the Fly (INTF) bit should be the rst interrupt serviced.
It must be written to one to be cleared. This interrupt must be cleared
before servicing any other interrupts. If the SIP bit in the ISTAT register
is set, then a SCSI-type interrupt has occurred and the SIST0 and SIST1
registers should be read. If the DIP bit in the ISTAT register is set, then
a DMA-type interrupt has occurred and the DSTAT register should be
read. SCSI-type and DMA-type interrupts may occur simultaneously, so
in some cases both SIP and DIP may be set.
2.10.2.2 SIST0 and SIST1
SIST0 and SIST1 registers contain the SCSI-type interrupt bits. Reading
these registers determines which condition or conditions caused the
SCSI-type interrupt, and clears that SCSI interrupt condition.
If the SYM53C895 is receiving data from the SCSI bus and a fatal
interrupt condition occurs, the SYM53C895 attempts to send the
contents of the DMA FIFO to memory before generating the interrupt.
If the SYM53C895 is sending data to the SCSI bus and a fatal SCSI
interrupt condition occurs, data could be left in the DMA FIFO. If this
situation occurs, the DMA FIFO Empty (DFE) bit in DMA Status (DSTAT)
should be checked.
If this bit is cleared, set the Clear DMA FIFO (CLF) and Clear SCSI FIFO
(CSF) bits before continuing. The CLF bit is bit 2 in CTEST3. The CSF
bit is bit 1 in STEST3.
2.10.2.3 DSTAT
The DSTAT register contains the DMA-type interrupt bits. Reading this
register determines which condition or conditions caused the DMA-type
interrupt, and clears that DMA interrupt condition. Bit 7, DFE bit in DSTAT
is purely a status bit; it does not generate an interrupt under any
circumstances and is not cleared when read. DMA interrupts ushes