you could put a dbgprint in the isr to see if it’s ever called since you
seem to have problems with breakpoints.
when you set breakpoints make sure you qualify them with the module name
or the debugger might try loading all sorts of random symbols. bp
mydriver!function_name.
you may have trouble using the parallel port on an ACPI system. They
typcially turn ports off if they’re disabled or if no driver is
installed for them, so if you disable the port or remove the parport
driver as the service then you may not actually be able to use the ports
(they just return 0xff when you read from them). I had this problem on
a test machine of mine when I was poking at the ports for the COM
controller through the debugger when the device was disabled.
if you think this is the problem (read the port in the debugger and see
if you get back 0xff) you could try changing the HAL on the system to
the non-ACPI version. Select the node under Computer in the device
manager, update driver, select “install from a list or …” and hit
next, select “don’t search …” and hit next, and select either “MPS
Multiprocessor PC” or “standard PC” depending on what you have. You’ll
have to reboot a few times and it will reinstall a lot of devices - I
don’t recommend doing this on your development system but it’s okay for
just screwing around with the hardware.
-p
-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of John F Davis
Sent: Thursday, January 22, 2004 9:53 AM
To: Windows System Software Devs Interest List
Subject: RE: [ntdev] art baker book - chap 8 parallel port loopback
driver
Hello Peter,
Thanks for the help. Its still not working though. Here are my
additional comments.
When I say locks up, I mean that the user mode program which tries to
exercise the driver locks up. I have to hit ctrl-c to get back the
prompt.
As far as bios setting goes it seems to agree with the driver code.
Bios:
Parallel Port - 0x378
Parallel Port Mode - Standard
Parallel Port IRQ - IRQ 7
Beneath that in gray (ie. not changable settings) it says:
Parallel Port Extended Mode - Bidirectional
Parallel Port Extended Mode DMA - No DMA
Driver code:
status = CreateDevice(pDriverObject,
ulDeviceNumber,0x378,
0x7);
JD
“Peter Wieland” Sent by:
xxxxx@lists.osr.com
01/22/2004 12:30 PM
Please respond to “Windows System Software Devs Interest List”
To: “Windows System Software Devs Interest List”
cc:
Subject: RE: [ntdev] art baker book - chap 8 parallel
port
loopback driver
(let’s see if lyris lets me get messages through again)
when you say that it “locks up” do you mean that the entire system locks
up or just your test application?
Considering when the baker book was written, you might try setting your
parallel port in to bi-directional or normal mode rather than EPP or
ECP. You might also want to configure it with an interrupt - the bios
setting you’ve chosen might keep the controller from generating an
interrupt even if the OS sees that it has one assigned.
of course in normal mode the parallel port interrupt is amazingly
useless (it just tells you when you can start polling for data, rather
than when the other side has strobed some data in) but that’s another
matter.
-p
-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of John F Davis
Sent: Thursday, January 22, 2004 8:13 AM
To: Windows System Software Devs Interest List
Subject: Re: [ntdev] art baker book - chap 8 parallel port loopback
driver
Hello
I forgot to add the following to the beginning of the trace:
PPORT: Interrupt 7 converted to kIrql = 8, kAffinity = 1, kVector = 91
PPORT: Interrupt successfully connected
I also shutdown the machine before I plugged the loopback connector onto
the parallel port.
JD
John F Davis/Raleigh/xxxxx@ibmus
Sent by: xxxxx@lists.osr.com
01/22/2004 11:06 AM
Please respond to “Windows System Software Devs Interest List”
To: “Windows System Software Devs Interest List”
cc:
Subject: [ntdev] art baker book - chap 8 parallel port
loopback driver
Hello
I am having trouble with the parallel port loopback driver in chapter 8
of Art Baker’s windows 2000 device driver book. I start the user mode
program and then it locks up after transmitting the first packet. Here
is the windbg trace:
PPORT: Write Operation requested (DispatchWrite)
PPORT: Start I/O Operation
PPORT: StartIO: Transmitting first byte of 20
PPORT: TransmitByte: Sending 0x00 () to port 378
PPORT: Wrote to Control: 0x03
PPORT: Read From Status: 0x007
PPORT: TransmitByte read character: 0x000 ()
PPORT: TransmitByte: generating interrupt.
At this point it locks up.
The first time I made my connector, I had a cold solder joint on one of
my pins. However I think I have a good connector now. I am wondering
about the pinouts though. I used the pin numbering on the connector as
my guide. ie. pin 1 on the connector is the pin I chose for pin1. This
makes holding the connector so that long end is on top and the short end
is on the bottom with the pins facing you, pin 1 is the top left and pin
25 is the bottom right.
Also, I did a google and I checked wiring diagram and I found something
which worries me. Instead of wiring pin 12 to pin 14, the loopback
connector pinout showed 12 going to 20. I’m not sure if that is a
problem or not.
Lastly, does the parallel port need to be in a particular setting in the
bios? eg. ecp or epp mode. In windows device manager I have the
following settings:
ECP printer port LPT1
Filter Resource Method: Never use an Interrupt Enable legacy plug and
play detection is unchecked.
Driver Resources are set to automatic settings.
Do I need to disable the existing parallel port driver?
JD
—
Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256
You are currently subscribed to ntdev as: johndavi@us.ibm.com To
unsubscribe send a blank email to xxxxx@lists.osr.com
—
Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256
You are currently subscribed to ntdev as: xxxxx@microsoft.com To
unsubscribe send a blank email to xxxxx@lists.osr.com
—
Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256
You are currently subscribed to ntdev as: johndavi@us.ibm.com To
unsubscribe send a blank email to xxxxx@lists.osr.com
—
Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256
You are currently subscribed to ntdev as: xxxxx@windows.microsoft.com
To unsubscribe send a blank email to xxxxx@lists.osr.com