USB Device

Hi All,

This may be a very basic question forgive me if i wasted your time.
How does USB drive should be enumerated by Windows OS. i want to know the complete
steps involves in this enumeration process.

Thanks a lot in advance.
:slight_smile:

Detail USB Enumeration process is explained here
http:
.

Before going through this link I would recommend reading “USB in Nutshell
http:” at-least once to understand key points regarding USB
specification.

\PT

On Tue, Jul 21, 2015 at 2:41 PM, wrote:

> Hi All,
>
> This may be a very basic question forgive me if i wasted your time.
> How does USB drive should be enumerated by Windows OS. i want to know the
> complete
> steps involves in this enumeration process.
>
> Thanks a lot in advance.
> :slight_smile:
>
> —
> NTDEV is sponsored by OSR
>
> Visit the list at: http://www.osronline.com/showlists.cfm?list=ntdev
>
> OSR is HIRING!! See http://www.osr.com/careers
>
> For our schedule of WDF, WDM, debugging and other seminars visit:
> http://www.osr.com/seminars
>
> To unsubscribe, visit the List Server section of OSR Online at
> http://www.osronline.com/page.cfm?name=ListServer
></http:></http:>

xxxxx@gmail.com wrote:

This may be a very basic question forgive me if i wasted your time.
How does USB drive should be enumerated by Windows OS. i want to know the complete
steps involves in this enumeration process.

You don’t really mean “complete steps”. That would take a book. The
process happens at several different levels: electrical, hub protocol,
host controller protocol, driver, PnP, etc.

The process starts at the hub. The electrical parts are all described
in the USB Spec, and if you are doing USB drivers, you need to have a
copy of that close at hand. It is freely available from www.usb.com,
and it is surprisingly readable.

The hub detects that a new device has arrived, and notifies the host
controller, which notifies the host controller driver. They assign a
device ID and read the descriptors. The host controller driver then
sends a PnP notification that is has a new child. PnP asks for the
hardware ID of the new child, which the host controller builds from the
VID and PID. After that, it’s just like any other new device. PnP
looks for a matching driver, and loads it.


Tim Roberts, xxxxx@probo.com
Providenza & Boekelheide, Inc.

On Jul 24, 2015, at 8:02 PM, DL CU > wrote:

Tim,

Can I know which part of usb spec is the “must read” chapter?

That depends on what you want to know. From the software end, Chapter 9 is the most interesting one. It describes the descriptors and the standard control endpoint commands. I believe it is chapter 7 that discusses the various pipe types. Usually, the electrical sections are not that interesting to a driver guy. The sections after 9 are mostly about hubs.

Tim Roberts, xxxxx@probo.commailto:xxxxx
Providenza & Boekelheide, Inc.</mailto:xxxxx>

DL CU wrote:

right now I’m reading the usb type-c specification,
as we known, the type-c receptacle is no longer limited the device’s
plug-in orientation,
is it able to know which orientation for child-device is inserted to
the host or hub?
I wonder if the port register has such bit definition for the type-c
cable’s plug-in orientation.
I am trying to write an application to identify the device plug-in
orientation for testing the functionality of usb type-c.

It can’t be done. If you go look at the receptacle pinout, you’ll see
that there’s no way to tell the difference electrically. The signals
are completely symmetrical.


Tim Roberts, xxxxx@probo.com
Providenza & Boekelheide, Inc.

Tim,
I saw there is a communication channel(CC) in UFP and there are 2 CCs in DFP,spec describes CC pin is used to determine the plug-in device’s orientation, maybe upside-up or upside-down,and then determine which TX/RX pair to use for DFP.
//dlcu

Subject: Re: [ntdev] USB Device
To: xxxxx@lists.osr.com
From: xxxxx@probo.com
Date: Mon, 27 Jul 2015 10:00:53 -0700

DL CU wrote:
>
> right now I’m reading the usb type-c specification,
> as we known, the type-c receptacle is no longer limited the device’s
> plug-in orientation,
> is it able to know which orientation for child-device is inserted to
> the host or hub?
> I wonder if the port register has such bit definition for the type-c
> cable’s plug-in orientation.
> I am trying to write an application to identify the device plug-in
> orientation for testing the functionality of usb type-c.

It can’t be done. If you go look at the receptacle pinout, you’ll see
that there’s no way to tell the difference electrically. The signals
are completely symmetrical.


Tim Roberts, xxxxx@probo.com
Providenza & Boekelheide, Inc.


NTDEV is sponsored by OSR

Visit the list at: http://www.osronline.com/showlists.cfm?list=ntdev

OSR is HIRING!! See http://www.osr.com/careers

For our schedule of WDF, WDM, debugging and other seminars visit:
http://www.osr.com/seminars

To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer

DL CU wrote:

I saw there is a communication channel(CC) in UFP and there are 2 CCs
in DFP,
spec describes CC pin is used to determine the plug-in device’s
orientation, maybe upside-up or upside-down,
and then determine which TX/RX pair to use for DFP.

You’re quite right, the hardware has to know.

However, there’s nothing in any of the Type-C specifications that talks
about software impact. There are no additional descriptors or status
requests. In part, they must do that – they are trying to separate the
Type-C connector completely from USB 3.1, so you can use a Type-C
connector with a USB 2.0 hub, and of course the existing hubs won’t know
how to report that status.

It’s not impossible that USB-IF will come out with a spec update to add
a bit for USB 3 hubs, but that seems unlikely.


Tim Roberts, xxxxx@probo.com
Providenza & Boekelheide, Inc.