Motorola MVME172 User Manual

Page 339

Advertising
background image

Using Interrupts on the MVME172

http://www.mcg.mot.com/literature

B-3

B

3.

Set up an interrupt handler routine:

Step

Action and Reference

Your interrupt handler should include the following features.

1

Be sure the MC68060 vector base register is set up. Set the
proper MC68060 exception vector location so the processor
vectors to your interrupt handler location. You can determine
the proper exception vector location to set from the MC68060
vector base register, the VMEchip2 base register, and Table 2-3,
the Local Bus Interrupter Summary, in Chapter 2, from which
you can determine the actual interrupt vector given on a Tick
Timer 1 interrupt. Lower the MC68060 mask so the interrupt
level you programmed is accepted. The interrupt handler itself
should include the following (steps 2 through 5).

2

Confirm the Tick Timer 1 interrupt occurred, by reading the
status of bit 24 of the Interrupter Status Register at $FFF40068.
A high indicates an interrupt present.

3

Clear Tick Timer 1 interrupt by writing a one to bit 24 of the
Interrupt Clear Register at $FFF40074.

4

Increment a software counter to keep track of the number of
interrupts, if desired. Output a character or some other action
(such as toggling the

FAIL

LED) on an appropriate count, such

as 1000.

5

Return from exception.

Advertising