Download "user manual"
Transcript
Chapter 4: User Peripherals 4.13.5.1.8 Device Configuration When a device is first connected to the PC, its signalling speed is discovered and it will have Endpoint 0 configured to accept a control pipe. In addition, every new device that is plugged onto the network will be assigned address zero. This way the PC knows what bit rate to use and will have one control channel available at address zero endpoint zero. This control pipe is then used by the PC to discover the capabilities of the new device and to add it to the network. The process the PC uses to gather this information is called “Enumeration”. So in addition to configuring the USB peripheral on the STR9 you need to provide some firmware that responds to the PC enumeration requests. The data that the PC requests is held in a hierarchy of descriptors. The descriptors are simply arrays of data that must be transferred to the PC in response to enumeration requests. As you can see from the picture below it is possible to build complex device configurations because the USB network has been designed to be as flexible and as future proof as possible. However the minimum number of descriptors required is a device descriptor, configuration descriptor, interface descriptor and three endpoint descriptors (one control, one IN and one OUT pipe). The configuration information for every USB node is described as a hierarchy of descriptors which are transferred to the PC during the device enumeration procedure. 4.13.5.1.9 Device Descriptor At the top of the descriptor tree is the device descriptor. This descriptor contains the basic information about the device. Included in this descriptor is a vendor ID and product ID field. These are two unique numbers that identify what device has been connected. The windows operating system will use these numbers to determine what device driver to load. The vendor ID number is the number assigned to each company producing USB-based devices. The USB implementers’ forum is in charge of administering the assignment of vendor IDs. You can purchase a vendor ID from their website (www.usb.org) for $1500 administration charge (they must be very heavy) or $2500 if you want to use the USB logo on your product. Either way you must have a vendor ID if you want to sell a USB product on the open market. The product ID is a second 16-bit field which contains a number assigned by the manufacturer to identify a specific product. The device descriptor also contains a maximum packet size field. © Hitex (UK) Ltd. Page 149