View topic - Interrupts in Qnx

Interrupts in Qnx

anything that doesn't fit to other groups.

Interrupts in Qnx

Postby appu 0287 » Mon May 14, 2012 6:40 am

Hi Every one,
I am new to qnx and i want to test the interrupt routines(ISR ) using Keyboard , Is there any ISRs ? i followed the Help topics but i could not make of it ,before i worked on Micro controllers where there are ISRs when any interrupt occurs ISR will come in to picture.

Please let me know any topics / references for this,

Thanks in adv.
appu 0287
New Member
Posts: 1
Joined: Tue Apr 10, 2012 12:55 pm

Re: Interrupts in Qnx

Postby maschoen » Mon May 14, 2012 5:22 pm

I don't know what you mean by "Is there any ISRs?".

You can write an interrupt service routine in QNX.
The actually interrupt routine that is called from the vector table is unavailable, the OS handles it.
Instead you can attach an interrupt routine which runs in your programs context, but with a small stack.
Multiple interrupt routines can be attached to the same interrupt, and each one will be called in turn.
The OS routine automatically masks lower priority interrupts but allows higher priority ones.
If you attach to the keyboard interrupt, you should not access the hardware as there is already an ISR handling it, but you can use this method to find out when a key is pressed. Note that the keyboard generates interrupts when a key is pressed and released. I'd recommend attaching to the timer interrupt for experimentation.

It is also possible to attach to an interrupt in such a way that you merely wait in a thread for the interrupt to occur. This is safer as a software bug in an ISR will cause a kernel crash, whereas a bug in your own thread will merely cause a program crash.
QNX Master
Posts: 2720
Joined: Wed Jun 25, 2003 5:18 pm

Return to General Programming

Who is online

Users browsing this forum: No registered users and 1 guest