자료실 HOME > 참여광장 > 자료실
조회 수 13 추천 수 0 댓글 0
수정 삭제
수정 삭제
microsoft usb sync software3 EZ-USB interface device development method

USB device development of the general steps and content shown in Figure 1. The device-oriented firmware mainly includes device descriptor information, device function code and communication control function code. Device Description Information Describes the general characteristics and configuration of USB devices, such as device category, interface configuration, VID, and PID. The host obtains the descriptor of the USB device when the device is enumerated to obtain the configuration information and related driver information of the device. The user can change the characteristics of the device by modifying the descriptor in the firmware. The device function code is determined by the functional requirements of the device. The communication control function code performs host request analysis processing and data exchange processing functions.

The device driver provides the interface for the user to access the device. The development system provides the manufacturer's general purpose device driver. Users can also use the relevant driver development tools to customize their own. Customized device drivers are required to conform to the WDM driver specification. If the automatic configuration, EZ-USB development system provides a load driver development template, the use of template development is relatively simple. In the case of command configuration, the user writes the firmware load code in the application.

The driver is usually installed through the INF file, the INF file binds the device's VID and PID to the device driver, specifies the path where the driver is stored, and provides information about the driver's registration and display. Therefore, Windows detects the EZ-USB device connection, according to the registry automatically load the device driver into the system environment.

4 Design example

The author uses AN2131QC to develop a common EZ-USB interface module. The hardware and software resources of this common module are all open and are equipped backup computer with usb test driver and firmware examples. Use this common module as a use of an IC chip, the device description information and INF file slightly modified, and add the device function code, you can form a dedicated EZ-USB interface device.

4.1 firmware design

The firmware of the generic EZ-USB module includes the descriptor table and the USB communication test program. The descriptor table is a set of structured information that conforms to the USB specification and describes the characteristics of the device, giving the variable a different value, and the device exhibits different characteristics. When the device is connected, the host requests the device to provide the descriptor table, so the descriptor table is part of the firmware. In this general module, five descriptor tables are defined. Table 1 lists the main parameters of each descriptor.

Table 1 General EZ-USB interface module descriptor and main parameters

The firmware in this common module is only used for EZ-USB communication tests, device drivers, and firmware loading demonstrations. Through the experiment found that the firmware design is worth noting.

① use ezusb.sys general driver, the host to use the query to receive data from the device. If the host can not receive the data uploaded by the device will wait for a long time, or even crash. In the design of this article, the solution to this problem is that data upload and drop operations occur in pairs. Each time the host downloads a packet, the device uploads a packet. At this point if the device has data upload data will be placed in the upload packet, or return an empty packet.

② initialization should be cleared once the corresponding endpoint buffer, or sometimes there will be the first transmission error phenomenon, the reason may be insufficient reset or internal RAM power-down delay. In practice found that the device power down for a long time, EZ-USB RAM data remains. [1] [2] [3] EZ-USB interface \u0026 nbsp; \u0026 nbsp; \u0026 nbsp; \u0026 nbsp; \u0026 nbsp; \u0026 nbsp; \u0026 nbsp; \u0026 nbsp; \u0026 nbsp; \u0026 nbsp; \u0026 nbsp; \u0026 nbsp; \u0026 nbsp; \u0026 nbsp; \u0026 nbsp; \u0026 nbsp; \u0026 nbsp; \u0026 nbsp; \u0026 nbsp; \u0026 nbsp; \u0026 nbsp; \u0026 nbsp; \u0026 nbsp; \u0026 nbsp; \u0026 nbsp; \u0026 nbsp; \u0026 nbsp; \u0026 nbsp; \u0026 nbsp; \u0026 nbsp; \u0026 nbsp; [ Station use of non-site original articles and pictures and other content can not contact the confirmation of copyright. If the authors and editors of the articles selected by this website are of the opinion that their work should not be freely disseminated or should not be used free of charge, please notify us by e-mail or telephone promptly to take appropriate measures promptly to avoid unnecessary economic losses to both parties The