I DO NOT have a SDk/DDK. Since I was interested in learning to write a
simple serial port device driver for windows 2000, I used MINGW.
(mingw.sourforge.net)
I wrote a simple driver that prints some DBG messages on every interrupt.
(I wrote this with great difficulty getting required clarifications by
posting questions in this list. And further I do not have access to DDK
sample programs as I don’t have the DDK)
The problem, is however, the behaviour is unpredictable.
On slow interrupts, the system sometimes prints the DBG messages as
expected. But if the interrupts come too fast (every 1000 microsecs), the
system hangs or reboots or stops. (I get a blue screen error
“IRQ_NOT_LESS_OR_EQUAL”).
I spent quite sometime to debug this problem, but in vain.
At first, I thought the problem may be my ISR routine. MY ISR routine is
very simple which does something like this
{
// msr is a global variable.
msr = read_regs(); //pure i/o operations on UART
enable_further_interrupts(); // pure i/o operations on UAT.
if (dcd bit not set in MSR) {
print “Dummy”;
return FALSE;
}
print “real”
return FALSE;
// Actually i shud return TRUE. But if I do so, the driver hangs.
}
Also I am passing “LATCHED” as InterruptType to “IoInterruptConnect”.
If I pass “LevelSensitive”, the system always reboots.
These two problems are really troubling me. I have just started to wonder
if these problems is becoz of some bug in the MINGW devp. kit I am using.
Can anyone please throw more light on this ?
PS: If this behaviour confirms that problem is not in the code, then i can
try to post the problem in MINGW mailing list.
Do let me know if my complete source code is required.
Thanx
Kiran