Leandro Colen <lcrocha@yahoo.com> wrote in article <aceskg$oh1$1@inn.qnx.com>…
Hello everyone, here i am again,
Hello,
well… my question of the day > 
Can i program an interrupt handler for IRQ 0 (Interrupt that the clock can
generate) ?
Yes, you can. But I would not suggest to do it. You can write your handler and attach it to the
another ones (you aren’t one in this handling) by InterruptAttach(). Also, you can’t
“to drown” another ones as you can do it in DOS. Actually, you have nothing for this handler. If
you want to get periodically events - use InterruptAttachEvent().
Why i need this? Well, as i’ve told before in other post, i’m porting some
programs from the old DOS that use this feature.
Usualy DOS programs used INT 0x1c or INT 0x08 to take control every 55ms (handle IRQ 0 or to be in
long train of handlers). But you don’t need use it anymore in QNX. You have much more safe timers.
And, i think that is a
faster and easier way to do some tests with interrupt handling.
I don’t think you have chosen good interrupt line (IRQ 0) for interrupt handling tests
Just
because this timer is used by OS to do all time related operations for you (except nanospin() which
uses CPU loops).
If so, can anyone send me an example?
I suggest you to find the example with ISR 8 handling:
From: Rennie Allen
Newsgroups: qdn.public.qnxrtp.os
Subject: Re: ISR about isr 8
Date: Fri, 11 Jan 2002 10:12:31 -0800
Xref: inn.qnx.com qdn.public.qnxrtp.os:6729
Or just read the documentation
http://qdn.qnx.com/support/docs/neutrino_2.11_en/prog/inthandler.html
I believe it’s best place for start if you want to program Interrupt Service Routines.
I’ve done a lot of sucessful tests using timer (Thanks to Rob again), and
now i want the timer to generate an interrupt for my tests with interrupt
routines.
You can use messages and pulses in QNX instead of users’ vectors and soft INT in DOS. Ideology of
DOS and QNX is quite different. You’re able to use all your DOS background but don’t copy
everything from one OS to another.
I’ve done some tests trying to InterruptAttach(IRQ0,…) but when i do this
the qnx stop responding and i have to restart the machine. Once again, sorry
I’m not surprised
. The better is InterruptAttachEvent(). But I tell you once more, you don’t
want to do it.
Cheers,
Eduard.
ed1k at ukr dot net
for this dumb thing… RTOS is a new thing to me…
Thx
Leandro.
\