SCSI Functional Description 2-43
If the instruction is a JUMP/CALL WHEN/IF <phase>, the DMA
SCRIPTS Pointer (DSP) is updated to the transfer address before
halting.
All other instructions may halt before completion.
2.2.16.7 Sample Interrupt Service Routine
The following is a sample of an interrupt service routine for the
LSI53C875A. It can be repeated during polling or should be called when
the IRQ/ pin is asserted during hardwareinterrupts.
1. Read Int errupt Status Zero (ISTAT0).
2. If the INTF b it is set, it must be written to a one to clear this status.
3. If only the SIP b it is set, read SCSI Interrupt Status Zero (SIST0) and
SCSI Interrupt Status One (SIST1) to clear the SCSI interrupt
condition and get the SCSI interrupt status. The bits in the SIST0
and SIST1 tell which SCSI interrupts occurred and determine what
action is required to service the interrupts.
4. If only th e DIP bit is set, read DMA Status (DSTAT)to clear the
interrupt condition and get the DMA interrupt status. The bits in
DSTATtell which DMA interrupts occurred and determine what ac tion
is required to service the interrupts.
5. If both th e SIP and DIP bits are set, read SCSI Interrupt Status Zero
(SIST0),SCSI Interrupt Status One (SIST1),andDMA Status
(DSTAT)to clear the SCSI and DMA interrupt condition and get the
interrupt status. If using 8-bit reads of the SIST0, SIST1, and DSTAT
registers to clear interrupts,insert a 12 CLK delay between the
consecutive reads to ensure that the interrupts clear properly. Both
the SCSI and DMA interrupt conditions should be handled before
leaving the interrupt service routine. It is recommended that the DMA
interrupt is serviced before the SCSI interrupt, because a s erious
DMA interrupt condition could influence how the SCSI interrupt is
acted upon.
6. When u sing polled interrupts, go back to Step 1before leaving the
interrupt service routine, in case any stacked interrupts moved in
when the first interrupt was cleared. When using hardware interrupts,
the IRQ/ pin is asserted again if there are any stacked interrupts.
This should cause the systemto re-enter the interrupt service
routine.