9
System Interface
9 – 15
associated with both external interrupt request lines and internal interrupts.
If an interrupt occurs during a waitstated external memory access or during the
extra cycles required to execute an instruction that accesses external memory
more than once, it is not recognized between the cycles, only before or after.
Edge-sensitive interrupts are latched, but not serviced, during bus grant (
BG
)
unless the GO mode is enabled.
In order to service an interrupt, the processor must be running and executing
instructions. The IDLE instruction can be used to effectively halt processor
operations while waiting for an interrupt.
Edge-sensitive and level-sensitive interrupt requests are serviced similarly.
Edge-sensitive interrupts may remain active (low) indefinitely, while level-
sensitive interrupts must be deasserted before the RTI instruction is executed;
otherwise, the same interrupt immediately recurs.
Care must be taken with the serial port (SPORT1) that can be configured for
alternate functions (
IRQ0
and
IRQ1
). If the RFS1 or TFS1 input is held low
when SPORT1 is configured as the serial port and then is reconfigured as
IRQ0
and
IRQ1
, an interrupt request can be generated. This interrupt request can be
cleared with the use of the IFC register.
9.6
FLAG PINS
All ADSP-21xx processors provide flag pins. The alternate configuration of
SPORT1 includes a Flag In (FI) pin and a Flag Out (FO) pin. The configuration
of SPORT1 as either a serial port or as flags and interrupts is selected by bit 10
of the processor’s system control register.
FI can be used to control program branching, using the IF FLAG_IN and IF
NOT FLAG_IN conditions of the JUMP and CALL instructions. These
conditions are evaluated based on the last state of the FI pin; FLAG_IN is true if
FI was last sampled as a 1 and false if last sampled as a 0. FO can be used as a
general purpose external signal. The state of FO is also available as a read-only
bit of the SPORT1 control register.
The ADSP-2111, ADSP-2171, ADSP-2181, and ADSP-21msp58/59 processors
have three additional flag output pins: FL0, FL1 and FL2. These flags (and FO)
can be controlled in software to signal events or conditions to any external
device such as a host processor. The Modify Flag Out instruction, which is
conditional, can perform SET, RESET and TOGGLE actions—this instruction
allows programs executing on the DSP processor to control the state of its flag
output pins. Note that if the condition in the Modify Flag Out instruction is CE