Memory Mapped register read/write on USB device

  • Follow


Hi,

Is it possible to access USB device registers through memory mapped
I/
O.


The windows miniport driver for USB WLAN card that I have uses bulk
read/write operations to access USB device's registers, which is very
slow and doesn't take constant time. On the other hand the driver
written for CardBus WLAN card uses memory mapped I/O access CardBus
device register ,which is very fast. I want to access USB registers
in
negligible and constant time (in order of 1/2 microseconds) is there
a
way to do this or can we use memory mapped register I/O on USB
platform?


Thanks in advance.


- Ravi


0
Reply ravis 11/27/2009 11:46:57 AM

> Is it possible to access USB device registers through memory mapped
> I/
> O.

Surely no.

USB bus is driven by the host controller, not by the CPU. It does not =
have the usual CPU-to-devices notions like "IO ports" or "memory-mapped =
IO".

You can only access USB by sending commands to the USB HC. Since this is =
a complicated DMA based device, MS provided the code to program it with =
the OS, and what you do is just send requests to this MS's code.

There is some hack in the USB HC which intercepts port 0x60 at boot to =
fully emulate the USB keyboard as PS/2 one, but this is specific to the =
keyboard (and early boot stages) and is not generic.

> The windows miniport driver for USB WLAN card that I have uses bulk
> read/write operations to access USB device's registers, which is very
> slow=20

This is not slow, this is normal. Creation of the URB+IRP is neglectable =
amount of time.

>and doesn't take constant time.=20

This is normal. Ethernet is not realtime anyway.

> written for CardBus WLAN card uses memory mapped I/O access CardBus
> device register ,which is very fast.=20

Yes, register access is fast, but the overall data transfer rate should =
be nearly the same.

>I want to access USB registers

There is no such thing as "USB registers" in the USB WLAN device.

> negligible and constant time (in order of 1/2 microseconds) is there

No ways. More so - I do not think that with Windows and PC, you can =
guarantee this small latency of hardware access _for any hardware =
device_.

--=20
Maxim S. Shatskih
Windows DDK MVP
maxim@storagecraft.com
http://www.storagecraft.com

0
Reply Maxim 11/27/2009 3:43:59 PM


1 Replies
388 Views

(page loaded in 0.032 seconds)

Similiar Articles:













7/22/2012 1:17:57 AM


Reply: