Figure 15 Chip-Select Line Used for Interrupt Acknowledge
2.10.4.2 Autovectors
When an external device cannot supply a vector number in response to an IACK cycle, an autovector
can be used instead. The autovector number is determined by the priority of the interrupt request. For
example autovector number 2 corresponds to IRQ2. In order for an autovector to be automatically used,
the IACK cycle must be terminated by an AVEC signal. There are two ways to do this: either assert the
AVEC signal externally or use the internal chip-select circuitry to provide the AVEC signal. Once the
bus cycle has been terminated, the CPU saves the current context, loads the 16-bit vector into the PC,
and begins to execute the service routine at that address. As a side note, internal modules cannot ter-
minate an IACK cycle with AVEC, which would cause the CPU to automatically provide the autovector.
An internal module must request a particular vector number by writing the appropriate value to its inter-
rupt configuration register. The internal module will then automatically terminate the IACK cycle with
DSACK and provide the CPU with the vector number as specified by its interrupt configuration register.
One way to use autovectors is to tie the AVEC pin to ground. This effectively generates an external
AVEC signal only in response to all IACK cycles caused by external interrupt service requests. If it is
not desirable for all external interrupts to autovector, specific external devices can assert AVEC in re-
sponse to an IACK cycle. However, in this case it is usually easier to set up a chip-select circuit to pro-
vide the AVEC signal internally.
Perform the following steps to set up a chip-select circuit to generate the AVEC signal:
1. Configure the chip-select pin for any of its available functions in the pin assignment register.
2. Program the appropriate base address register to $FFF8 or higher.
3. Select the following fields in the appropriate option register:
A.MODE Bit — select asynchronous mode (%0)
B.BYTE Field — select assertion for both bytes (%11)
C.R/W Field — select assertion for both reads and writes (%11)
D.STRB Bit — select synchronization with AS (%0)
E.DSACK Field — select number of wait states (user specified)
F.SPACE Field — select CPU space assertion (%00)
G.IPL Field — select interrupt priority level (user specified)
H.AVEC Bit — enable AVEC generation (%1).
chip-select option registers.
2.10.5 Level-Sensitive versus Edge-Sensitive Interrupt Pins
Interrupt pins IRQ[6:1] are level sensitive. Assertion of an active-low signal connected to one of these
332TUT PERI CONN
CS
D7
D0
IACK
D15
D8
CS0
CS1
MC68HC16Z1
PERIPHERAL
D6
D14
D5
D13
D4
D12
D3
D11
D2
D10
D1
D9
F
re
e
sc
a
le
S
e
m
ic
o
n
d
u
c
to
r,
I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
n
c
..
.