CN1186721C - Method for detecting host controller transmission rate for USB device - Google Patents
Method for detecting host controller transmission rate for USB device Download PDFInfo
- Publication number
- CN1186721C CN1186721C CNB02122739XA CN02122739A CN1186721C CN 1186721 C CN1186721 C CN 1186721C CN B02122739X A CNB02122739X A CN B02122739XA CN 02122739 A CN02122739 A CN 02122739A CN 1186721 C CN1186721 C CN 1186721C
- Authority
- CN
- China
- Prior art keywords
- transmission rate
- signal
- usb device
- usb
- host controller
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Expired - Lifetime
Links
Images
Landscapes
- Information Transfer Systems (AREA)
- Communication Control (AREA)
Abstract
The present invention relates to a USB apparatus, particularly to a method for detecting the transmission rate of a host controller by using the USB apparatus. A program storage apparatus arranged inside the USB apparatus is used to execute the steps that an interruption request of a time is started in a program; whether a host responds a signal which corresponds to a high speed USB controller within preset time is detected; if the host responds the signal which corresponds to the high speed USB controller within the preset time, the transmission rate is set to be in a high speed mode; otherwise, the transmission rate is set to be in a full speed mode. Thus, the detection of the transmission rate of the host can be rapidly completed by using minimum program codes.
Description
Technical field
The invention relates to a kind of method of USB device detecting host controller transmission rate.
Background technology
In recent years, because the high development of information related industry and people increase day by day to the requirement of information product computing and transmission speed, make the bus-bar technology of USB1.1 (the Universal Serial Bus) specification that the dealer commonly used in the past apply use, under the continuous excelsior research and development improvement of dealer, there is the new spec that can improve transfer rate in a large number to emerge finally.
Because the USB specification has plug and play (Plug-And-play; Can contact PNP), at most 127 USB devices, the electric power of 5V can be provided, and only need take an advantage such as IRQ, and be subjected to liking of numerous users.The transfer rate of employed in the past USB1.1 specification comprises the 1.5Mbps of low speed (Low speed) and two kinds of speed of 12Mbps of full speed (Full speed), for general device at a slow speed such as keyboard, slide-mouse, and audio device etc. enough uses, yet then still dislike not enough for devices such as the accesses of handling picture, video signal and data, so transfer rate is promptly received ardent echoing up to high speed USB (USB2.0) specification of 480Mbps once releasing.
At the initial stage that the high speed USB specification is released, the product that can support the high speed USB specification on the market is actually rare, and old USB specification (USB1.1) also still has the value of its existence, so system manufacturer must be taken the compatibility with old specification into account in the design of computer system, and also be an important topic to the identification that peripheral USB device can be supported transfer rate.
The computer that generally includes the high speed USB controller for the discrimination method of peripheral USB device transfer rate as shown in Figure 1, at first, in institute's coupling arrangement USB port, the signal wire that pullup resistor (pull-up resistor) is connected detects whether hookup mechanism is low speed device 101; If then can only transmit 121 with low-speed mode; If not, show that then this device can support at full speed transmission mode at least, can proceed the detection of fast mode.At this moment, can send SEO signal 103, wait for then and check this device whether in 3ms, to respond a K signal 105 by the USB controller; If not, represent that then this device is a USB device at full speed, transmit 125 as pattern at full speed; If then begin to carry out speeder detection process (chirpsequence) 107.Judge whether the speeder detection process finishes 109; If not, then at full speed pattern transmit 125; If, represent that then this device is the high speed USB device, can transmit 111 by fast mode.
Though above-mentioned method can solve the problem of high speed USB controller identification USB device transfer rate, yet, the dealer of relative production high speed USB device also faces same problem, its high speed USB device of producing also wants to be compatible to the USB1.1 controller of old specification, to improve its applicability, avoid the user when choosing, to produce puzzled and contradiction.
Therefore, the problem how to be taken place when judging and detect the USB controller transmission rate at the high speed USB device proposes a kind of novel solution, design a kind of high efficiency method for detecting, not only can effectively finish the detecting of transfer rate, and can shorten the program of detecting, reduce required procedure code, but and the result of duplicate acknowledgment detecting, be not to use for a long time the person eagerly to look forward to and difficulty place that human desires row of the present invention solves always, and the inventor is based on the correlative study of engaging in IT industry for many years, exploitation, and the practical experience of selling, the idea of thinking and improveing, through design in many ways, inquire into, after studying sample and improvement, finally work out a kind of method of USB device detecting host controller transmission rate, to solve the above problems.
Summary of the invention
Technical matters to be solved by this invention is, at the above-mentioned deficiency of prior art, and provides a kind of method of USB device detecting host controller transmission rate.
Above-mentioned technical matters of the present invention is realized by following technical scheme.
A kind of method of USB device detecting host controller transmission rate, this USB device includes at least one program storage device, and the main implementation step of its detecting host controller transmission rate is to include:
Start the interrupt request of timer;
Detect this main frame or hub whether in a schedule time, this schedule time is to be that 3.0ms responds a signal corresponding to the high speed USB controller, and this signal is one group of signal of representing KJKJKJ; Between each K signal and J signal is less than 3.0ms at interval;
If transmission mode is set at fast mode; And
If not, then transmission mode is set at pattern at full speed.
The method of described USB device detecting host controller transmission rate, this program storage device are a storer.
The method of described USB device detecting host controller transmission rate, this program storage device still include a rate identification sign.
The method of described USB device detecting host controller transmission rate, it still can be protected and contain the following step:
Before sending interrupt request, earlier distinguishing mark is made zero;
Whether in the schedule time, respond and can replace by the following step and detect this main frame corresponding to the step behind the signal of high speed USB control:
If distinguishing mark is set at fast mode;
If not, then distinguishing mark is set at pattern at full speed; And
The result sets transfer rate according to detecting.
The method of described USB device detecting host controller transmission rate, it still can be protected and contain the following step:
Reaffirm detecting result and distinguishing mark value identical errorless after, set transfer rate according to the result again.
The method of described USB device detecting host controller transmission rate, the value of this rate identification sign are to represent pattern at full speed with 1.
Now for feature of the present invention, spirit and the effect reached are had further understanding and understanding, careful assistant describe in detail with preferred embodiment and conjunction with figs. as after:
Description of drawings
Fig. 1 is a process flow diagram of commonly using USB controller detecting USB device transfer rate.
Fig. 2 is the process flow diagram of a preferred embodiment of the present invention.
Fig. 3 is the process flow diagram of another embodiment of the present invention.
Embodiment
At first, seeing also Fig. 2, is the process flow diagram of a preferred embodiment of the present invention.As shown in the figure, method for detecting of the present invention is to be connected to a main frame when a high speed USB device, and during as computer or usb hub (hub), this USB device can be by interrupt request (the Interrupt Request that starts timer in the program; IRQ) signal 201, the USB controller of main frame then can reset (reset) action and send the SEO signal, because this USB device is a high speed USB device, thus receive the SEO signal after can send the K signal and enter detection process main frame USB controller transmission rate.Owing to stipulate that the controller of main frame need be responded the K signal and add J signal at least three times in the high speed USB interface specification, just can confirm as a high speed USB controller, pretend the industry flow process and at first check whether in 3ms, receive K signal 203; If then continue check and whether in 3ms, receive J signal 205; If then whether check receives K signal 207 in 3ms again; If whether check receives J signal 209 in 3ms again; If can check again whether in 3ms, to receive K signal 211; If whether check receives J signal 213 in 3ms again; If the result is still for being can determine that then this USB controller is a high speed USB controller, so transfer rate is set at fast mode 215; If the testing result that above-mentioned steps 203 to step 213 has any step for not, promptly has the situation that does not receive K signal or J signal above 3ms to take place, represent that then this USB controller do not support the high-speed transfer pattern, so transfer rate is set at full speed pattern 223.
Utilize the method for detecting of the above embodiment of the present invention, only need several judgement formulas and circulation, can correctly finish the detecting of main frame USB controller transmission rate, can make that the required procedure code of detecting minimizes in the USB device, and detect required formality and time-histories also obtains maximum simplification and saving.
Secondly, seeing also Fig. 3, is the process flow diagram of another embodiment of the present invention.As shown in the figure, method for detecting of the present invention still can be set up a rate identification sign (flag), as the distinguishing mark of step 301 among the figure, uses the usefulness as the identification of transfer rate.Its method for detecting is at first distinguishing mark to be filled out 0, then in program, start the irq signal 301 of timer, the USB controller for the treatment of main frame reset (reset) action and after sending the SEO signal, send the K signal and enter detection process main frame USB controller transmission rate.Whether check receives K signal 303 in 3ms; If then continue check and whether in 3ms, receive J signal 305; If then whether check receives K signal 307 in 3ms again; If whether check receives J signal 309 in 3ms again; If whether the check that can carry out the K signal again receives 311 in 3ms; If whether check receives J signal 313 in 3ms again.If the testing result that above-mentioned steps 303 to step 313 has any step for not, promptly has the situation that does not receive K signal or J signal above 3ms to take place, represent that then this USB controller do not support the high-speed transfer pattern, so the value of this distinguishing mark is inserted 323 with 1; And transfer rate is set at full speed mode 3 25.If step 313 assay in order to determine not influenced by noise between detection period and make a mistake, still can carry out step 315 for being, check whether distinguishing mark is 0 again; If, can confirm that then assay is correctly undisturbed, transfer rate can be set at fast mode; If not, then represent to make a mistake because of being subjected to the noise interference in the checkout procedure, so transfer rate must be set at mode 3 25 at full speed.So, can reach the purpose of duplicate acknowledgment.
The method for detecting of the various embodiments described above all can utilize the stored detection process of a program storage device in the high speed USB device to be finished.Rate identification sign in embodiment illustrated in fig. 3 can be located in this program storage device, can also be a field in the working storage, is 0 or 1 to come identification it is to be fast mode or pattern at full speed by the value of this field; In the above-described embodiments, be that to represent it with 1 be pattern at full speed.In addition, the program storage device in the USB device can be implemented by a storer, and tolerable deviser or user are upgraded to its content or revise.
In sum, the invention relates to a kind of method of USB device detecting host controller transmission rate, it mainly is to utilize a program storage device in the USB device, detect its main frame that connects and whether in a schedule time, respond signal corresponding to the high speed USB controller, use and judge whether this main frame supports the high-speed transfer pattern, and procedure code that can be minimum is finished the detecting of host transfer rate fast.So the present invention one is rich in novelty, progressive, and can utilize effect for industry, meet the patented claim important document, submit application for a patent for invention in accordance with the law to, earnestly ask your juror and vouchsafe patent of the present invention early, the true feeling moral just.
All equalizations of doing by method of the present invention, structure, feature and spirit change and modify, and all should be included in the claim of the present invention.
Claims (6)
1, a kind of method of USB device detecting host controller transmission rate is characterized in that: this USB device includes at least one program storage device, and the main implementation step of its detecting host controller transmission rate is to include:
Start the interrupt request of timer;
Detect this main frame or hub whether in a schedule time, this schedule time is to be that 3.0ms responds a signal corresponding to the high speed USB controller, and this signal is one group of signal of representing KJKJKJ; Between each K signal and J signal is less than 3.0ms at interval;
If transmission mode is set at fast mode; And
If not, then transmission mode is set at pattern at full speed.
2, the method for USB device detecting host controller transmission rate according to claim 1 is characterized in that: this program storage device is a storer.
3, the method for USB device detecting host controller transmission rate according to claim 1 is characterized in that: this program storage device still includes a rate identification sign.
4, the method for USB device detecting host controller transmission rate according to claim 3, it is characterized in that: Shang Kebao contains the following step:
Before sending interrupt request, earlier distinguishing mark is made zero;
Whether in the schedule time, respond and can replace by the following step and detect this main frame corresponding to the step behind the signal of high speed USB control:
If distinguishing mark is set at fast mode;
If not, then distinguishing mark is set at pattern at full speed; And
The result sets transfer rate according to detecting.
5, the method for USB device detecting host controller transmission rate according to claim 3, it is characterized in that: Shang Kebao contains the following step:
Reaffirm detecting result and distinguishing mark value identical errorless after, set transfer rate according to the result again.
6, the method for USB device detecting host controller transmission rate according to claim 3 is characterized in that: the value of this rate identification sign is to represent pattern at full speed with 1.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CNB02122739XA CN1186721C (en) | 2002-06-07 | 2002-06-07 | Method for detecting host controller transmission rate for USB device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CNB02122739XA CN1186721C (en) | 2002-06-07 | 2002-06-07 | Method for detecting host controller transmission rate for USB device |
Publications (2)
Publication Number | Publication Date |
---|---|
CN1392480A CN1392480A (en) | 2003-01-22 |
CN1186721C true CN1186721C (en) | 2005-01-26 |
Family
ID=4745082
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CNB02122739XA Expired - Lifetime CN1186721C (en) | 2002-06-07 | 2002-06-07 | Method for detecting host controller transmission rate for USB device |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN1186721C (en) |
Families Citing this family (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1294494C (en) * | 2003-06-05 | 2007-01-10 | 英业达股份有限公司 | System for detecting master USB interface transfer rate and method thereof |
JP2005100064A (en) * | 2003-09-24 | 2005-04-14 | Canon Inc | Image processor and image processing method and its program |
CN101135985B (en) * | 2006-09-01 | 2010-08-25 | 鸿富锦精密工业(深圳)有限公司 | Computer data transmission speed testing system and method |
CN100533419C (en) * | 2007-03-13 | 2009-08-26 | 威盛电子股份有限公司 | USB peripheral equipment and mode detecting method thereof |
US8527667B2 (en) | 2009-09-24 | 2013-09-03 | Maishi Electronic (Shanghai) Ltd | Apparatuses and methods for transferring data |
CN102103562A (en) * | 2009-12-17 | 2011-06-22 | 财团法人工业技术研究院 | Multi-power mode serial interface architecture |
CN102156618B (en) * | 2010-02-11 | 2015-06-17 | 爱国者电子科技有限公司 | Memory device with multiple connectors and method for transmitting data |
CN109426644A (en) * | 2017-08-31 | 2019-03-05 | 西安中兴新软件有限责任公司 | A kind of rate adjusting method and device, equipment of USB data transmission |
-
2002
- 2002-06-07 CN CNB02122739XA patent/CN1186721C/en not_active Expired - Lifetime
Also Published As
Publication number | Publication date |
---|---|
CN1392480A (en) | 2003-01-22 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US7921244B2 (en) | Data sharing and transfer systems and methods | |
CN102749985B (en) | Method and device for dynamically adjusting bus clock | |
CN1186721C (en) | Method for detecting host controller transmission rate for USB device | |
CN1444752A (en) | Smart card virtual concentrator | |
CN1696883A (en) | Input processing method and input control apparatus | |
CN1251106C (en) | Method of enabling a port in computing device | |
US7173964B2 (en) | Method for detecting data transmission rate of USB controller by using USB device | |
US7979612B2 (en) | Communication method and apparatus | |
EP1199641A3 (en) | Data processing device used in serial communication system | |
CN1894681A (en) | Interface for serial data communication | |
CN2651843Y (en) | Master realtime monitor | |
CN1229736C (en) | Device for monitoring computer system resource and communicatin method of serial bus and said resource | |
CN1438582A (en) | USB control circuit suitable to computer-to-computer transmission and its operation method | |
CN101299208A (en) | Double-mode general-purpose serial bus equipment and control method thereof | |
CN101140552A (en) | Control system of data-transmission through universal serial bus and method thereof | |
CN103207850B (en) | The transmission system of heterogeneous device | |
CN1293400A (en) | Method for debugging basic I/O system of keyboard for developing notebook computer | |
CN1147774C (en) | Computer device and its change method from power economizing mode into operation mode | |
CN1959791A (en) | Method for providing function of flash message, and mobile communication terminal | |
CN1639701A (en) | USB host controller | |
CN2359735Y (en) | Multi-user connecting device capable of sharing computer host master resource | |
CN1549094A (en) | USB interface mobile storage | |
CN1311477A (en) | Method and its device for display BIOS error code | |
CN1362676A (en) | USB control circuit capable of switching path automatically | |
CN210324158U (en) | Ink screen reading equipment |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
C14 | Grant of patent or utility model | ||
GR01 | Patent grant | ||
CX01 | Expiry of patent term |
Granted publication date: 20050126 |
|
CX01 | Expiry of patent term |