USB plug-in to use the required path

Source: Internet
Author: User

When a USB device is connected to a computer, two processes are mainly detected and transmitted. Its detection process is mainly experienced six steps, connection, boot, default, address, configuration and hanging machine, its transmission is mainly application software using USB host drive and USB device for data exchange. Its detection process uses the control transmission, the transmission process uses the interruption, the batch and the real-time transmission.

Detection:

Connection: A USB device is connected to a USB host system, but the host system is not powered on and does not power the slave system. At this point, There is no detection and data exchange between the USB slave and the host.

Power on: The host is powered on, when the host is available to the slave.USBthe host detects the slave machineD -and thed+on the voltage, whenUSBwhen the slave is in low-speed mode,D -Connection1.5Kpull-up resistor;USBwhen the slave is in full speed and high speed mode,d+Connection1.5Kpull-up resistor,USBThe host detects the signal line voltage to determine if there isUSBset the connection.

Default: The host has determined the mode from which the machine works, and the slave and host Exchange data at the default address. During this time, the main opportunity sends a set-port-feature request, requiring the hub to reset the port. The host sends a get-port-status during the period to prove that the setting is not in the Reset state, and when the device is ready to respond to the control transfer on the default pipe of endpoint 0, use the default address 00h communicates with the host. The host uses get-descriptor to understand the size of the default pipe's maximum packets.

Address: to the slave address reset, the host to the slave to specify a unique address, at this address the host and slave data exchange. The host controller sends a set-address request to specify a unique address for the device, and the new address continues until the device is removed, reset, or the system shuts down.

Configuration: The host and slave are configured on the unique address of the exchange, the host by sending a get-descriptor to understand the new address on the device descriptor.

Transmission:

Transmission is mainly divided into application software,USB device driver,USB bus driver and USB Slave.

Application software: The application software is mainly responsible for the collection and transmission of raw data, the user can manipulate the part.

USB Device drivers:USB device drivers are primarily connected to the application software and USB bus drivers so that the two parts can communicate.

USB bus driver:USB bus driver mainly includes USB Host controller driver and the hub driver. Mainly for The management of USB devices and USB Raw data configuration, packaging processing.

USB Slave: Slave mainly provides data for the host machine.

For a normal user, the USB device is plugged in, waiting for the system to install the driver, followed by normal use. But as a developer its system development is not very difficult.

Copyright NOTICE: This article for Bo Master original article, without Bo Master permission not reproduced.

USB from plug-in to use required path

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.