From: paul DOT crone AT thomson-csf DOT no Message-Id: <200101160749.IAA03089@alcatel.no> To: djgpp AT delorie DOT com Subject: Re[2]: Problem using timer and irq routines from Allegro MIME-Version: 1.0 X-Mailer: Internet Mail Service (5.5.2650.21) Content-Type: text/plain Date: Tue, 16 Jan 2001 08:42:47 +0100 Reply-To: djgpp AT delorie DOT com > > paul DOT crone AT thomson-csf DOT no wrote: > > I have a problem that I've been trying to resolve for some time. This is a > > test harness program to test a timer routine using the Allegro timer.c, > > irq.c and irqwrap.S files. I want to use them in my program. > > > The program runs and apparently installs the timer and irq's. My > > problem is that I don't get any interrupt 'timerRCU' callbacks and > > so the printf statement never prints. > > Please be aware that you shouldn't be calling any other functions from > an interrupt handler. Certainly not a complicated one like printf(). I understand your point. The interrupt routine does nothing but increment a counter. The printf statement is in the main loop. > > I didn't really look at all the code, but there's another possible > problem that comes to mind. You seem to be talking about *two* timer > packages (yours, and the one from allegro) being active at the same > time. Such a setup generally won't work, unless you make sure you use > two independent timer tick IRQ sources, and properly chain interrupt > handlers, where appropriate. The code seeks to reprogram the timer chip. The reference to Allegro was merely to state that my code is a copy of the Allegro source code. Allegro is not otherwise being used here. I think that you are right when you say that the interrupt chaining is incorrect. That is my problem. Thanks for your suggestions. Paul > -- > Hans-Bernhard Broeker (broeker AT physik DOT rwth-aachen DOT de) > Even if all the snow were burnt, ashes would remain. >