Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!dali.cs.montana.edu!caen!sol.ctr.columbia.edu!ira.uka.de!fauern!faui43.informatik.uni-erlangen.de!csbrod From: csbrod@immd4.informatik.uni-erlangen.de (Claus Brod) Newsgroups: comp.sys.atari.st.tech Subject: Timer A, Spurious Interrupts Summary: Can't get a simple Timer A routine to work Keywords: Timer A, Spurious Interrupts Message-ID: <1991May8.110116.3191@informatik.uni-erlangen.de> Date: 8 May 91 11:01:16 GMT Organization: CSD., University of Erlangen, Germany Lines: 47 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 ----------------------------------------------------------------------