[comp.sys.atari.st.tech] Timer A, Spurious Interrupts

csbrod@immd4.informatik.uni-erlangen.de (Claus Brod) (05/08/91)

Hi,

this is my first experiment with the MFP Timer A. I have fiddled
around with the corresponding XBIOS functions Xbtimer(), Jdisint()
and Jenabint(), and the interrupt routine proper even is called
periodically - everything fine so far. The problem is that I get
a Spurious Interrupt exception from time to time - more often if
the period between interrupts is decreased by adjusting the Timer
A data and control register.

The code I'm using looks like this:

	Xbtimer(TIMERA, 0, 0, -1L);	/* stop Timer A */
	Xbtimer(TIMERA, 1, 9, myroutine);	/* start Timer A */
	.
	.

	/* do some floppy I/O */
	.
	.
	Xbtimer(TIMERA, 0, 0, -1L);	/* stop Timer A */
	Jdisint(13);			/* disable Timer A interrupts */


The interrupt routine:

myroutine:
	addq.l #1,counter
	bclr #5,$fffffa0f
	rte
counter:
	dc.l 0

I'm not dealing with any other interrupts while the routine above is running.
I'm working on a TT with TOS 3.01. If I understand the 'Spurious Interrupt'
exception right, it is triggered by some interrupt device (probably the
MFP) not responding to a CPU interrupt acknowledge cycle. I can't figure
out, however, how I did that 8-)

If somebody can help me out: Please make a simple door very happy 8-)

----------------------------------------------------------------------
Claus Brod, Am Felsenkeller 2,			Things. Take. Time.
D-8772 Marktheidenfeld, West Germany		(Piet Hein)
csbrod@medusa.informatik.uni-erlangen.de
Claus Brod@wue.maus.de
----------------------------------------------------------------------