Ok, I’ve got some results to post.
-
The IRQs in use are:
IRQ 0 heartbeat interrupt
IRQ 1 keyboard
IRQ 2 cascade to second interrupt controller
IRQ 3 COM2
IRQ 4 COM1
IRQ 5 XT Hard Disk
IRQ 7 My Timing Interrupt
IRQ 8 Real Time Clock
IRQ 9 Redirected IRQ 2, whatever is meant by that
IRQ 10 Free
IRQ 11 Serial Controller, Network Controller
IRQ 12 Display Controller
IRQ 13 Free
IRQ 14 IDE Controller
IRQ 15 Free -
I reduced the priority of the handler thread to 15, as was suggested.
There are many more missed calls to the handler, now. The missed calls start
right away, as well, rather than taking several hours to deteriorate to this
condition. The latency of the ISR is steady at around 20 usec. Limitations
in the way the FPGA processes output limit the duration of the interrupt
pulse to 45 usec, even if it is ack’ed earlier than that. The timeout on the
pulse is at 250 usec, though, and it doesn’t extend beyond 45 usec after the
ISR runs.
The scheduling latency for the handler thread is between 2 to 3 millisec.
Sometimes this extends to between 4 to 6 millisec, but at this point the
system is out of control, anyway, so it doesn’t much matter. At the point
where the scheduling latency spans one or more interrupts, I see that
sometimes the interrupt is ack’ed and sometimes it times out. There isn’t
any obvious pattern to the acking and timing out, except that the first
interrupt always seems to be acked.
- The application is multi-threaded. I’ve followed one of the examples in
the help file that came with our windows SDK. I have a main thread that
spawns the handler thread. The handler thread attaches to the interrupt and
blocks on InterruptWait.
I checked with our PC vendor and made sure the SMM features were disabled.
The fact that the first interrupt is ack’ed seems to verify that. I don’t
understand the long scheduling latency or the very non-deterministic
behavior that I see. If you have any additional suggestions, I’d appreciate
them.
Sincerely,
…dk
“Adam Mallory” <amallory@qnx.com> wrote in message
news:asqfdg$2vd$1@nntp.qnx.com…
David Kuechenmeister <> david.kuechenmeister@viasat.com> > wrote in message
news:asq6ei$gia$> 1@inn.qnx.com> …
[problem details omitted]Can you post a list of the IRQ’s in use in your system (ie. NIC card,
serial
ports, peripherals etc)? Is there any other activity going on in the
system, while the test is being performed (ie. logging etc).Also, modify your test to do the following:
-run you application doing the InterruptWait() at a priority band around
15
(not too high, just higher than most of the non-essential processes).
You’ll want to ensure you have a method of stopping the test (high
priority
shell to slay etc) later >-make your application multithreaded (if it’s not already) with your main
code path in one thread and a busy/wait loop in the other.
eg: for (;;);Let us know the results of the test.